Attribute Grammar

Attributes

Symbol Attribute Name Java Type Inherited/Synthesized Description
 
 
 

Rules

Node Predicates Semantic Functions
programvarDefinition* statement*
varDefinitiontype name:string
intType:type → ε
floatType:type → ε
print:statementexpression
assignment:statementleft:expression right:expression
arithmetic:expressionleft:expression operator:string right:expression
variable:expressionname:string
intLiteral:expressionintValue:int
floatLiteral:expressionfloatValue:float

Operators samples (cut & paste if needed):
⇒ ⇔ ≠ ∅ ∈ ∉ ∪ ∩ ⊂ ⊄ ∑ ∃ ∀