Sha256: a30a8ff7638477051c4c295040ce9c13445d80941b65e63517e79738f737f92e
Contents?: true
Size: 823 Bytes
Versions: 4
Compression:
Stored size: 823 Bytes
Contents
require 'parslet' module Shift module Parser include Parslet rule(:read_statement) { read_keyword >> space >> string_valued_expression.as(:read_statement_param) } rule(:string_concatenation_right_expression) { addition_operator >> space? >> string_valued_expression } rule(:string_concatenation_expression) { string_valued_expression >> space? >> string_concatenation_right_expression.repeat(0) } rule(:integer_casted_expression) { integer_cast_keyword.as(:int) >> space? >> lparen >> space? >> value_returning_expression >> space? >> rparen } rule(:value_returning_expression) { query | read_statement.as(:read_statement) | boolean_valued_expression | conditional_statement.as(:conditional_statement) | string_concatenation_expression | string_valued_expression | numeric_valued_expression } end end
Version data entries
4 entries across 4 versions & 1 rubygems