Class: Idl::PcAssignmentAst
- Includes:
- Executable
- Defined in:
- lib/idl/ast.rb
Instance Method Summary collapse
-
#execute(symtab) ⇒ void
“execute” the statement by updating the variables in the symbol table.
-
#execute_unknown(symtab) ⇒ void
“execute” the statement, forcing any variable assignments to an unknown state This is used down unknown conditional paths.
-
#initialize(input, interval, rval) ⇒ PcAssignmentAst
constructor
A new instance of PcAssignmentAst.
-
#rhs ⇒ AstNode
Right-hand side expression.
-
#to_idl ⇒ String
Return valid IDL representation of the node (and its subtree).
-
#type(symtab) ⇒ Type
Given a specific symbol table, return the type of this node.
-
#type_check(symtab) ⇒ void
type check this node and all children.
-
#value(symtab) ⇒ Object
Return the compile-time-known value of the node.
Constructor Details
#initialize(input, interval, rval) ⇒ PcAssignmentAst
Returns a new instance of PcAssignmentAst.
1629 1630 1631 |
# File 'lib/idl/ast.rb', line 1629 def initialize(input, interval, rval) super(input, interval, [rval]) end |
Instance Method Details
#execute(symtab) ⇒ void
This method returns an undefined value.
“execute” the statement by updating the variables in the symbol table
1634 |
# File 'lib/idl/ast.rb', line 1634 def execute(symtab) = value_error "$pc is never statically known" |
#execute_unknown(symtab) ⇒ void
This method returns an undefined value.
“execute” the statement, forcing any variable assignments to an unknown state This is used down unknown conditional paths.
1637 |
# File 'lib/idl/ast.rb', line 1637 def execute_unknown(symtab); end |
#rhs ⇒ AstNode
Returns Right-hand side expression.
1627 |
# File 'lib/idl/ast.rb', line 1627 def rhs = children[0] |
#to_idl ⇒ String
Return valid IDL representation of the node (and its subtree)
1650 |
# File 'lib/idl/ast.rb', line 1650 def to_idl = "$pc = #{rhs.to_idl}" |
#type(symtab) ⇒ Type
Given a specific symbol table, return the type of this node.
Should not be called until #type_check is called with the same arguments
1647 |
# File 'lib/idl/ast.rb', line 1647 def type(symtab) = symtab.xreg_type |
#type_check(symtab) ⇒ void
1640 1641 |
# File 'lib/idl/ast.rb', line 1640 def type_check(symtab) end |
#value(symtab) ⇒ Object
Return the compile-time-known value of the node
1644 |
# File 'lib/idl/ast.rb', line 1644 def value(symtab) = value_error "$pc is never statically known" |