sig/lrama/grammar/rule_builder.rbs in lrama-0.6.0 vs sig/lrama/grammar/rule_builder.rbs in lrama-0.6.1
- old
+ new
@@ -1,39 +1,42 @@
module Lrama
class Grammar
class RuleBuilder
attr_accessor lhs: Lexer::Token
- attr_accessor lhs_tag: untyped
attr_accessor line: Integer?
+ attr_reader lhs_tag: Lexer::Token::Tag?
attr_reader rhs: Array[Lexer::Token]
attr_reader user_code: Lexer::Token::UserCode?
attr_reader precedence_sym: Lexer::Token?
@rule_counter: Counter
@midrule_action_counter: Counter
@position_in_original_rule_rhs: Integer?
@skip_preprocess_references: bool
@user_code: Lexer::Token::UserCode?
+ @rule_builders_for_parameterizing_rules: Array[RuleBuilder]
@rule_builders_for_derived_rules: Array[RuleBuilder]
@rules: Array[Rule]
@replaced_rhs: Array[Lexer::Token]
@parameterizing_rules: Array[Rule]
+ @old_parameterizing_rules: Array[Rule]
@midrule_action_rules: Array[Rule]
- def initialize: (Counter rule_counter, Counter midrule_action_counter, ?Integer position_in_original_rule_rhs, ?skip_preprocess_references: bool) -> void
+ def initialize: (Counter rule_counter, Counter midrule_action_counter, ?Integer position_in_original_rule_rhs, ?lhs_tag: Lexer::Token::Tag?, ?skip_preprocess_references: bool) -> void
def add_rhs: (Lexer::Token rhs) -> void
- def user_code=: (Lexer::Token::UserCode user_code) -> void
- def precedence_sym=: (Lexer::Token user_code) -> void
+ def user_code=: (Lexer::Token::UserCode? user_code) -> void
+ def precedence_sym=: (Lexer::Token? precedence_sym) -> void
def complete_input: () -> void
- def setup_rules: (Grammar::ParameterizingRuleResolver parameterizing_resolver) -> void
+ def setup_rules: (Grammar::ParameterizingRule::Resolver parameterizing_rule_resolver) -> void
def rules: () -> Array[Rule]
private
def freeze_rhs: () -> void
def preprocess_references: () -> void
def build_rules: () -> void
- def process_rhs: (Grammar::ParameterizingRuleResolver parameterizing_resolver) -> void
+ def process_rhs: (Grammar::ParameterizingRule::Resolver parameterizing_rule_resolver) -> void
+ def lhs_s_value: (Lexer::Token::InstantiateRule token, Grammar::Binding bindings) -> String
def numberize_references: () -> void
def flush_user_code: () -> void
end
end
end