diff options
Diffstat (limited to 'test/construct3.lm')
-rw-r--r-- | test/construct3.lm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/construct3.lm b/test/construct3.lm new file mode 100644 index 0000000..8edb038 --- /dev/null +++ b/test/construct3.lm @@ -0,0 +1,19 @@ +##### LM ##### + +lex + ignore /[ \t\n]+/ + token id /[a-z0-9]+/ + literal `, `. `* `( `) +end + +def bigger [`( item* `)] + +def item [id] | [bigger] + +def lang [item*] + +B: bigger = construct bigger "( b1 b2 )" +print( construct lang "a [B] c" '\n' ) + +##### EXP ##### +a ( b1 b2 ) c |