Groups
Groups
Sign in
Groups
Groups
antlr中文论坛
Conversations
About
Send feedback
Help
Beetl 0.61 发布
10 views
Skip to first unread message
atu
unread,
Sep 4, 2011, 11:30:03 PM
9/4/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr中文论坛
支持定义json变量,支持switch,支持map循环。功能上不再增加,准备进军超高难度的预编译版本
switchStatment
: a='switch' '(' base=exp ')' '{' caseStatment* defaultStatment? '}'
->^(SWITCH[$a] $base caseStatment* defaultStatment? ) ;
caseStatment
: a='case' exp ':' statmentBlock ->^(CASE[$a] exp statmentBlock);
defaultStatment
: a='default' ':' statmentBlock -> ^(DEFAULT[$a] statmentBlock);
json : '[' atom (',' atom)* ']' ->^(JSONARRAY atom*)
| '{' jsonKeyValue (',' jsonKeyValue)* '}' ->^(JSONMAP jsonKeyValue*)
;
jsonKeyValue
: StringLiteral ':' atom ->^(JSONKEYVALUE StringLiteral atom ) ;
Reply all
Reply to author
Forward
0 new messages