diff options
author | Adrian Thurston <thurston@complang.org> | 2013-03-20 21:53:13 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2013-03-20 21:53:13 -0400 |
commit | 083912ecea176c54e06db5667f251e902a6de55c (patch) | |
tree | 8a2e3d2a1bbeb6a1f6473c6d74e795d404a2dbce /colm/colm.lm | |
parent | a47b8090b381d747d5cb6d305ecdf5c965d94c08 (diff) | |
download | colm-083912ecea176c54e06db5667f251e902a6de55c.tar.gz |
some work on context definitions
Diffstat (limited to 'colm/colm.lm')
-rw-r--r-- | colm/colm.lm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/colm/colm.lm b/colm/colm.lm index b6610fa6..f58f3510 100644 --- a/colm/colm.lm +++ b/colm/colm.lm @@ -15,6 +15,7 @@ lex token IN / 'in' / token LITERAL /'literal'/ + token CONTEXT /'context'/ token NI /'ni'/ token NIL / 'nil' / @@ -107,7 +108,7 @@ def root_item | [IgnoreDef: ignore_def] | [CflDef: cfl_def] | [RegionDef: region_def] -#| [context_def] +| [ContextDef: context_def] | [NamespaceDef: namespace_def] #| [function_def] #| [iter_def] @@ -118,6 +119,24 @@ def root_item #| [precedence] #| [typedef] +def context_item +# [context_var_def] + [LiteralDef: literal_def] +#| [rl_def] +| [TokenDef: token_def] +| [IgnoreDef: ignore_def] +| [CflDef: cfl_def] +| [RegionDef: region_def] +| [ContextDef: context_def] +#| [function_def] +#| [iter_def] +#| [export_def] +#| [pre_eof] +#| [precedence] + +def context_def + [CONTEXT Name: id ContextItemList: context_item* END] + def literal_def [LITERAL LiteralList: literal_list] |