class Lexer
- Lexer
- Reference
- Object
Defined in:
lexer.crConstant Summary
-
SIMPLE_TOKENS =
{'.' => "dot", '*' => "star", ']' => "rbracket", ',' => "comma", ':' => "colon", '@' => "current", '(' => "lparen", ')' => "rparen", '{' => "lbrace", '}' => "rbrace"}
-
START_IDENTIFIER =
((Set.new('a'..'z')) + (Set.new('A'..'Z'))) + Set {'_'}
-
VALID_IDENTIFIER =
START_IDENTIFIER + (Set.new('0'..'9'))
-
VALID_NUMBER =
Set.new('0'..'9')
-
WHITESPACE =
Set {' ', '\t', '\n', '\r'}
Constructors
Instance Method Summary
- #chars : Array(Char)
- #chars=(chars : Array(Char))
- #current : Char | Nil
- #current=(current : Char | Nil)
- #expression : String
- #expression=(expression : String)
- #length : Int32
- #length=(length : Int32)
- #position : Int32
- #position=(position : Int32)
- #tokenize(expression : String) : Array(Token)