next up previous
Next: Method names Up: Disambiguating names Previous: Type names

Expression names

Expression names[8]:
RULE: ExpressionStatement ::= Name $pExpressionName
        '.' 'super' '(' Arguments ')' ';' COMPUTE
  pExpressionName.GENTREE=TP_tpExpressionName(Name.tp);
END;

RULE: Expression ::= Name $pExpressionName '[' Expression ']' COMPUTE
  pExpressionName.GENTREE=TP_tpExpressionName(Name.tp);
END;

TREE SYMBOL Expression:
  IsCastType: int,
  tp: TPNode;

TREE SYMBOL Expression COMPUTE
  SYNT.tp=TPNULL;
  INH.IsCastType=0;
END;

RULE: Expression ::= Name $pExpressionName COMPUTE
  Expression.tp=IF(Expression.IsCastType,Name.tp,TPNULL);
  pExpressionName.GENTREE=
    IF(Expression.IsCastType,
      Mknexpnm(COORDREF),
      TP_tpExpressionName(Name.tp));
END;

RULE: LeftHandSide ::= Name $pExpressionName COMPUTE
  pExpressionName.GENTREE=TP_tpExpressionName(Name.tp);
END;

RULE nexpnm: pExpressionName ::=                           END;
RULE sexpnm: pExpressionName ::=                sExprIdUse END;
RULE qexpnm: pExpressionName ::= pAmbiguousName qExprIdUse END;

RULE sexpid: sExprIdUse ::= Identifier END;
RULE qexpid: qExprIdUse ::= Identifier END;
This macro is invoked in definition 3.

Tree parsing rules[9]:
tpExpressionName ::= tpId(int): mksexpnm;
tpExpressionName ::= tpDot(tpAmbiguousName,int): mkqexpnm;
This macro is defined in definitions 5, 9, 12, 15, and 19.
This macro is invoked in definition 18.

Tree parsing actions[10]:
#define mksexpnm(x)\
  Mksexpnm(NoPosition,Mksexpid(NoPosition,x))
#define mkqexpnm(x,y)\
  Mkqexpnm(NoPosition,x,Mkqexpid(NoPosition,y))
This macro is defined in definitions 6, 10, 13, and 16.
This macro is invoked in definition 21.


next up previous
Next: Method names Up: Disambiguating names Previous: Type names
2008-09-11