Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1988

Parser Reversed

From Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups comp.compilers
Subject Parser Reversed
Date 2018-03-11 08:32 +0100
Organization Compilers Central
Message-ID <18-03-038@comp.compilers> (permalink)

Show all headers | View raw


A grammar can be used to *check* for valid sentences of a language, but
it also can be used to *create* valid sentences. For a pretty printer or
decompiler test I need a sentence generator for logical expressions. For
now the language can be restricted to AND, OR, variables and (kind of)
parentheses. Later on NOT and XOR can be added. RPN is one alternative
for the "kind of parentheses", eliminating the need for a specific
operator precedence.

Now I'm looking for possible implementations of such a generator, in
addition to my own ideas. So far the output can be anything, e.g. source
code or machine code, or some tree (AST...).

Any ideas or references to such projects?

TIA
   DoDi

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

Parser Reversed Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2018-03-11 08:32 +0100
  Re: Parser Reversed "Matt P. Dziubinski" <matdzb@gmail.com> - 2018-03-11 15:08 +0100
    Re: Parser Reversed Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2018-03-13 11:23 +0100
  Re: Parser Reversed Kaz Kylheku <157-073-9834@kylheku.com> - 2018-03-12 21:00 +0000
    Re: Parser Reversed Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2018-03-13 12:21 +0100

csiph-web