help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: opinion on back end architecture


From: Hans Aberg
Subject: RE: opinion on back end architecture
Date: Sat, 6 Dec 2003 01:03:21 +0100

I am not sure I can parse your stuff. :-)

But the way I have in my language is that somewhere the type of each
identifier is established by a definition statement. I then record that in
a lookup table, which the lexer then uses to return the right token value.

At 14:04 -0500 2003/12/05, Urdaneta, Alfonso E (N-Summitt Technologies) wrote:
>the language has, for example, 2 ways to assign a value to a variable,
>where value can be integer, string, etc.
>
>calculate <identifier> value
>fill <identifier> value
>
>(these are greatly simplified btw).
>
>I have
>
>calculate.yy
>fill.yy
>etc.
>
>each of which have a grammar for that particular statement type.  each
>grammar then has actions that call classed like Calculate, Fill, etc.
>for the specific things that they do.  the thing is that I might find
>(for example) an integer while processing a fill statement or a
>calculate statement, so by having multiple parsers, I make sure the
>right parser gets the integer.
>
>By separating them this way I end up with a simpler grammar, but with a
>lot more code, and I'm not entirely sure this is a good thing.
>
>--
>alfonso e. urdaneta







reply via email to

[Prev in Thread] Current Thread [Next in Thread]