Skip to content

Commit

Permalink
Actually added mtg.g4.
Browse files Browse the repository at this point in the history
  • Loading branch information
PAK90 committed Dec 31, 2016
1 parent 46e07df commit b523ef8
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .idea/filigree-texts.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions mtg.g4
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
grammar mtg;

// Take care of whitespace.
WS : [ \r\t]+ -> skip;

/*
This will be the entry point of our parser.
*/
evaluate
: textbox?
;

/*
Split everything into rows, divided by newlines. Can be 0 to infinite number of rows.
Can't quite get it to ignore newlines on last line...
*/
textbox
: (row '\n')*
;

/*
Every row either has one ability, or a list of them.
*/
row
: ability
| ability_list
;

0 comments on commit b523ef8

Please sign in to comment.