diff --git a/lib/lrama/states.rb b/lib/lrama/states.rb index 0ed4bff9..f56b0e9b 100644 --- a/lib/lrama/states.rb +++ b/lib/lrama/states.rb @@ -41,6 +41,8 @@ def initialize(grammar, trace_state: false) # value is array of [state.id, nterm.token_id]. @reads_relation = {} + # `Read(p, A) =s DR(p, A) ∪ ∪{Read(r, C) | (p, A) reads (r, C)}` + # # `@read_sets` is a hash whose # key is [state.id, nterm.token_id], # value is bitmap of term. @@ -62,6 +64,8 @@ def initialize(grammar, trace_state: false) # value is array of [state.id, nterm.token_id]. @lookback_relation = {} + # `Follow(p, A) =s Read(p, A) ∪ ∪{Follow(p', B) | (p, A) includes (p', B)}` + # # `@follow_sets` is a hash whose # key is [state.id, rule.id], # value is bitmap of term.