[11049] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

anyone got a YACC HTML grammar?

daemon@ATHENA.MIT.EDU (D.White@mcs.surrey.ac.uk)
Thu Nov 20 20:12:34 1997

Date: Wed, 19 Nov 1997 05:36:00 -0500 (EST)
Old-X-Envelope-From: www-talk-request@www10.w3.org  Wed Nov 19 05:35:32 1997
To: www-talk@w3.org
From: D.White@mcs.surrey.ac.uk
Reply-To: D.White@mcs.surrey.ac.uk
Cc: D.White@mcs.surrey.ac.uk, S.Schuman@ee.surrey.ac.uk
Old-X-Envelope-To: www-talk
Resent-From: Gerald Oskoboiny <gerald@w3.org>
Resent-To: www-talk@w3.org

Hello everyone,

A quick question: does anyone have a decent YACC grammar for HTML (any recent
version)?  If at all possible, I'd prefer not to get into SGML and DTD parsing
as they seem substantially over-complex..

I'm particularly interested in an empty YACC grammar which I can add suitable
Abstract Data Tree construction calls to, to fully represent the structure
of a single HTML file.

This is for a final year undergraduate project I'm supervising, looking at
building a set of flexible tools to do cross-document checking and updating
for a group of Web pages.  The sort of things I have in mind:

	-	"set a corporate style on all these pages"
		(eg. add a body background tag, add a logo, add a button bar)

	-	"locate all misplaced headers"
		(eg. an h4 straight under an h2! where's the h3!)

	-	(re)number all headers.

	-	add link names to all headers.

	-	make a table of contents indexing all headers.

	-	build an index of all links for later checking.

We'd like to start with a good HTML parser, build parse trees, store them and
then investigate tree-rewriting routines and tree-printing routines to build
up a reusable toolkit of tools, perhaps being able to glue them together like
Unix pipelines..

cheers
duncan





home help back first fref pref prev next nref lref last post