Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Stefan Monnier Newsgroups: comp.compilers Subject: Re: Going backwards from a Language(or set of expressions) to a Grammar Date: Sat, 06 May 2017 22:02:16 -0400 Organization: A noiseless patient Spider Lines: 16 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <17-05-002@comp.compilers> References: <17-04-014@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="35446"; mail-complaints-to="abuse@iecc.com" Keywords: parse, comment Posted-Date: 06 May 2017 22:36:58 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1869 > [Depends what you mean by language. If you mean from a set of sentences, > sure, it's this: > lang ::= sentence1 | sentence2 | ... > sentence1 ::= tokens in sentence1 > sentence2 ::= tokens in sentence2 > ... Indeed. Actually, there's a more concise grammar that also accepts those same sentences: lang = .* -- Stefan [Well, yeah, but that's a little overgeneral. -John]