Going backwards from a Language(or set of expressions) to a Grammar

Seima Rao <seimarao@gmail.com>
Sun, 16 Apr 2017 19:01:44 +0530

          From comp.compilers

Related articles
Going backwards from a Language(or set of expressions) to a Grammar seimarao@gmail.com (Seima Rao) (2017-04-16)
Re: Going backwards from a Language(or set of expressions) to a Gramma seimarao@gmail.com (Seima Rao) (2017-04-17)
Re: Going backwards from a Language(or set of expressions) to a Gramma treid3@centurylink.net (Tom) (2017-04-17)
Re: Going backwards from a Language(or set of expressions) to a Gramma alain@universite-de-strasbourg.fr (Alain Ketterlin) (2017-04-17)
Re: Going backwards from a Language(or set of expressions) to a Gramma derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2017-04-17)
Re: Going backwards from a Language(or set of expressions) to a Gramma monnier@iro.umontreal.ca (Stefan Monnier) (2017-05-06)
| List of all articles for this month |

From: Seima Rao <seimarao@gmail.com>
Newsgroups: comp.compilers
Date: Sun, 16 Apr 2017 19:01:44 +0530
Organization: Compilers Central
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

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]


Post a followup to this message

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