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.
1634 1635 1636 |
# File 'lib/idl/ast.rb', line 1634 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
1639 |
# File 'lib/idl/ast.rb', line 1639 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.
1642 |
# File 'lib/idl/ast.rb', line 1642 def execute_unknown(symtab); end |
#rhs ⇒ AstNode
Returns Right-hand side expression.
1632 |
# File 'lib/idl/ast.rb', line 1632 def rhs = children[0] |
#to_idl ⇒ String
Return valid IDL representation of the node (and its subtree)
1655 |
# File 'lib/idl/ast.rb', line 1655 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
1652 |
# File 'lib/idl/ast.rb', line 1652 def type(symtab) = symtab.xreg_type |
#type_check(symtab) ⇒ void
1645 1646 |
# File 'lib/idl/ast.rb', line 1645 def type_check(symtab) end |
#value(symtab) ⇒ Object
Return the compile-time-known value of the node
1649 |
# File 'lib/idl/ast.rb', line 1649 def value(symtab) = value_error "$pc is never statically known" |