diff options
author | Adrian Thurston <thurston@complang.org> | 2015-11-01 10:35:19 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-11-01 10:35:19 -0500 |
commit | 80b9fc661abe6f37853bc12889f0443a1d6c65a9 (patch) | |
tree | 156be0111d93e2b5f3ae56c41d2bc4bb5ef47e8c /src/colm.lm | |
parent | 0b175a8ed019785233618b3bb8e3c064e567f2ec (diff) | |
download | colm-80b9fc661abe6f37853bc12889f0443a1d6c65a9.tar.gz |
allow access to rhs elements by number
Diffstat (limited to 'src/colm.lm')
-rw-r--r-- | src/colm.lm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/colm.lm b/src/colm.lm index a74e53c9..9401ad47 100644 --- a/src/colm.lm +++ b/src/colm.lm @@ -364,6 +364,9 @@ lex token RED_RHS_REF / '$' . red_id / token RED_RHS_LOC / '@' . red_id / + token RED_RHS_NREF / '$' . ('1' .. '9') . ('0' .. '9')* / + token RED_RHS_NLOC / '@' . ('1' .. '9') . ('0' .. '9')* / + token red_any / any / end @@ -382,6 +385,8 @@ def host_item | [RED_LHS] | [RED_RHS_REF] | [RED_RHS_LOC] +| [RED_RHS_NREF] +| [RED_RHS_NLOC] | [RED_OPEN HostItems: host_item* RED_CLOSE] def reduction_item |