Merge branch 'charm' into abecker/charj-main
authorAaron Becker <akbecker@gmail.com>
Wed, 26 May 2010 06:42:43 +0000 (01:42 -0500)
committerAaron Becker <akbecker@gmail.com>
Wed, 26 May 2010 06:42:43 +0000 (01:42 -0500)
Conflicts:
src/langs/charj/src/charj/translator/CharjSemantics.g

1  2 
src/langs/charj/src/charj/translator/CharjSemantics.g

index e5ba5baed859b6a0a559686991ca45154d9e532f,7cc3e65ed5ae14992ee5c87ee1a2983c24123981..f3b61174717b4e15b27117d48cf227269edd01ac
@@@ -270,34 -255,22 +270,36 @@@ typ
      |   VOID
      ;
  
 -simpleType
 +simpleType returns [ClassSymbol type]
-     :   ^(TYPE primitiveType arrayDeclaratorList?)
+     :   ^(SIMPLE_TYPE primitiveType arrayDeclaratorList?)
 +        {
 +            $type = symtab.resolveBuiltinType($primitiveType.text);
 +        }
      ;
      
 -objectType
 +objectType returns [ClassSymbol type]
-     :   ^(TYPE qualifiedTypeIdent arrayDeclaratorList?)
+     :   ^(OBJECT_TYPE qualifiedTypeIdent arrayDeclaratorList?)
+     |   ^(REFERENCE_TYPE qualifiedTypeIdent arrayDeclaratorList?)
+     |   ^(POINTER_TYPE qualifiedTypeIdent arrayDeclaratorList?)
 +        {
 +            /*
 +            System.out.println("Resolving type: " + $qualifiedTypeIdent.name);
 +            $type = currentClass.resolveType($qualifiedTypeIdent.name);
 +            if ($type == null) $type = symtab.resolveBuiltinType($qualifiedTypeIdent.name);
 +            */
 +        }
      ;
  
 -qualifiedTypeIdent
 -    :   ^(QUALIFIED_TYPE_IDENT typeIdent+) 
 +qualifiedTypeIdent returns [String name]
 +@init {
 +$name = "";
 +}
 +    :   ^(QUALIFIED_TYPE_IDENT (typeIdent {$name += $typeIdent.name;})+) 
      ;
  
 -typeIdent
 +typeIdent returns [String name]
      :   ^(IDENT genericTypeArgumentList?)
 +        { $name = $IDENT.text; }
      ;
  
  primitiveType