Sign in
android
/
platform
/
external
/
antlr
/
refs/heads/tools_r21
/
.
/
antlr-3.4
/
runtime
/
JavaScript
/
tests
/
functional
/
t058rewriteAST40.g
blob: f634eb83d8ced20d56c9d7551c2870aff8729c89 [
file
] [
log
] [
blame
]
grammar t058rewriteAST40
;
options
{
language
=
JavaScript
;
output
=
AST
;}
tokens
{
BLOCK
;}
a
:
(
atom
->
atom
)
(
op
=
'+'
r
=
atom
->
^(
$op $a $r
)
)*
;
atom
:
INT
;
ID
:
'a'
..
'z'
+
;
INT
:
'0'
..
'9'
+;
WS
:
(
' '
|
'\n'
)
{
$channel
=
HIDDEN
;}
;