@@ -107,7 +107,7 @@ public class ParserState: P4Type, P4Value, Equatable, CustomStringConvertible {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Instantiated Parser State
|
/// Instantiated Parser State
|
||||||
///
|
///
|
||||||
/// A parser state is both a type and a value. The Instantiated
|
/// A parser state is both a type and a value. The Instantiated
|
||||||
/// Parser State is the base class for parser states that act more
|
/// Parser State is the base class for parser states that act more
|
||||||
/// as a value than a type.
|
/// as a value than a type.
|
||||||
|
|||||||
@@ -121,8 +121,10 @@ extension Parser: ParserExecution {
|
|||||||
public func execute(execution: ProgramExecution) -> (InstantiatedParserState, ProgramExecution) {
|
public func execute(execution: ProgramExecution) -> (InstantiatedParserState, ProgramExecution) {
|
||||||
var execution = execution.enter_scope()
|
var execution = execution.enter_scope()
|
||||||
|
|
||||||
execution = execution.declare(identifier: AsInstantiatedParserState(accept.state()).state, withValue: accept)
|
execution = execution.declare(
|
||||||
execution = execution.declare(identifier: AsInstantiatedParserState(reject.state()).state, withValue: reject)
|
identifier: AsInstantiatedParserState(accept.state()).state, withValue: accept)
|
||||||
|
execution = execution.declare(
|
||||||
|
identifier: AsInstantiatedParserState(reject.state()).state, withValue: reject)
|
||||||
|
|
||||||
// Add initial values to the global scope
|
// Add initial values to the global scope
|
||||||
if let initial = execution.initial_values() {
|
if let initial = execution.initial_values() {
|
||||||
|
|||||||
Reference in New Issue
Block a user