summaryrefslogtreecommitdiff
path: root/colm/colm.lm
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-03-24 13:13:27 -0400
committerAdrian Thurston <thurston@complang.org>2013-03-24 13:13:27 -0400
commit745a5926fbdbc74fcc50c2ad45029fc711525253 (patch)
treecb0342e76ff5bc7f015e7209e0ead366ece314cc /colm/colm.lm
parent154fb40e261e80d39fa8711208bab9886953f923 (diff)
downloadcolm-745a5926fbdbc74fcc50c2ad45029fc711525253.tar.gz
implemented include
Diffstat (limited to 'colm/colm.lm')
-rw-r--r--colm/colm.lm7
1 files changed, 6 insertions, 1 deletions
diff --git a/colm/colm.lm b/colm/colm.lm
index 9465ec9e..e173b34e 100644
--- a/colm/colm.lm
+++ b/colm/colm.lm
@@ -58,6 +58,7 @@ lex
token RIGHT /'right'/
token NONASSOC /'nonassoc'/
+ token INCLUDE /'include'/
token id /
( 'a' .. 'z' | 'A' .. 'Z' | '_' ) .
@@ -197,6 +198,10 @@ def root_item
| [PreEof: pre_eof]
| [PrecedenceDef: precedence_def]
| [AliasDef: alias_def]
+| [Include: include]
+
+def include
+ [INCLUDE File: lit]
def precedence_def
[PredType: pred_type PredTokenList: pred_token_list]
@@ -233,7 +238,7 @@ def context_item
| [IterDef: iter_def]
| [ExportDef: export_def]
| [PreEof: pre_eof]
-#| [precedence]
+| [PrecedenceDef: precedence_def]
def export_def
[EXPORT VarDef: var_def OptDefInit: opt_def_init]