Re: parser generator terminology

Hans Aberg <haberg_20080406@math.su.se>
Wed, 09 Sep 2009 18:40:55 +0200

          From comp.compilers

Related articles
[2 earlier articles]
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)
Re: parser generator terminology cfc@shell01.TheWorld.com (Chris F Clark) (2009-09-13)
Re: parser generator terminology haberg_20080406@math.su.se (Hans Aberg) (2009-09-14)
Re: parser generator terminology gneuner2@comcast.net (George Neuner) (2009-09-14)
| List of all articles for this month |
From: Hans Aberg <haberg_20080406@math.su.se>
Newsgroups: comp.compilers
Date: Wed, 09 Sep 2009 18:40:55 +0200
Organization: A noiseless patient Spider
References: 09-09-038 09-09-039 09-09-045 09-09-048
Keywords: parse, theory
Posted-Date: 10 Sep 2009 04:07:55 EDT

Chris F Clark wrote:
>> In Waite & Goos, the vocabulary V is the (disjoint) union of the sets of
>> non-terminals and terminals. They first defines a general rewriting
>> system, with sentences members of V*, the set of finite strings (the
>> free monoid) of V.
...
> While I'm not so foolish as to argue with Waite, Goos, or the Bison
> maintainers, epseically when I've Seen V, VT, and VN used rather
> universally as the 3 sets of all symbols, terminals, and
> non-terminals, there is precedence for vocbulary as VT, given that
> Terence Parr uses it in ANTLR if I recall correctly.


This is not formally wrong: V can be any finite set of symbols. A
language is then a subset of V*. So it is OK to define a language L as a
subset of T*, in which case the set of terminals T is the vocabulary.
The set of non-terminals N is only needed when one wants to define a
general rewriting system from a grammar to define the language L.
Different grammar specs of L may lead to different N.


      Hans



Post a followup to this message

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