Skip to content

Commit

Permalink
Organize rbs for Lrama::Grammar::RuleBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Nov 16, 2023
1 parent e4fe386 commit ac9e0ef
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions sig/lrama/grammar/rule_builder.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,35 @@ module Lrama
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_derived_rules: Array[RuleBuilder]
@rules: Array[Rule]
@replaced_rhs: Array[Lexer::Token]
@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 add_rhs: (Lexer::Token rhs) -> void
def user_code=: (Lexer::Token::UserCode user_code) -> void
def precedence_sym=: (Lexer::Token user_code) -> void
def complete_input: () -> void
def setup_rules: () -> void
def preprocess_references: () -> void
def parameterizing_rules: () -> Array[Rule]
def midrule_action_rules: () -> Array[Rule]
def rhs_with_new_tokens: () -> Array[Lexer::Token]
def rules: () -> Array[Rule]

private

def freeze_rhs: () -> void
def preprocess_references: () -> void
def build_rules: () -> void
def process_rhs: () -> void
def numberize_references: () -> void
def setup_references: () -> void
def flush_user_code: () -> void
def build_rules: () -> void
end
end
end

0 comments on commit ac9e0ef

Please sign in to comment.