Re: parser generator terminology

Chris F Clark <cfc@shell01.TheWorld.com>
Sun, 13 Sep 2009 02:52:56 -0400

          From comp.compilers

Related articles
[3 earlier articles]
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: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: Sun, 13 Sep 2009 02:52:56 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 09-09-038 09-09-039 09-09-045 09-09-048 09-09-051
Keywords: parse, theory
Posted-Date: 13 Sep 2009 20:08:28 EDT

Hans Aberg <haberg_20080406@math.su.se> writes:


> 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.


Yes, good point. However, if one is trying to be clear, one needs to
be clear as to what means by Vocabulary, V = VN U VT or just VT.
Since, if I recall correctly, the original poster, Ralph Boland, was
interested in a case where he has both terminals and non-terminals and
he wanted a name for a set of just the terminals. Well, at least
that's how I interpreted his question.


The question goes back to whether there is a good one-word name for
"the set of terminals" in a language. While I like vocabulary as a
term for describing it, I think it may be non-standard, especially in
a context where there are non-terminals of interest.


Of course, it goes the other way too, if you use vocbulary for VT,
what word do you use for VN U VT? I don't think there is a common
word thet means all the words and phrases in a language (VT are the
named "words" and VN are the named "phrases" to my mind).


-Chris



Post a followup to this message

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