-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fa2b54
commit 14f686e
Showing
9 changed files
with
63 additions
and
85 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package executionFlow.io.processor.parser.trgeneration; | ||
|
||
|
||
/** | ||
* @author Murilo Wolfart | ||
* @see https://bitbucket.org/mwolfart/trgeneration/ | ||
*/ | ||
public class Defs { | ||
|
||
public static final int failure = -1; | ||
public static final int success = 0; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
src/executionFlow/io/processor/parser/trgeneration/Regex.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
package executionFlow.io.processor.parser.trgeneration; | ||
|
||
|
||
/** | ||
* @author Murilo Wolfart | ||
* @see https://bitbucket.org/mwolfart/trgeneration/ | ||
*/ | ||
public class Regex { | ||
public static String classSignature = "(((|public|final|abstract|private|static|protected)(\\s+))?(class)(\\s+)(\\w+)(<.*>)?(\\s+extends\\s+\\w+)?(<.*>)?(\\s+implements\\s+)?(.*)?(<.*>)?(\\s*))\\{$"; | ||
public static String methodSignature = "(public|protected|private|\\s)(\\s*static)? +[\\w\\<\\>\\[\\]]+\\s+(\\w+) *\\([^\\)]*\\) *(\\{?|[^;])"; | ||
|
||
// TODO [methodSignature] not all methods contain a scope, default is protected | ||
|
||
public static String classSignature = "^[ \\t]*((public|private|protected)\\s+)?(static\\s+)?(final\\s+)?class\\s.*"; | ||
public static String methodSignature = ".*[a-zA-Z][a-zA-Z0-9]*\\s*\\(.*\\)\\s*\\{$"; | ||
public static String reservedMethods = "(if|while|for|class|switch|try|catch|finally)"; | ||
|
||
public static String reservedMethods = "(if|while|for|class|switch|try|catch|finally|return)"; | ||
public static String reservedInstructions = "^\\b(do|else(?!\\s+if)|case|default|continue|break|switch)\\b.*"; | ||
public static String nonExecutableLines = "^\\b(do|else(?!\\s+if)|default)\\b.*"; | ||
|
||
// TODO do not capture escaped quotes | ||
public static String insideQuoteRestriction = "(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$).*"; | ||
public static String insideQuoteRestriction = "(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)(?=(?:[^']*'[^']*')*[^']*$).*"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters