diff options
Diffstat (limited to 'test/colm.d/func3.lm')
-rw-r--r-- | test/colm.d/func3.lm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/colm.d/func3.lm b/test/colm.d/func3.lm new file mode 100644 index 00000000..d0e323c1 --- /dev/null +++ b/test/colm.d/func3.lm @@ -0,0 +1,39 @@ +lex + literal `{ `} + literal `struct `type + token id /[A-Za-z_][A-Za-z_0-9]*/ + ignore /[ \t\r\n]+/ +end + +def attribute + [`type id] + +def _struct + [`struct id `{ attribute* `}] + +def program + [_struct*] + +int func( P: program ) +{ + print[ @ P ] +} + +int main() +{ + parse P: program[ stdin ] + func( P ) +} + +main() + +##### IN ##### +struct S +{ + type T +} +##### EXP ##### +struct S +{ + type T +} |