rule[arg1, arg2, ..., argN] returns [ret1, ..., retN]
text is target language dependent. Java/C#/C/C++ would use "int i" but ruby/python would use "i". Languages with postfix types like Go, Swift use "x : T" notation or "T x".
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Pair | |
| public static Pair | |
| public static int | |
| public static AttributeDict | |
| public static Attribute | |
| public static AttributeDict | parseTypedArgList(ActionAST action, String s, Grammar g)
Given an arg or retval scope definition list like
or
convert to an attribute scope. |
| public static List | splitDecls(String s, int separatorChar)
Given an argument list like x, (*a).foo(21,33), 3.2+1, '\n', "a,oo\nick", {bl, "fdkj"eck}, ["cat\n,", x, 43] convert to a list of attributes. |
| ScopeParser | back to summary |
|---|---|
| public ScopeParser() | |
| _parsePostfixDecl | back to summary |
|---|---|
| public static Pair | |
| _parsePrefixDecl | back to summary |
|---|---|
| public static Pair | |
| _splitArgumentList | back to summary |
|---|---|
| public static int _splitArgumentList(String actionText, int start, int targetChar, int separatorChar, List<Pair<String, Integer>> args) | |
| parse | back to summary |
|---|---|
| public static AttributeDict parse(ActionAST action, String s, char separator, Grammar g) | |
| parseAttributeDef | back to summary |
|---|---|
| public static Attribute parseAttributeDef(ActionAST action, Pair<String, Integer> decl, Grammar g) For decls like "String foo" or "char *foo32[]" compute the ID and type declarations. Also handle "int x=3" and 'T t = new T("foo")' but if the separator is ',' you cannot use ',' in the initvalue unless you escape use "\," escape. | |
| parseTypedArgList | back to summary |
|---|---|
| public static AttributeDict parseTypedArgList(ActionAST action, String s, Grammar g) Given an arg or retval scope definition list like
or
convert to an attribute scope. | |
| splitDecls | back to summary |
|---|---|
| public static List Given an argument list like x, (*a).foo(21,33), 3.2+1, '\n', "a,oo\nick", {bl, "fdkj"eck}, ["cat\n,", x, 43] convert to a list of attributes. Allow nested square brackets etc... Set separatorChar to ';' or ',' or whatever you want. | |