diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-18 16:59:32 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-18 16:59:32 -0500 |
commit | 7c402fcd65b36a20c8f7059b551e99212fa4adae (patch) | |
tree | 852717acbe7385d5e981847cdef1d1b4ad943fab /test | |
parent | e295b7169e3e234994202322737e0e2a337c9311 (diff) | |
download | colm-7c402fcd65b36a20c8f7059b551e99212fa4adae.tar.gz |
some cleanup in the pointer
Diffstat (limited to 'test')
-rw-r--r-- | test/pointer1.lm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/pointer1.lm b/test/pointer1.lm new file mode 100644 index 00000000..38677bd2 --- /dev/null +++ b/test/pointer1.lm @@ -0,0 +1,34 @@ +struct undo + + lex + ignore /( ' ' | '\t')+/ + literal `* `( `) `^ `; + token NL /'\n'/ + token id /[a-zA-Z_]+/ + end + + struct foo + Start: start + end + + def item + [id] + | [`( item* `)] + + def start + Foo: foo + [item* `; NL] + +end + +Undo: undo = new undo + +parse Input: undo::start(Undo)[ stdin ] + +Input.Foo = new undo::foo +Input.Foo->Start = Input +print( Input.Foo->Start ) +###### IN ###### +a b c ( d e ) f; +###### EXP ###### +a b c ( d e ) f; |