require 'parslet' module Shift module Parser include Parslet rule(:assignment_statement) { variables.as(:left) >> assignment_operator >> (integer_casted_expression | value_returning_expression).as(:right)} rule(:void_statements) { url.as(:url) | url_method | model_definition | control_statement | assignment_statement.as(:assignment_statement) | write_file_statement.as(:write_file_statement) | write_statement.as(:write_statement) | redirect_statement.as(:redirect_statement) } end end