Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Seima Rao Newsgroups: comp.compilers Subject: Going backwards from a Language(or set of expressions) to a Grammar Date: Sun, 16 Apr 2017 19:01:44 +0530 Organization: Compilers Central Lines: 24 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <17-04-014@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="42128"; mail-complaints-to="abuse@iecc.com" Keywords: parse, question, comment Posted-Date: 16 Apr 2017 14:01:05 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:1853 Hi, Is it possible generally to arrive at a grammar from a language or set of expressions ? How so? -- Sincerely, Seima Rao. [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 ... Of course, that's not very useful if you want to parse other sentences. If you're asking whether it's possible to come up with a grammar that describes the language that a human would expect the sentences or expressions to have come from, I recall some work but it wasn't very satisfactory. -John]