<tag> based language compiler

"Chip Scardo" <cscardo@intrex.com>
16 Oct 1996 17:52:44 -0400

          From comp.compilers

Related articles
<tag> based language compiler cscardo@intrex.com (Chip Scardo) (1996-10-16)
Re: <tag> based language compiler euahjn@uab.ericsson.se (Henrik Johansson) (1996-10-20)
| List of all articles for this month |

From: "Chip Scardo" <cscardo@intrex.com>
Newsgroups: comp.compilers
Date: 16 Oct 1996 17:52:44 -0400
Organization: Compilers Central
Keywords: parse, question, comment

A few years ago I wrote a basic 'scanner' for a language that is tag based.
  It is non-procedural. In other words, the user describes his input then
describes his output and the 'compiler' generates p-code structures that
are then used by a translation engine to create the desired output. This
has grown and grown and now is the time to rewrite it to make it more
maintainable and more useful. The language looks something like:

    <attribute1> value for attribute 1
    <anotherkind of attribute>
          <subattribute1> value for subattribute1
          <subattribute1> another value for subattribute1
          <subattribute2> a value for subattribute2
    </anotherkind of attribute> /* the way to end a group of tags */

Question is: is there a tool out there to help me write this new compiler?
It appears to me that yacc would not work for this kind of langauge. Am I
mistaken? Where can I find a good yacc?

[You can certainly parse this kind of stuff in yacc, but it won't give you
any help building the table of attributes. That'd be up to you. -John]

Post a followup to this message

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