public override void AddInternalTransition(string theEvent, SyntaxLocation loc)
 {
     // An internal transition is simply a transition which stays inside
     // its current state.  We are modeling it here as a regular transition
     // whose "theNextState" field is blank.
     AddTransition(theEvent, "", loc);
 }
Пример #2
0
 public void Error(SyntaxLocation loc, string theString)
 {
     if (this.ErrorManager != null)
     {
         this.ErrorManager.Error(loc, theString);
     }
 }
Пример #3
0
 public StateRep(string theName, SyntaxLocation loc)
 {
     this.name           = theName;
     this.syntaxLocation = loc;
     this.builtEvents    = new HashSet <string>();
     this.entryActions   = new List <string>();
     this.exitActions    = new List <string>();
 }
Пример #4
0
 public TransitionRep(string startState, string eventName, string endState, SyntaxLocation loc)
 {
     this.startingState  = startState;
     this.eventName      = eventName;
     this.endingState    = endState;
     this.syntaxLocation = loc;
     this.actions        = new List <string>();
 }
 public override void AddTransition(string theEvent, string theNextState, SyntaxLocation loc)
 {
     this.itsCurrentTransition = new TransitionRep(this.itsCurrentState, theEvent, theNextState, loc);
     this.itsTransitions.Add(this.itsCurrentTransition);
 }
 public override void AddState(string theName, SyntaxLocation loc)
 => AddStateRep(new NormalStateRep(theName, loc));
 public override void AddSubState(string theName, string theSuperState, SyntaxLocation loc)
 => AddStateRep(new SubStateRep(theName, theSuperState, loc));
Пример #8
0
 public abstract void AddInternalTransition(string theEvent, SyntaxLocation loc);
Пример #9
0
 public abstract void AddTransition(string theEvent, string theNextState, SyntaxLocation loc);
Пример #10
0
 public abstract void AddState(string theName, SyntaxLocation loc);
Пример #11
0
 public abstract void AddSubState(string theName, string theSuperState, SyntaxLocation loc);
Пример #12
0
 public SubStateRep(string theName, string theSuper, SyntaxLocation loc)
     : base(theName, loc)
 {
     this.SuperStateName = theSuper;
 }
Пример #13
0
 public void Error(SyntaxLocation loc, string s) => this.errors.Add(s);
Пример #14
0
 public SuperStateRep(string theName, SyntaxLocation loc)
     : base(theName, loc)
 {
 }
Пример #15
0
 public NormalStateRep(string theName, SyntaxLocation loc)
     : base(theName, loc)
 {
 }