XML/SGML DTD for LR,SLR,LALR

JPA <paul.janssens@skynet.be.NOSPAM>
21 Feb 1999 21:39:51 -0500

          From comp.compilers

Related articles
XML/SGML DTD for LR,SLR,LALR paul.janssens@skynet.be.NOSPAM (JPA) (1999-02-21)
| List of all articles for this month |

From: JPA <paul.janssens@skynet.be.NOSPAM>
Newsgroups: comp.compilers
Date: 21 Feb 1999 21:39:51 -0500
Organization: Belgacom Skynet SA/NV
Keywords: parse, comment

Does anyone know if there is a DTD available for a target-language
independent description of parser-logic?


It doesn't really make sense to have a different parser generator for
each target-language. It seems like everybode is writing a yacc-clone
that creates java/C++/scheme and what have you not, rather a waste of
effort IMHO.


Better to produce the table data in a neutral format instead of
immediately wrapping it in the target language.


You would then have two kind of tools, one to produce table data (from
input in yacc or BNF format, or others) in an XML format, and the other
to generate source code from it.


JPA
[SGML seems like severe overkill. All a parser generator like yacc needs is
the skeleton code which you write once by hand, templates to generate
the arrays of numbers for the parse table, and simple replacement patterns
to turn $N into the appropriate reference in the value stack. -John]


Post a followup to this message

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