ANTLR 3 seems to use some sort of regex like manipulation in its rules, does anyone know if it uses a custom syntax and where the documentation for that is?
+2
A:
From the ANTLR wiki:
See also Grammars and Special symbols in actions.
Symbol | Description
----------------+--------------------------------------------------------
$ | Attribute
@ | Action
:: | action or dynamically-scoped attribute scope specifier
: | rule definition
; | end rule
| | alternative
's' | char or string literal
. | wildcard
= | label assignment
+= | list label assignment
[..] | argument or return value spec
{...} | action
... | forced action; execute even while backtracking
(...) | subrule
+ | 1 or more
* | 0 or more
? | optional or semantic predicate
~ | match not
! | don't include in AST
^ | make AST root node
=> | always execute predicate
-> | rewrite rule
<token options> | token option spec like ID<node=VarNode>
^(...) | tree grammar or rewrite element
// ... | single-line comment
/* ... */ | multi-line comment
Bart Kiers
2009-12-10 15:16:09
i can't believe i missed that after looking that that page several times, thanks!
RCIX
2009-12-10 21:18:46