1 |
|
2002-11-03 Paul Eggert <eggert@twinsun.com> |
2 |
|
|
3 |
|
* src/scan-gram.l: Revamp to fix POSIX incompatibilities, |
4 |
|
to count columns correctly, and to check for invalid inputs. |
5 |
|
|
6 |
|
Use mbsnwidth to count columns correctly. Account for tabs, too. |
7 |
|
Include mbswidth.h. |
8 |
|
(YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS. |
9 |
|
(extend_location): New function. |
10 |
|
(YY_LINES): Remove. |
11 |
|
|
12 |
|
Handle CRLF in C code rather than in Lex code. |
13 |
|
(YY_INPUT): New macro. |
14 |
|
(no_cr_read): New function. |
15 |
|
|
16 |
|
Scan UCNs, even though we don't fully handle them yet. |
17 |
|
(convert_ucn_to_byte): New function. |
18 |
|
|
19 |
|
Handle backslash-newline correctly in C code. |
20 |
|
(SC_LINE_COMMENT, SC_YACC_COMMENT): New states. |
21 |
|
(eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.; |
22 |
|
all uses changed. |
23 |
|
(tag, splice): New EREs. Do not allow NUL or newline in tags. |
24 |
|
Use {splice} wherever C allows backslash-newline. |
25 |
|
YY_STEP after space, newline, vertical-tab. |
26 |
|
("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT). |
27 |
|
|
28 |
|
(letter, id): Don't assume ASCII; e.g., spell out a-z. |
29 |
|
|
30 |
|
({int}, handle_action_dollar, handle_action_at): Check for integer |
31 |
|
overflow. |
32 |
|
|
33 |
|
(YY_STEP): Omit trailing semicolon, so that it's more like C. |
34 |
|
|
35 |
|
(<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00 |
36 |
|
as well as \000. Check for UCHAR_MAX, not 255. |
37 |
|
Allow \x with an arbitrary positive number of digits, as in C. |
38 |
|
Check for overflow here. |
39 |
|
Allow \? and UCNs, for compatibility with C. |
40 |
|
|
41 |
|
(handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision |
42 |
|
with quote slot used by complain_at. |
43 |
|
|
44 |
|
* tests/input.at: Add tests for backslash-newline, m4 quotes |
45 |
|
in symbols, long literals, and funny escapes in strings. |
46 |
|
|
47 |
|
* configure.ac (jm_PREREQ_MBSWIDTH): Add. |
48 |
|
* lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c. |
49 |
|
* lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext. |
50 |
|
* m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4. |
51 |
|
* m4/mbswidth.m4: New file, from GNU coreutils. |
52 |
|
|
53 |
|
* doc/bison.texinfo (Grammar Outline): Document // comments. |
54 |
|
(Symbols): Document that trigraphs have no special meaning in Bison, |
55 |
|
nor is backslash-newline allowed. |
56 |
|
(Actions): Document that trigraphs have no special meaning. |
57 |
|
|
58 |
|
* src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove; |
59 |
|
no longer used. |
60 |
|
|
61 |
|
2002-11-02 Paul Eggert <eggert@twinsun.com> |
62 |
|
|
63 |
|
* src/reader.c: Don't include quote.h; not needed. |
64 |
|
(get_merge_function): Reword warning to be consistent with |
65 |
|
type clash diagnostic in grammar_current_rule_check. |
66 |
|
|
67 |
|
* lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two |
68 |
|
bug in trigraph handling. |
69 |
|
|
70 |
|
* src/output.c (prepare_symbols): When printing token names, |
71 |
|
escape "[" as "@<:@" and likewise for "]". |
72 |
|
|
73 |
|
* src/system.h (errno): Remove declaration, as we are now |
74 |
|
assuming C89 or better, and C89 guarantees errno. |
75 |
|
|
76 |
2002-10-30 Paul Eggert <eggert@twinsun.com> |
2002-10-30 Paul Eggert <eggert@twinsun.com> |
77 |
|
|
78 |
* lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): |
* lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): |