Re: parser generator terminology

Hans-Peter Diettrich <DrDiettrich1@aol.com>
Sun, 06 Sep 2009 21:34:22 +0200

          From comp.compilers

Related articles
parser generator terminology rpboland@gmail.com (Ralph Boland) (2009-09-06)
Re: parser generator terminology mhelvens@gmail.com (Michiel) (2009-09-06)
Re: parser generator terminology DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-09-06)
Re: parser generator terminology cfc@shell01.TheWorld.com (Chris F Clark) (2009-09-06)
Re: parser generator terminology cfc@shell01.TheWorld.com (Chris F Clark) (2009-09-07)
Re: parser generator terminology haberg_20080406@math.su.se (Hans Aberg) (2009-09-07)
Re: parser generator terminology mhelvens@gmail.com (Michiel) (2009-09-07)
Re: parser generator terminology cfc@shell01.TheWorld.com (Chris F Clark) (2009-09-07)
Re: parser generator terminology haberg_20080406@math.su.se (Hans Aberg) (2009-09-09)
[3 later articles]
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: Sun, 06 Sep 2009 21:34:22 +0200
Organization: Compilers Central
References: 09-09-038
Keywords: parse, design
Posted-Date: 06 Sep 2009 19:37:12 EDT

Ralph Boland schrieb:


> 1) Is there a name for the definition of the set of tokens; preferably
> a short name useful for naming identifiers? (I do not like regular
> definition since it implies a set of rules I do not follow.)


IMO that's also kind of a grammar.


> 2) Most parser generator tools actually use attribute grammars, which
> have attributes or semantic actions, and build abstract syntax trees.
> In my system the grammar is not attributed and instead a separate
> table is used to define the attributes and semantic actions associated
> with the grammar rules. I need a name for this table but don't know
> what to call it.


I prefer to think of events and event handlers. Events can be the input
of a new token, the queries about associating a token with elements of a
rule, the reduction of a completed rule etc.




> 3) Most parser generator tools build parsers that call the scanner to
> get tokens. In my system the parser calls a token fetcher that used
> one or more scanners to get tokens and may then process its input
> before returning its versions of tokens back to the parser. I do not
> have a good name for the token fetcher. One possibility is to call
> the scanner the lexer and the token fetcher the scanner. Can anybody
> suggest a name for my token fetcher?


Preprocessor?




> 4) Some systems have specifications for defining methods for walking
> over abstract syntax trees and making further transformations or
> constructions. I am not planning to do this but am curious to know a
> good name for such a specification preferably suitable for identifier
> naming.


I used event handlers also for the creation of an AST from a parse tree.
While the construction of the parse tree is up to the parser, further
actions and transformations IMO are application specific.


DoDi



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.