示例#1
0
 private static int MatchInteger(string text)
 {
     return(LexerExtensions.MatchAllChars(text,
                                          c => LexerExtensions.MatchRange(c, '0', '9')));
 }
示例#2
0
 private static int MatchSpaces(string text)
 {
     return(LexerExtensions.MatchAllChars(text, char.IsWhiteSpace));
 }
示例#3
0
 private static int MatchIdentifier(string text)
 {
     return(LexerExtensions.MatchAllChars(text,
                                          c => char.IsLetter(c) || c == '_',
                                          c => char.IsLetterOrDigit(c) || c == '_'));
 }