Serialized Form
filename
java.lang.String filename
line
int line
column
int column
Package antlraux.context.types |
Package antlraux.context.asts |
LValue
boolean LValue
- An expression with left value set to true can be put on the
left sign of an assignation; otherwise, they can't. An example
of expression with LValue is a variable:
a = 3;
An expression without LValue could be a literal or an addition:
"Hello"="world"; // Incorrect; "Hello" does not have LValue
a+b = c; // Incorrect: a+b has no LValue
Keep in mind that these are examples. Of course your languajes
could consider having literals with lvalues...
RValue
boolean RValue
- An expression with no Rvalue cannot be used on the right side
of an assignation, because they are not "readable".
The typical example is an invocation to a method that returns
nothing:
void voidFunction() {...}
...
int a = voidFunction(); // Incorrect; Rvalue required
Of course this is an example. Some languajes might find useful
setting LValue to true in this kind of function calls (thus
recuperating a void value).
EValue
java.lang.Object EValue
- This is a calculated value. Some initializations
must be calculated in compile-time; for example static
attribute initialization:
class MyDumbClass{
public int staticInt = 1+5+6;
}
The value for literal "1" will be the integer 1, the value
for literal "5" will be the integer 5, and the value for
"6" will the the integer 6. This way, "1+5+6" can be evaluated
in compile time (and set to 12).
Other use for this field is in iterpreters: The only way
of calculating values is having them dynamically stored in
the ASTs.
scope
Scope scope
expType
Type expType
exception
java.lang.Exception exception
Created by Enrique José García Cota