class Noise::Lang::Parser
- Noise::Lang::Parser
- Reference
- Object
Defined in:
lang/parser.crConstant Summary
-
STOPWORDS =
['+', '-', '*', '/', '[', ']', '(', ')']
-
WHITESPACE =
['\n', '\t', '\r', ' ']
Constructors
Class Method Summary
-
.lex(io) : Array(String)
Naive tokenizer
Instance Method Summary
-
#expression : AST::Expression
Parse an expression Naive recursive descent state machine parser: It first extract all operators and operands in order Then reduce them following operator priorities.
- #next_token : String | Nil
- #parameter(name) : AST::Parameter
- #parameter_dimension_alias(dimension : String | Nil) : UInt32 | Nil
Constructor Detail
Class Method Detail
Instance Method Detail
def expression : AST::Expression
#
Parse an expression Naive recursive descent state machine parser: It first extract all operators and operands in order Then reduce them following operator priorities.