internal PPRuleToken(XSharpToken token, PPTokenType type)
 {
     _token   = token;
     _key     = token.Text;
     _type    = type;
     IsRepeat = false;
 }
Esempio n. 2
0
 public PPToken(PPTokenType _type, String _str)
 {
     type = _type;
     str  = _str;
     pos  = 0;
     line = 0;
 }
Esempio n. 3
0
 internal static bool HasSingleStopToken(this PPTokenType value)
 {
     switch (value)
     {
     case PPTokenType.MatchRegular:
     case PPTokenType.MatchExtended:
         return(true);;
     }
     return(false);
 }
Esempio n. 4
0
 internal static bool HasStopTokens(this PPTokenType value)
 {
     switch (value)
     {
     case PPTokenType.MatchList:
     case PPTokenType.MatchLike:
     case PPTokenType.MatchWild:
         return(true);;
     }
     return(false);
 }
 internal static PPTokenType GetTokenType(this PPTokenType type)
 {
     return((PPTokenType)((int)type & 0x0F));
 }
 internal static bool IsOptional(this PPTokenType type)
 {
     return(type == PPTokenType.MatchOptional ||
            type == PPTokenType.ResultOptional);
 }
 internal PPResultToken(XSharpToken token, PPTokenType type, string key) : this(token, type)
 {
     _key = key;
 }
 internal PPResultToken(XSharpToken token, PPTokenType type) : base(token, type)
 {
     MatchMarker = null;
 }
 }                                // Index in the flattened matchmarker list
 #endregion
 internal PPMatchToken(XSharpToken token, PPTokenType type) : base(token, type)
 {
     Children = null;
     Index    = -1;
 }