lrama 0.6.9 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yaml +24 -1
- data/.gitignore +2 -0
- data/Gemfile +6 -3
- data/NEWS.md +269 -14
- data/README.md +41 -4
- data/Rakefile +2 -0
- data/Steepfile +9 -17
- data/doc/development/compressed_state_table/main.md +635 -0
- data/doc/development/compressed_state_table/parse.output +174 -0
- data/doc/development/compressed_state_table/parse.y +22 -0
- data/doc/development/compressed_state_table/parser.rb +282 -0
- data/exe/lrama +1 -0
- data/lib/lrama/bitmap.rb +3 -1
- data/lib/lrama/command.rb +8 -14
- data/lib/lrama/context.rb +11 -9
- data/lib/lrama/counterexamples/derivation.rb +8 -5
- data/lib/lrama/counterexamples/example.rb +9 -4
- data/lib/lrama/counterexamples/path.rb +6 -0
- data/lib/lrama/counterexamples/production_path.rb +2 -0
- data/lib/lrama/counterexamples/start_path.rb +2 -0
- data/lib/lrama/counterexamples/state_item.rb +2 -0
- data/lib/lrama/counterexamples/transition_path.rb +2 -0
- data/lib/lrama/counterexamples/triple.rb +2 -0
- data/lib/lrama/counterexamples.rb +36 -24
- data/lib/lrama/diagnostics.rb +36 -0
- data/lib/lrama/digraph.rb +2 -0
- data/lib/lrama/grammar/auxiliary.rb +2 -0
- data/lib/lrama/grammar/binding.rb +12 -1
- data/lib/lrama/grammar/code/destructor_code.rb +2 -0
- data/lib/lrama/grammar/code/initial_action_code.rb +2 -0
- data/lib/lrama/grammar/code/no_reference_code.rb +2 -0
- data/lib/lrama/grammar/code/printer_code.rb +2 -0
- data/lib/lrama/grammar/code/rule_action.rb +7 -3
- data/lib/lrama/grammar/code.rb +7 -5
- data/lib/lrama/grammar/counter.rb +2 -0
- data/lib/lrama/grammar/destructor.rb +2 -0
- data/lib/lrama/grammar/error_token.rb +2 -0
- data/lib/lrama/grammar/parameterizing_rule/resolver.rb +7 -1
- data/lib/lrama/grammar/parameterizing_rule/rhs.rb +6 -3
- data/lib/lrama/grammar/parameterizing_rule/rule.rb +6 -0
- data/lib/lrama/grammar/parameterizing_rule.rb +2 -0
- data/lib/lrama/grammar/percent_code.rb +2 -0
- data/lib/lrama/grammar/precedence.rb +2 -0
- data/lib/lrama/grammar/printer.rb +2 -0
- data/lib/lrama/grammar/reference.rb +2 -0
- data/lib/lrama/grammar/rule.rb +10 -3
- data/lib/lrama/grammar/rule_builder.rb +64 -65
- data/lib/lrama/grammar/symbol.rb +2 -0
- data/lib/lrama/grammar/symbols/resolver.rb +9 -1
- data/lib/lrama/grammar/symbols.rb +2 -0
- data/lib/lrama/grammar/type.rb +2 -0
- data/lib/lrama/grammar/union.rb +2 -0
- data/lib/lrama/grammar.rb +53 -32
- data/lib/lrama/grammar_validator.rb +37 -0
- data/lib/lrama/lexer/grammar_file.rb +2 -0
- data/lib/lrama/lexer/location.rb +2 -0
- data/lib/lrama/lexer/token/char.rb +2 -0
- data/lib/lrama/lexer/token/ident.rb +2 -0
- data/lib/lrama/lexer/token/instantiate_rule.rb +2 -0
- data/lib/lrama/lexer/token/tag.rb +2 -0
- data/lib/lrama/lexer/token/user_code.rb +4 -2
- data/lib/lrama/lexer/token.rb +7 -5
- data/lib/lrama/lexer.rb +12 -8
- data/lib/lrama/{warning.rb → logger.rb} +5 -13
- data/lib/lrama/option_parser.rb +58 -33
- data/lib/lrama/options.rb +5 -2
- data/lib/lrama/output.rb +38 -69
- data/lib/lrama/parser.rb +677 -773
- data/lib/lrama/report/duration.rb +2 -0
- data/lib/lrama/report/profile.rb +2 -0
- data/lib/lrama/report.rb +4 -2
- data/lib/lrama/state/reduce.rb +4 -2
- data/lib/lrama/state/reduce_reduce_conflict.rb +2 -0
- data/lib/lrama/state/resolved_conflict.rb +3 -1
- data/lib/lrama/state/shift.rb +2 -0
- data/lib/lrama/state/shift_reduce_conflict.rb +2 -0
- data/lib/lrama/state.rb +7 -5
- data/lib/lrama/states/item.rb +5 -3
- data/lib/lrama/states.rb +18 -46
- data/lib/lrama/states_reporter.rb +60 -19
- data/lib/lrama/trace_reporter.rb +30 -0
- data/lib/lrama/version.rb +3 -1
- data/lib/lrama.rb +22 -17
- data/lrama.gemspec +3 -1
- data/parser.y +129 -237
- data/rbs_collection.lock.yaml +10 -2
- data/sig/lrama/counterexamples/derivation.rbs +33 -0
- data/sig/lrama/counterexamples/example.rbs +45 -0
- data/sig/lrama/counterexamples/path.rbs +21 -0
- data/sig/lrama/counterexamples/production_path.rbs +11 -0
- data/sig/lrama/counterexamples/start_path.rbs +13 -0
- data/sig/lrama/counterexamples/state_item.rbs +10 -0
- data/sig/lrama/counterexamples/transition_path.rbs +11 -0
- data/sig/lrama/counterexamples/triple.rbs +20 -0
- data/sig/lrama/counterexamples.rbs +29 -0
- data/sig/lrama/grammar/auxiliary.rbs +10 -0
- data/sig/lrama/grammar/binding.rbs +4 -0
- data/sig/lrama/grammar/code/destructor_code.rbs +3 -4
- data/sig/lrama/grammar/code/initial_action_code.rbs +15 -0
- data/sig/lrama/grammar/code/no_reference_code.rbs +15 -0
- data/sig/lrama/grammar/code/printer_code.rbs +3 -4
- data/sig/lrama/grammar/code/rule_action.rbs +19 -0
- data/sig/lrama/grammar/code.rbs +3 -3
- data/sig/lrama/grammar/destructor.rbs +3 -1
- data/sig/lrama/grammar/error_token.rbs +4 -2
- data/sig/lrama/grammar/parameterizing_rule/resolver.rbs +2 -1
- data/sig/lrama/grammar/parameterizing_rule/rhs.rbs +1 -1
- data/sig/lrama/grammar/precedence.rbs +3 -1
- data/sig/lrama/grammar/printer.rbs +3 -1
- data/sig/lrama/grammar/rule.rbs +35 -3
- data/sig/lrama/grammar/rule_builder.rbs +10 -9
- data/sig/lrama/grammar/symbol.rbs +6 -6
- data/sig/lrama/grammar/symbols/resolver.rbs +24 -5
- data/sig/lrama/grammar/type.rbs +2 -2
- data/sig/lrama/grammar/union.rbs +12 -0
- data/sig/lrama/grammar.rbs +104 -1
- data/sig/lrama/options.rbs +3 -2
- data/sig/lrama/state/reduce.rbs +20 -0
- data/sig/lrama/state/reduce_reduce_conflict.rbs +13 -0
- data/sig/lrama/state/resolved_conflict.rbs +14 -0
- data/sig/lrama/state/shift.rbs +14 -0
- data/sig/lrama/state/shift_reduce_conflict.rbs +13 -0
- data/sig/lrama/state.rbs +79 -0
- data/sig/lrama/states/item.rbs +30 -0
- data/sig/lrama/states.rbs +101 -0
- data/template/bison/yacc.c +24 -19
- metadata +32 -6
- data/sample/calc.output +0 -263
- data/sample/calc.y +0 -101
- data/sample/parse.y +0 -59
@@ -0,0 +1,20 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
class Reduce
|
4
|
+
@item: States::Item
|
5
|
+
@look_ahead: Array[Grammar::Symbol]?
|
6
|
+
@not_selected_symbols: Array[Grammar::Symbol]
|
7
|
+
|
8
|
+
attr_reader item: States::Item
|
9
|
+
attr_reader look_ahead: Array[Grammar::Symbol]?
|
10
|
+
attr_reader not_selected_symbols: Array[Grammar::Symbol]
|
11
|
+
attr_accessor default_reduction: bool
|
12
|
+
|
13
|
+
def initialize: (States::Item item) -> void
|
14
|
+
def rule: -> Grammar::Rule
|
15
|
+
def look_ahead=: (Array[Grammar::Symbol] look_ahead) -> Array[Grammar::Symbol]
|
16
|
+
def add_not_selected_symbol: (Grammar::Symbol sym) -> Array[Grammar::Symbol]
|
17
|
+
def selected_look_ahead: () -> (::Array[Grammar::Symbol?])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
class ReduceReduceConflict
|
4
|
+
attr_accessor symbols: Array[Grammar::Symbol]
|
5
|
+
attr_accessor reduce1: State::Reduce
|
6
|
+
attr_accessor reduce2: State::Reduce
|
7
|
+
|
8
|
+
def initialize: (?symbols: Array[Grammar::Symbol], ?reduce1: State::Reduce, ?reduce2: State::Reduce) -> void
|
9
|
+
|
10
|
+
def type: () -> :reduce_reduce
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
class ResolvedConflict
|
4
|
+
attr_accessor symbol: Grammar::Symbol
|
5
|
+
attr_accessor reduce: State::Reduce
|
6
|
+
attr_accessor which: (:reduce | :shift)
|
7
|
+
attr_accessor same_prec: bool
|
8
|
+
|
9
|
+
def initialize: (?symbol: Grammar::Symbol, ?reduce: State::Reduce, ?which: (:reduce | :shift), ?same_prec: bool) -> void
|
10
|
+
|
11
|
+
def report_message: () -> (::String | bot)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
class Shift
|
4
|
+
@next_sym: Grammar::Symbol
|
5
|
+
@next_items: Array[States::Item]
|
6
|
+
|
7
|
+
attr_reader next_sym: Grammar::Symbol
|
8
|
+
attr_reader next_items: Array[States::Item]
|
9
|
+
attr_accessor not_selected: bool
|
10
|
+
|
11
|
+
def initialize: (Grammar::Symbol next_sym, Array[States::Item] next_items) -> void
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
class ShiftReduceConflict
|
4
|
+
attr_accessor symbols: Array[Grammar::Symbol]
|
5
|
+
attr_accessor shift: State::Shift
|
6
|
+
attr_accessor reduce: State::Reduce
|
7
|
+
|
8
|
+
def initialize: (?symbols: Array[Grammar::Symbol], ?shift: State::Shift, ?reduce: State::Reduce) -> void
|
9
|
+
|
10
|
+
def type: () -> :shift_reduce
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/sig/lrama/state.rbs
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
module Lrama
|
2
|
+
class State
|
3
|
+
@id: untyped
|
4
|
+
|
5
|
+
@accessing_symbol: untyped
|
6
|
+
|
7
|
+
@kernels: untyped
|
8
|
+
|
9
|
+
@items: Array[States::Item]
|
10
|
+
|
11
|
+
@items_to_state: untyped
|
12
|
+
|
13
|
+
@conflicts: Array[State::ShiftReduceConflict|State::ReduceReduceConflict]
|
14
|
+
|
15
|
+
@resolved_conflicts: untyped
|
16
|
+
|
17
|
+
@default_reduction_rule: untyped
|
18
|
+
|
19
|
+
@closure: untyped
|
20
|
+
|
21
|
+
@nterm_transitions: untyped
|
22
|
+
|
23
|
+
@term_transitions: untyped
|
24
|
+
|
25
|
+
@transitions: Array[[Shift, State]]
|
26
|
+
|
27
|
+
attr_reader id: untyped
|
28
|
+
|
29
|
+
attr_reader accessing_symbol: untyped
|
30
|
+
|
31
|
+
attr_reader kernels: untyped
|
32
|
+
|
33
|
+
attr_reader conflicts: Array[State::ShiftReduceConflict|State::ReduceReduceConflict]
|
34
|
+
|
35
|
+
attr_reader resolved_conflicts: untyped
|
36
|
+
|
37
|
+
attr_reader default_reduction_rule: untyped
|
38
|
+
|
39
|
+
attr_reader closure: untyped
|
40
|
+
|
41
|
+
attr_reader items: Array[States::Item]
|
42
|
+
|
43
|
+
attr_accessor shifts: Array[Shift]
|
44
|
+
|
45
|
+
attr_accessor reduces: untyped
|
46
|
+
|
47
|
+
def initialize: (untyped id, untyped accessing_symbol, Array[States::Item] kernels) -> void
|
48
|
+
|
49
|
+
def closure=: (untyped closure) -> untyped
|
50
|
+
|
51
|
+
def non_default_reduces: () -> untyped
|
52
|
+
|
53
|
+
def compute_shifts_reduces: () -> untyped
|
54
|
+
|
55
|
+
def set_items_to_state: (untyped items, untyped next_state) -> untyped
|
56
|
+
|
57
|
+
def set_look_ahead: (untyped rule, untyped look_ahead) -> untyped
|
58
|
+
|
59
|
+
def nterm_transitions: () -> untyped
|
60
|
+
|
61
|
+
def term_transitions: () -> untyped
|
62
|
+
|
63
|
+
def transitions: () -> Array[[Shift, State]]
|
64
|
+
|
65
|
+
def selected_term_transitions: () -> untyped
|
66
|
+
|
67
|
+
def transition: (untyped sym) -> untyped
|
68
|
+
|
69
|
+
def find_reduce_by_item!: (untyped item) -> untyped
|
70
|
+
|
71
|
+
def default_reduction_rule=: (untyped default_reduction_rule) -> untyped
|
72
|
+
|
73
|
+
def has_conflicts?: () -> untyped
|
74
|
+
|
75
|
+
def sr_conflicts: () -> untyped
|
76
|
+
|
77
|
+
def rr_conflicts: () -> untyped
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Lrama
|
2
|
+
class States
|
3
|
+
class Item
|
4
|
+
extend Forwardable
|
5
|
+
include Grammar::Rule::_DelegatedMethods
|
6
|
+
|
7
|
+
attr_accessor rule: Grammar::Rule
|
8
|
+
attr_accessor position: Integer
|
9
|
+
|
10
|
+
def initialize: (?rule: Grammar::Rule, ?position: Integer) -> void
|
11
|
+
|
12
|
+
def hash: () -> Integer
|
13
|
+
def rule_id: () -> Integer
|
14
|
+
def empty_rule?: () -> bool
|
15
|
+
def number_of_rest_symbols: () -> Integer
|
16
|
+
def next_sym: () -> Grammar::Symbol
|
17
|
+
def next_next_sym: () -> Grammar::Symbol
|
18
|
+
def previous_sym: () -> Grammar::Symbol
|
19
|
+
def end_of_rule?: () -> bool
|
20
|
+
def beginning_of_rule?: () -> bool
|
21
|
+
def start_item?: () -> bool
|
22
|
+
def new_by_next_position: () -> States::Item
|
23
|
+
def symbols_before_dot: () -> Array[Grammar::Symbol]
|
24
|
+
def symbols_after_dot: () -> Array[Grammar::Symbol]
|
25
|
+
def to_s: () -> ::String
|
26
|
+
def display_name: () -> ::String
|
27
|
+
def display_rest: () -> ::String
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
module Lrama
|
2
|
+
class States
|
3
|
+
include Grammar::_DelegatedMethods
|
4
|
+
|
5
|
+
@grammar: untyped
|
6
|
+
|
7
|
+
@warning: untyped
|
8
|
+
|
9
|
+
@trace_state: untyped
|
10
|
+
|
11
|
+
@states: Array[State]
|
12
|
+
|
13
|
+
@direct_read_sets: untyped
|
14
|
+
|
15
|
+
@reads_relation: untyped
|
16
|
+
|
17
|
+
@read_sets: untyped
|
18
|
+
|
19
|
+
@includes_relation: untyped
|
20
|
+
|
21
|
+
@lookback_relation: untyped
|
22
|
+
|
23
|
+
@follow_sets: untyped
|
24
|
+
|
25
|
+
@la: untyped
|
26
|
+
|
27
|
+
extend Forwardable
|
28
|
+
|
29
|
+
include Lrama::Report::Duration
|
30
|
+
|
31
|
+
attr_reader states: Array[State]
|
32
|
+
|
33
|
+
attr_reader reads_relation: untyped
|
34
|
+
|
35
|
+
attr_reader includes_relation: untyped
|
36
|
+
|
37
|
+
attr_reader lookback_relation: untyped
|
38
|
+
|
39
|
+
def initialize: (untyped grammar, untyped warning, ?trace_state: bool) -> void
|
40
|
+
|
41
|
+
def compute: () -> untyped
|
42
|
+
|
43
|
+
def reporter: () -> untyped
|
44
|
+
|
45
|
+
def states_count: () -> untyped
|
46
|
+
|
47
|
+
def direct_read_sets: () -> untyped
|
48
|
+
|
49
|
+
def read_sets: () -> untyped
|
50
|
+
|
51
|
+
def follow_sets: () -> untyped
|
52
|
+
|
53
|
+
def la: () -> untyped
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def sr_conflicts: () -> untyped
|
58
|
+
|
59
|
+
def rr_conflicts: () -> untyped
|
60
|
+
|
61
|
+
def trace_state: () { (untyped) -> untyped } -> (untyped | nil)
|
62
|
+
|
63
|
+
def create_state: (untyped accessing_symbol, untyped kernels, untyped states_created) -> (::Array[untyped | false] | ::Array[untyped | true])
|
64
|
+
|
65
|
+
def setup_state: (untyped state) -> untyped
|
66
|
+
|
67
|
+
def enqueue_state: (untyped states, untyped state) -> untyped
|
68
|
+
|
69
|
+
def compute_lr0_states: () -> untyped
|
70
|
+
|
71
|
+
def nterm_transitions: () -> untyped
|
72
|
+
|
73
|
+
def compute_direct_read_sets: () -> untyped
|
74
|
+
|
75
|
+
def compute_reads_relation: () -> untyped
|
76
|
+
|
77
|
+
def compute_read_sets: () -> untyped
|
78
|
+
|
79
|
+
def transition: (untyped state, untyped symbols) -> untyped
|
80
|
+
|
81
|
+
def compute_includes_relation: () -> untyped
|
82
|
+
|
83
|
+
def compute_lookback_relation: () -> untyped
|
84
|
+
|
85
|
+
def compute_follow_sets: () -> untyped
|
86
|
+
|
87
|
+
def compute_look_ahead_sets: () -> untyped
|
88
|
+
|
89
|
+
def bitmap_to_terms: (untyped bit) -> untyped
|
90
|
+
|
91
|
+
def compute_conflicts: () -> untyped
|
92
|
+
|
93
|
+
def compute_shift_reduce_conflicts: () -> untyped
|
94
|
+
|
95
|
+
def compute_reduce_reduce_conflicts: () -> untyped
|
96
|
+
|
97
|
+
def compute_default_reduction: () -> untyped
|
98
|
+
|
99
|
+
def check_conflicts: () -> untyped
|
100
|
+
end
|
101
|
+
end
|
data/template/bison/yacc.c
CHANGED
@@ -1166,9 +1166,9 @@ yydestruct (const char *yymsg,
|
|
1166
1166
|
#endif
|
1167
1167
|
|
1168
1168
|
enum yy_repair_type {
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1169
|
+
inserting,
|
1170
|
+
deleting,
|
1171
|
+
shifting,
|
1172
1172
|
};
|
1173
1173
|
|
1174
1174
|
struct yy_repair {
|
@@ -1401,27 +1401,27 @@ yyrecover(yy_state_t *yyss, yy_state_t *yyssp, int yychar<%= output.user_formals
|
|
1401
1401
|
if (current->repair_length + 1 > YYMAXREPAIR(<%= output.parse_param_name %>))
|
1402
1402
|
continue;
|
1403
1403
|
|
1404
|
-
yy_repairs *
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
YYCOPY (
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1404
|
+
yy_repairs *reps = (yy_repairs *) YYMALLOC (sizeof (yy_repairs));
|
1405
|
+
reps->id = count;
|
1406
|
+
reps->next = 0;
|
1407
|
+
reps->stack_length = stack_length;
|
1408
|
+
reps->states = (yy_state_t *) YYMALLOC (sizeof (yy_state_t) * (stack_length));
|
1409
|
+
reps->state = reps->states + (current->state - current->states);
|
1410
|
+
YYCOPY (reps->states, current->states, current->state - current->states + 1);
|
1411
|
+
reps->repair_length = current->repair_length + 1;
|
1412
|
+
reps->prev_repair = current;
|
1413
|
+
reps->repair.type = inserting;
|
1414
|
+
reps->repair.term = (yysymbol_kind_t) yyx;
|
1415
1415
|
|
1416
1416
|
/* Process PDA assuming next token is yyx */
|
1417
|
-
if (! yy_process_repairs (
|
1417
|
+
if (! yy_process_repairs (reps, (yysymbol_kind_t)yyx))
|
1418
1418
|
{
|
1419
|
-
YYFREE (
|
1419
|
+
YYFREE (reps);
|
1420
1420
|
continue;
|
1421
1421
|
}
|
1422
1422
|
|
1423
|
-
tail->next =
|
1424
|
-
tail =
|
1423
|
+
tail->next = reps;
|
1424
|
+
tail = reps;
|
1425
1425
|
count++;
|
1426
1426
|
|
1427
1427
|
if (yyx == yytoken)
|
@@ -1437,7 +1437,7 @@ yyrecover(yy_state_t *yyss, yy_state_t *yyssp, int yychar<%= output.user_formals
|
|
1437
1437
|
YYDPRINTF ((stderr,
|
1438
1438
|
"New repairs is enqueued. count: %d, yystate: %d, yyx: %d\n",
|
1439
1439
|
count, yystate, yyx));
|
1440
|
-
yy_print_repairs (
|
1440
|
+
yy_print_repairs (reps<%= output.user_args %>);
|
1441
1441
|
}
|
1442
1442
|
}
|
1443
1443
|
}
|
@@ -1475,7 +1475,12 @@ int yychar;
|
|
1475
1475
|
/* The semantic value of the lookahead symbol. */
|
1476
1476
|
/* Default value used for initialization, for pacifying older GCCs
|
1477
1477
|
or non-GCC compilers. */
|
1478
|
+
#ifdef __cplusplus
|
1479
|
+
static const YYSTYPE yyval_default = {};
|
1480
|
+
(void) yyval_default;
|
1481
|
+
#else
|
1478
1482
|
YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
|
1483
|
+
#endif
|
1479
1484
|
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
|
1480
1485
|
|
1481
1486
|
/* Location data for the lookahead symbol. */
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lrama
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuichiro Kaneko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: LALR (1) parser generator written by Ruby
|
14
14
|
email:
|
@@ -31,6 +31,10 @@ files:
|
|
31
31
|
- README.md
|
32
32
|
- Rakefile
|
33
33
|
- Steepfile
|
34
|
+
- doc/development/compressed_state_table/main.md
|
35
|
+
- doc/development/compressed_state_table/parse.output
|
36
|
+
- doc/development/compressed_state_table/parse.y
|
37
|
+
- doc/development/compressed_state_table/parser.rb
|
34
38
|
- exe/lrama
|
35
39
|
- lib/lrama.rb
|
36
40
|
- lib/lrama/bitmap.rb
|
@@ -45,6 +49,7 @@ files:
|
|
45
49
|
- lib/lrama/counterexamples/state_item.rb
|
46
50
|
- lib/lrama/counterexamples/transition_path.rb
|
47
51
|
- lib/lrama/counterexamples/triple.rb
|
52
|
+
- lib/lrama/diagnostics.rb
|
48
53
|
- lib/lrama/digraph.rb
|
49
54
|
- lib/lrama/grammar.rb
|
50
55
|
- lib/lrama/grammar/auxiliary.rb
|
@@ -74,6 +79,7 @@ files:
|
|
74
79
|
- lib/lrama/grammar/symbols/resolver.rb
|
75
80
|
- lib/lrama/grammar/type.rb
|
76
81
|
- lib/lrama/grammar/union.rb
|
82
|
+
- lib/lrama/grammar_validator.rb
|
77
83
|
- lib/lrama/lexer.rb
|
78
84
|
- lib/lrama/lexer/grammar_file.rb
|
79
85
|
- lib/lrama/lexer/location.rb
|
@@ -83,6 +89,7 @@ files:
|
|
83
89
|
- lib/lrama/lexer/token/instantiate_rule.rb
|
84
90
|
- lib/lrama/lexer/token/tag.rb
|
85
91
|
- lib/lrama/lexer/token/user_code.rb
|
92
|
+
- lib/lrama/logger.rb
|
86
93
|
- lib/lrama/option_parser.rb
|
87
94
|
- lib/lrama/options.rb
|
88
95
|
- lib/lrama/output.rb
|
@@ -99,22 +106,32 @@ files:
|
|
99
106
|
- lib/lrama/states.rb
|
100
107
|
- lib/lrama/states/item.rb
|
101
108
|
- lib/lrama/states_reporter.rb
|
109
|
+
- lib/lrama/trace_reporter.rb
|
102
110
|
- lib/lrama/version.rb
|
103
|
-
- lib/lrama/warning.rb
|
104
111
|
- lrama.gemspec
|
105
112
|
- parser.y
|
106
113
|
- rbs_collection.lock.yaml
|
107
114
|
- rbs_collection.yaml
|
108
|
-
- sample/calc.output
|
109
|
-
- sample/calc.y
|
110
|
-
- sample/parse.y
|
111
115
|
- sig/lrama/bitmap.rbs
|
116
|
+
- sig/lrama/counterexamples.rbs
|
117
|
+
- sig/lrama/counterexamples/derivation.rbs
|
118
|
+
- sig/lrama/counterexamples/example.rbs
|
119
|
+
- sig/lrama/counterexamples/path.rbs
|
120
|
+
- sig/lrama/counterexamples/production_path.rbs
|
121
|
+
- sig/lrama/counterexamples/start_path.rbs
|
122
|
+
- sig/lrama/counterexamples/state_item.rbs
|
123
|
+
- sig/lrama/counterexamples/transition_path.rbs
|
124
|
+
- sig/lrama/counterexamples/triple.rbs
|
112
125
|
- sig/lrama/digraph.rbs
|
113
126
|
- sig/lrama/grammar.rbs
|
127
|
+
- sig/lrama/grammar/auxiliary.rbs
|
114
128
|
- sig/lrama/grammar/binding.rbs
|
115
129
|
- sig/lrama/grammar/code.rbs
|
116
130
|
- sig/lrama/grammar/code/destructor_code.rbs
|
131
|
+
- sig/lrama/grammar/code/initial_action_code.rbs
|
132
|
+
- sig/lrama/grammar/code/no_reference_code.rbs
|
117
133
|
- sig/lrama/grammar/code/printer_code.rbs
|
134
|
+
- sig/lrama/grammar/code/rule_action.rbs
|
118
135
|
- sig/lrama/grammar/counter.rbs
|
119
136
|
- sig/lrama/grammar/destructor.rbs
|
120
137
|
- sig/lrama/grammar/error_token.rbs
|
@@ -131,6 +148,7 @@ files:
|
|
131
148
|
- sig/lrama/grammar/symbol.rbs
|
132
149
|
- sig/lrama/grammar/symbols/resolver.rbs
|
133
150
|
- sig/lrama/grammar/type.rbs
|
151
|
+
- sig/lrama/grammar/union.rbs
|
134
152
|
- sig/lrama/lexer/grammar_file.rbs
|
135
153
|
- sig/lrama/lexer/location.rbs
|
136
154
|
- sig/lrama/lexer/token.rbs
|
@@ -142,6 +160,14 @@ files:
|
|
142
160
|
- sig/lrama/options.rbs
|
143
161
|
- sig/lrama/report/duration.rbs
|
144
162
|
- sig/lrama/report/profile.rbs
|
163
|
+
- sig/lrama/state.rbs
|
164
|
+
- sig/lrama/state/reduce.rbs
|
165
|
+
- sig/lrama/state/reduce_reduce_conflict.rbs
|
166
|
+
- sig/lrama/state/resolved_conflict.rbs
|
167
|
+
- sig/lrama/state/shift.rbs
|
168
|
+
- sig/lrama/state/shift_reduce_conflict.rbs
|
169
|
+
- sig/lrama/states.rbs
|
170
|
+
- sig/lrama/states/item.rbs
|
145
171
|
- sig/lrama/warning.rbs
|
146
172
|
- sig/stdlib/strscan/string_scanner.rbs
|
147
173
|
- template/bison/_yacc.h
|