Esempio n. 1
0
 internal TokenContext()
 {
     whiteSpaceState          = new WhiteSpaceState(this);
     punctuationState         = new PunctuationState(this);
     alphaNumericState        = new AlphaNumericState(this);
     newLineState             = new NewLineState(this);
     singleLineCommentState   = new SingleLineCommentState(this);
     multipleLineCommentState = new MultipleLineCommentState(this);
     singleQouteState         = new SingleQouteState(this);
     doubleQuoteState         = new DoubleQuoteState(this);
     //more to come
     currentTokenState = whiteSpaceState;
 }
Esempio n. 2
0
 internal TokenContext()
 {
     ws_ = new WhiteSpaceState(this);
     ps_ = new PunctState(this);
     as_ = new AlphaState(this);
     // more states here
     cs_             = new CommentState(this);
     mcs_            = new MultiCommentState(this);
     qs_             = new QStringState(this);
     ssc_            = new SingleSpecialChar(this);
     sqs_            = new SQStringState(this);
     dscs_           = new DoubleSpecialCharState(this);
     nls_            = new NewLineState(this);
     currentState_   = ws_;
     singlespec_char = new List <char> {
         '<', '>', '[', ']', '(', ')', '{', '}', ':', '=', '+', '-', '*'
     };
     doublespec_char = new List <string> {
         "<<", ">>", "::", "++", "--", "==", "+=", "-=", "*=", "/=", "&&", "||"
     };
 }