Re: SGML to YACC

glyph@netcom.com (Jesse Srogoncik)
Tue, 31 May 1994 23:25:53 GMT

          From comp.compilers

Related articles
SGML to YACC j_mcarthur@BIX.com (1994-05-26)
Re: SGML to YACC vosse@ruls41.LeidenUniv.nl (1994-05-30)
Re: SGML to YACC glyph@netcom.com (1994-05-31)
| List of all articles for this month |

Newsgroups: comp.compilers
From: glyph@netcom.com (Jesse Srogoncik)
Keywords: parse
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: 94-05-113
Date: Tue, 31 May 1994 23:25:53 GMT

You may want to take a look at the comp.text.sgml newsgroup. There are a
number of contributors there that have wrestled with this problem.


In general, it seems that Yacc-based solutions to SGML parsing problems
are embraced initially (particularly by experienced compiler authors) but
ultimately fall out of favor once the peculiarities of the SGML parsing
model become evident. That the lexer and parser are fashioned as
co-routines establishes a "contextual complicity" that is difficult
(i.e., unnatural as opposed to impossible) to fashion using Lex and
Yacc.


As for dealing with inclusions and exclusions in SGML, you may want to
take a look at SGMLS available via anonymous ftp from:
ftp.jclark.com:/pub/sgmls. Check out exclude.c and ambig.c in the source.
Additionally, TEI publishes an elided Yacc grammar for SGML document
instances that you may find useful.


Hope this helps,


Jesse
--


Post a followup to this message

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