Skip to content

Instantly share code, notes, and snippets.

@amazzalel-habib
Created May 11, 2020 00:38
Show Gist options
  • Save amazzalel-habib/8e87c729c459033002ac426dbd732e0c to your computer and use it in GitHub Desktop.
Save amazzalel-habib/8e87c729c459033002ac426dbd732e0c to your computer and use it in GitHub Desktop.
grammar TodoLangGrammar;
todoExpressions : (addExpression)* (completeExpression)*;
addExpression : ADD TODO STRING;
completeExpression : COMPLETE TODO STRING;
ADD : 'ADD';
TODO : 'TODO';
COMPLETE: 'COMPLETE';
STRING: '"' ~ ["]* '"';
EOL: [\r\n] + -> skip;
WS: [ \t] -> skip;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment