Method: Stupidedi::Builder::InitialState.build
- Defined in:
- lib/stupidedi/builder/states/initial_state.rb
.build(zipper) ⇒ InitialState
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/stupidedi/builder/states/initial_state.rb', line 43 def build(zipper) new( Reader::Separators.empty, Reader::SegmentDict.empty, InstructionTable.build( # We initially accept only a single segment. When reading the "ISA" # segment, we push a new InterchangeState. Instruction.new(:ISA, nil, 0, 0, TransmissionState).cons), # Create a new parse tree with a Transmission as the root, and descend # to the placeholder where the first child node will be placed. zipper.build(Values::TransmissionVal.new), []) end |