RCS file: /afs/w3.org/hypertext/WWW/MarkUp/Repository/SGML/sgml-lex/sgml_lex.c,v Working file: sgml_lex.c head: 1.8 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 8; selected revisions: 8 description: ---------------------------- revision 1.8 date: 1996/02/07 15:32:31; author: connolly; state: Exp; lines: +25 -14 * SGML_lexCase -> SGML_lexNorm, which covers whitespace etc. as well as case conversion. This allows pass-thru filtering. This involved changing the way whitespace is handled in the lexer. Also, tag close tokens (>) are explicitly reported. sgml_lex -c becomes sgml_lex -n @@ problem remaining: erroneous markup is reported out of order * added filter test * changed excerpt.pl to work with flex 2.5.2 * everything is compiled with -ansi -pedantic-errors -Werror * @@ grumble... navipress is putting
in
* Fixed a bug in main.c reported in: From: Joris RolingTo: "'Connolly, Dan'" Subject: Remarks on 'A Lexical Analyzer for HTML and Basic SGML' Date: Fri, 19 Jan 96 14:16:00 CET Message-Id: <30FF9AC4@msmsmtp> * fixed lex spec bug reported in: Message-Id: To: www-html@w3.org From: chris@walkaboutsoft.com (Chris Lovett) Subject: Re: Daniel Connolly's SGML Lex Specification * fixed memory leak reported in: Message-Id: <01BAEB69.31095AA0@cadc140.cadvision.com> From: Simon Watfa To: "'www-html@w3.org'" Subject: sgml-lex Date: Thu, 25 Jan 1996 21:01:28 -0700 ---------------------------- revision 1.7 date: 1995/12/01 06:41:23; author: connolly; state: Exp; lines: +15 -2 Case sensitivity option ---------------------------- revision 1.6 date: 1995/11/16 00:59:17; author: connolly; state: Exp; lines: +66 -9 * Added some error recovery and warnings regarding attribute value literal syntax. * Added line-number tracking * SGML_Lexer is passed to the callbacks (so the callback can get the current line number) * More markup is passed explicitly to the lexer client to support "Stream editors" and such. * Comments aren't separated out from markup declarations any more -- they're passed in the same event. * a little more documentation (README, etc.) * added python stuff to the distribution * added comments in the tests to resync the lexer between tests ---------------------------- revision 1.5 date: 1995/10/18 05:35:46; author: connolly; state: Exp; lines: +20 -5 * Illustrated case-insensitivity in examples * implemented case-conversion in lexer * greatly expanded API discussion * added instrumentation to test class in sgmllib.py ---------------------------- revision 1.4 date: 1995/10/11 21:47:35; author: connolly; state: Exp; lines: +10 -4 * Added ATTR vs. ATTRVAL distinction for smarter attribute scanning. attrs are always reported in name/value pairs now, though the name can be null * Fixed comment callback bug * added some meat to the python docstrings ---------------------------- revision 1.3 date: 1995/10/11 03:23:42; author: connolly; state: Exp; lines: +239 -103 ==Makefile * changed main target in makefile from test-driver to library * added dist target to makefile * documented tools usage ==lex-test.sgm * now built from the examples in the report automatically ==main.c * test rock param * don't use __GNUC__ extensions to printf * parse wierd-size chunks to lexer * pass len=0 on last call ==sgml-lex.html * terminology change: token is a flex token, event is a whole tag/etc. ==sgml.l * fixed missing * in single-quoted literal parsing * changed * to + in {number} * fixed termination bug in character reference handling ==sgml_lex.c * added lots of documentation * @@ malloc()==0 is still treated as a FATAL ERROR * added support for pending chars between calls to SGML_lex ==sgml_lex.h * added documentation * added SGML_delLexer() call (@# need to test with purify) ---------------------------- revision 1.2 date: 1995/10/07 05:31:20; author: connolly; state: Exp; lines: +179 -44 OK... easy parts work: I have C code that interprets the scanner data and implements an SGML lexer. But it can only be called once! I need to work on the buffering stuff. ---------------------------- revision 1.1 date: 1995/10/07 01:51:46; author: connolly; state: Exp; First cut at lexer API -- transferring to work at home =============================================================================