Charj: Dereference array on access, assuming it is always a pointer.
authorJonathan Lifflander <jliffl2@illinois.edu>
Sat, 3 Jul 2010 21:56:20 +0000 (16:56 -0500)
committerJonathan Lifflander <jliffl2@illinois.edu>
Sat, 3 Jul 2010 21:56:20 +0000 (16:56 -0500)
src/langs/charj/src/charj/translator/CharjEmitter.g

index f6b98f963ea8094b3bc3ae9e318f67f568fa46b5..5a6ddbc1db22283b668fabb3dfe3421956d9778a 100644 (file)
@@ -858,7 +858,7 @@ primaryExpression
     |   explicitConstructorCall
         -> {$explicitConstructorCall.st}
     |   ^(ARRAY_ELEMENT_ACCESS pe=primaryExpression ex=expression)
-        -> template(pe={$pe.st}, ex={$ex.st}) "<pe>[<ex>]"
+        -> template(pe={$pe.st}, ex={$ex.st}) "(*(<pe>))[<ex>]"
     |   literal
         -> {$literal.st}
     |   newExpression[null, false]