summaryrefslogtreecommitdiff
path: root/src/cgil/rlhc-crack.lm
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2021-09-21 20:29:24 -0700
committerAdrian Thurston <thurston@colm.net>2021-09-21 20:33:03 -0700
commit47274bbc4915e6e99327e92c5189d8a7b3900f71 (patch)
treeb9e9d62bfd21586c74f38a279a2a3c3479bbe2b8 /src/cgil/rlhc-crack.lm
parente88bda068d4a25f2afa7f48821e0f539405c8c6a (diff)
downloadcolm-47274bbc4915e6e99327e92c5189d8a7b3900f71.tar.gz
allow the base expression in deref and offset to be an expression
Previously allowed only identifier as the base. This is necessary to use the generated DATA() as the base in these expressions, which can be modified by access and therefore must be an expression.
Diffstat (limited to 'src/cgil/rlhc-crack.lm')
-rw-r--r--src/cgil/rlhc-crack.lm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cgil/rlhc-crack.lm b/src/cgil/rlhc-crack.lm
index bebe7cd5..75358a30 100644
--- a/src/cgil/rlhc-crack.lm
+++ b/src/cgil/rlhc-crack.lm
@@ -117,15 +117,15 @@ namespace crack_gen
send Parser
"[I]\[[expr( E )]\]"
}
- case [`offset `( ident `, expr `)]
+ case [`offset `( Base: expr `, Offset: expr `)]
{
send Parser
- [expr( ExprFactor.expr )]
+ [expr( Offset )]
}
- case [`deref `( ident `, expr `)]
+ case [`deref `( Base: expr `, Offset: expr `)]
{
send Parser
- [ ExprFactor.ident '[' expr( ExprFactor.expr ) ']']
+ [ expr( Base ) '[' expr( Offset ) ']']
}
case [`TRUE]
{