1 |
2002-06-11 Akim Demaille <akim@epita.fr> |
2002-06-11 Akim Demaille <akim@epita.fr> |
2 |
|
|
3 |
|
Have Bison grammars parsed by a Bison grammar. |
4 |
|
|
5 |
|
* src/reader.c, src/reader.h (prologue_augment): New. |
6 |
|
* src/reader.c (copy_definition): Remove. |
7 |
|
|
8 |
|
* src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) |
9 |
|
(grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) |
10 |
|
(grammar_current_rule_prec_set, grammar_current_rule_check) |
11 |
|
(grammar_current_rule_symbol_append) |
12 |
|
(grammar_current_rule_action_append): Export. |
13 |
|
* src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ |
14 |
|
(symbol_list_action_append): Remove. |
15 |
|
Hook the routines from reader. |
16 |
|
* src/scan-gram.l: In INITIAL, characters and strings are tokens. |
17 |
|
* src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. |
18 |
|
|
19 |
|
* src/reader.c (read_declarations): Remove, unused. |
20 |
|
|
21 |
|
* src/parse-gram.y: Handle the epilogue. |
22 |
|
* src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... |
23 |
|
(grammar_start_symbol_set): this. |
24 |
|
* src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. |
25 |
|
* src/reader.c (readgram): Remove, unused. |
26 |
|
(reader): Adjust to insert eoftoken and axiom where appropriate. |
27 |
|
|
28 |
|
* src/reader.c (copy_dollar): Replace with... |
29 |
|
* src/scan-gram.h (handle_dollar): this. |
30 |
|
* src/parse-gram.y: Remove `%thong'. |
31 |
|
|
32 |
|
* src/reader.c (copy_at): Replace with... |
33 |
|
* src/scan-gram.h (handle_at): this. |
34 |
|
|
35 |
|
* src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): |
36 |
|
New. |
37 |
|
|
38 |
|
* src/scan-gram.l (YY_LINES): Keep lineno synchronized for the |
39 |
|
time being. |
40 |
|
|
41 |
|
* src/reader.h, src/reader.c (grammar_rule_end): New. |
42 |
|
|
43 |
|
* src/parse.y (current_type, current_class): New. |
44 |
|
Implement `%nterm', `%token' support. |
45 |
|
Merge `%term' into `%token'. |
46 |
|
(string_as_id): New. |
47 |
|
* src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the |
48 |
|
type name. |
49 |
|
|
50 |
|
* src/parse-gram.y: Be sure to handle properly the beginning of |
51 |
|
rules. |
52 |
|
|
53 |
|
* src/parse-gram.y: Handle %type. |
54 |
|
* src/reader.c (grammar_rule_end): Call grammar_current_rule_check. |
55 |
|
|
56 |
|
* src/parse-gram.y: More directives support. |
57 |
|
* src/options.c: No longer handle source directives. |
58 |
|
|
59 |
|
* src/parse-gram.y: Fix %output. |
60 |
|
|
61 |
|
* src/parse-gram.y: Handle %union. |
62 |
|
Use the prologue locations. |
63 |
|
* src/reader.c (parse_union_decl): Remove. |
64 |
|
|
65 |
|
* src/reader.h, src/reader.c (epilogue_set): New. |
66 |
|
* src/parse-gram.y: Use it. |
67 |
|
|
68 |
|
* data/bison.simple, data/bison.c++: b4_stype is now either not |
69 |
|
defined, then default to int, or to the contents of %union, |
70 |
|
without `union' itself. |
71 |
|
Adjust. |
72 |
|
* src/muscle_tab.c (muscle_init): Don't predefine `stype'. |
73 |
|
|
74 |
|
* src/output.c (actions_output): Don't output braces, as they are |
75 |
|
already handled by the scanner. |
76 |
|
|
77 |
|
* src/scan-gram.l (SC_CHARACTER): Set the user_token_number of |
78 |
|
characters to themselves. |
79 |
|
|
80 |
|
* tests/reduce.at (Reduced Automaton): End the grammars with %% so |
81 |
|
that the epilogue has a proper #line. |
82 |
|
|
83 |
|
* src/parse-gram.y: Handle precedence/associativity. |
84 |
|
|
85 |
|
* src/symtab.c (symbol_precedence_set): Requires the symbol to be |
86 |
|
a terminal. |
87 |
|
* src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. |
88 |
|
* tests/calc.at: Do not use `%token "foo"' as it makes not sense |
89 |
|
at all to define terminals that cannot be emitted. |
90 |
|
|
91 |
|
* src/scan-gram.l: Escape M4 characters. |
92 |
|
|
93 |
|
* src/scan-gram.l: Working properly with escapes in user |
94 |
|
strings/characters. |
95 |
|
|
96 |
|
* tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) |
97 |
|
(AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' |
98 |
|
grammar. |
99 |
|
Use more modest sizes, as for the time being the parser does not |
100 |
|
release memory, and therefore the process swallows a huge amount |
101 |
|
of memory. |
102 |
|
|
103 |
|
* tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the |
104 |
|
stricter %token grammar. |
105 |
|
|
106 |
|
* src/symtab.h (associativity): Add `undef_assoc'. |
107 |
|
(symbol_precedence_set): Do nothing when passed an undef_assoc. |
108 |
|
* src/symtab.c (symbol_check_alias_consistence): Adjust. |
109 |
|
|
110 |
|
* tests/regression.at (Invalid %directive): Remove, as it is now |
111 |
|
meaningless. |
112 |
|
(Invalid inputs): Adjust to the new error messages. |
113 |
|
(Token definitions): The new grammar doesn't allow too many |
114 |
|
eccentricities. |
115 |
|
|
116 |
|
* src/lex.h, src/lex.c: Remove. |
117 |
|
* src/reader.c (lastprec, skip_to_char, read_signed_integer) |
118 |
|
(copy_character, copy_string2, copy_string, copy_identifier) |
119 |
|
(copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) |
120 |
|
(parse_muscle_decl, parse_dquoted_param, parse_skel_decl) |
121 |
|
(parse_action): Remove. |
122 |
|
* po/POTFILES.in: Adjust. |
123 |
|
|
124 |
|
2002-06-11 Akim Demaille <akim@epita.fr> |
125 |
|
|
126 |
* src/reader.c (parse_action): Don't store directly into the |
* src/reader.c (parse_action): Don't store directly into the |
127 |
rule's action member: return the action as a string. |
rule's action member: return the action as a string. |
128 |
Don't require `rule_length' as an argument: compute it. |
Don't require `rule_length' as an argument: compute it. |