[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Do not allow identifiers that start with a negative number.
From: |
Paul Eggert |
Subject: |
Re: [PATCH] Do not allow identifiers that start with a negative number. |
Date: |
Tue, 18 Jan 2011 11:11:20 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 01/15/11 22:28, Alex Rozenman wrote:
> Currently I am very busy with other tasks. Please allow me couple of days to
> review it.
One other thought, while we're on the subject. Currently we are handling
bracketed constructs, such a [x], [y], and [z] in this rule:
foo[x]: foo[y] '+' foo[z];
in a combination of C and lex. That is, the "[x]" is a single token
in the grammar for Bison grammars, and there's a long bit of C+lex code to
allow things like "[x /*hello*/]" while disallowing things like "[x
/*hello*/y]".
This is not good. We have a nice compiler-compiler, and we're not using it,
but instead we have a sortof-parser in C and lex.
We should parse these bracketed constructs with a Bison grammar, so that
"[", "x", and "]" are all single tokens, and so that the grammar tells us
which things are allowed in brackets.
I suspect that the reason it's done the way it is, is because of the old
backward-compatibility concern with rules that do not end in ';'. But
there's no reason to cater to these backward-compatibility concerns with
this new construct. No grammars should use this new construct, without
also putting ';' at the end of every rule.
- Re: [PATCH] Do not allow identifiers that start with a negative number., (continued)
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/08
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/08
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/09
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/10
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/15
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/15
- Re: [PATCH] Do not allow identifiers that start with a negative number., Alex Rozenman, 2011/01/16
- Re: [PATCH] Do not allow identifiers that start with a negative number.,
Paul Eggert <=
- Re: [PATCH] Do not allow identifiers that start with a negative number., Alex Rozenman, 2011/01/19
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/20
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/24
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/25
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/25
- Re: [PATCH] Do not allow identifiers that start with a negative number., Paul Eggert, 2011/01/25
- Re: [PATCH] Do not allow identifiers that start with a negative number., Joel E. Denny, 2011/01/25
- Re: [PATCH] Do not allow identifiers that start with a negative number., Akim Demaille, 2011/01/26
- Re: [PATCH] Do not allow identifiers that start with a negative number., Akim Demaille, 2011/01/26
- Re: [PATCH] Do not allow identifiers that start with a negative number., Akim Demaille, 2011/01/26