Skip to content

Instantly share code, notes, and snippets.

@amazzalel-habib
Last active December 12, 2019 15:48
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 amazzalel-habib/ef42e0faaa05b9b4b8cf9b74255faed0 to your computer and use it in GitHub Desktop.
Save amazzalel-habib/ef42e0faaa05b9b4b8cf9b74255faed0 to your computer and use it in GitHub Desktop.
grammar TodoLangGrammar;
todoExpressions : (addExpression)* (completeExpression)*;
addExpression : ADD TODO STRING EOL;
completeExpression : COMPLETE TODO STRING EOL;
ADD : 'ADD';
TODO : 'TODO';
COMPLETE: 'COMPLETE';
STRING: '"' ~ ["]* '"';
EOL: [\r\n] +;
WS: [ \t] -> skip;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment