Skip to content

Instantly share code, notes, and snippets.

@greenlaw110
Created June 25, 2012 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenlaw110/2991022 to your computer and use it in GitHub Desktop.
Save greenlaw110/2991022 to your computer and use it in GitHub Desktop.
a problem antlr file
grammar RL;
report
: REPORT ('(' REPORT_NAME ')')? BEGIN END
;
REPORT : 'Report';
BEGIN : 'Begin';
END : 'End';
NAME : LETTER (LETTER | DIGIT | '_')*;
REPORT_NAME
: NAME+
;
fragment LETTER : LOWER | UPPER;
fragment LOWER : 'a'..'z';
fragment UPPER : 'A'..'Z';
fragment DIGIT : '0'..'9';
SPACE : (' ' | '\t' | '\r' | '\n')+ { $channel = HIDDEN; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment