예제 #1
0
 public void Whitespace(Lexer obj, char c)
 {
     obj.Operator_Whitespace(c);
 }
예제 #2
0
 public void Letter(Lexer obj, char c)
 {
     obj.Operator_Letter(c);
 }
예제 #3
0
 public void Operator(Lexer obj, char c)
 {
     obj.Operator_Operator(c);
 }
예제 #4
0
 public void Whitespace(Lexer obj, char c)
 {
     obj.Number_Whitespace(c);
 }
예제 #5
0
 public void Digit(Lexer obj, char c)
 {
     obj.Operator_Digit(c);
 }
예제 #6
0
 public void Digit(Lexer obj, char c)
 {
     obj.Number_Digit(c);
 }
예제 #7
0
 public void Letter(Lexer obj, char c)
 {
     obj.Number_Letter(c);
 }
예제 #8
0
 public void Whitespace(Lexer obj, char c)
 {
     obj.Idle_Whitespace(c);
 }
예제 #9
0
 public void Whitespace(Lexer obj, char c)
 {
     throw new System.InvalidOperationException("The 'Lexer' object is in the intermediate state.");
 }
예제 #10
0
 public void Digit(Lexer obj, char c)
 {
     obj.Idle_Digit(c);
 }
예제 #11
0
 public void Letter(Lexer obj, char c)
 {
     obj.Idle_Letter(c);
 }
예제 #12
0
 public void Whitespace(Lexer obj, char c)
 {
     obj.Identifier_Whitespace(c);
 }
예제 #13
0
 public void Operator(Lexer obj, char c)
 {
     obj.Identifier_Operator(c);
 }
예제 #14
0
 public void Letter(Lexer obj, char c)
 {
     obj.Identifier_Letter(c);
 }
예제 #15
0
 public void Digit(Lexer obj, char c)
 {
     obj.Identifier_Digit(c);
 }
예제 #16
0
        public static List<Token> Lex(string text)
        {
            IEnumerator<char> _it168 = null;
            char c = default(char);
            // item 167
            Lexer lexer = new Lexer();
            // item 1680001
            _it168 = ((IEnumerable<char>)text).GetEnumerator();
            while (true) {
            // item 1680002
            if (_it168.MoveNext()) {

            } else {
                break;
            }
            // item 1680004
            c = _it168.Current;
            // item 172
            if (c == '_') {
                // item 181
                lexer.Letter(c);
            } else {
                // item 175
                if (Char.IsLetter(c)) {
                    // item 181
                    lexer.Letter(c);
                } else {
                    // item 178
                    if (Char.IsDigit(c)) {
                        // item 182
                        lexer.Digit(c);
                    } else {
                        // item 183
                        if (lexer.IsOperator(c)) {
                            // item 186
                            lexer.Operator(c);
                        } else {
                            // item 187
                            lexer.Whitespace(' ');
                        }
                    }
                }
            }
            }
            // item 171
            lexer.Whitespace(' ');
            // item 170
            return lexer.Tokens;
        }