On Wed, 07 Nov 2007 22:43:31 -0500, Simetrical wrote:
On 11/7/07, Simetrical
<Simetrical+wikilist(a)gmail.com> wrote:
1) A BNF grammar is developed that fits almost
all the commonly-used
features in. This will probably require unlimited lookahead, but I do
think (without, admittedly, much of any formal grounding in the theory
of all this) it's possible if that's allowed, keeping in mind the
"almost all" caveat.
Doing a little more idle reading, I see that bison at least evidently only
allows one-token lookahead (and since it's supposed to be strictly
superior to yacc, presumably that does too). On the other hand, maybe a
lexing specification alone would be of considerable use.
If you tokenize things like apostrophes correctly, it seems to me
you're halfway done . . . but I've talked about considerably more than I
understand, as usual, and should shut up now.
I think that's true, if you tokenize correctly, that would go a long way.
Unfortunately, there are a few constructs that make tokenization tricky.
Apostrophe is the most obvious case; but {'s, and to a lesser extent ['s
could have similar problems, since they would require substantial
lookahead to tokenize.