Mon, 14 Sep 2009 15:17:27 +0200

Related articles |
---|

[4 earlier articles] |

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

From: | Hans Aberg <haberg_20080406@math.su.se> |

Newsgroups: | comp.compilers |

Date: | Mon, 14 Sep 2009 15:17:27 +0200 |

Organization: | A noiseless patient Spider |

References: | 09-09-038 09-09-039 09-09-045 09-09-048 09-09-051 09-09-060 |

Keywords: | parse, theory |

Posted-Date: | 18 Sep 2009 11:46:45 EDT |

Chris F Clark wrote:

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

How about the "terminals"? :-)

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

They will be vocabularies for different languages. The language L that

is a subset of T* is the set of sentences one would write. The language

that is a subset of (N V T)* but not T* is the grammar description

language. The subset when all variables (non-terminals) have been

expanded into constants (terminals) is L.

Hans

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.