synfl

This package implements the synfl "syntactic font locker".

Copyright 2004 Stephen J. Turnbull

This file, and all files in the package, are licensed under the GNU
General Public License, version 2.

synfl uses a simple LR parser to handle SLR grammars and a hash-based symbol
table to store keywords, thus giving one-pass parsing and avoiding dependence
on regular expressions for parsing.  The symbol table could easily be extended
to store identifiers.

Currently at a very early proof-of-concept stage, it seems possible that
a font-locker based on synfl could be substantially faster than the current
implementations, even including the lazy lockers, with no special effort.
It can also produce a symbol table and/or a parse tree, if desired, as a
by-product.

The package contains the following files:

synfl.el	The implementations of the LR parser, SLR parser generator,
		and token stream classes.

synfl-lock.el	A "dancing bear" font-locker for C.  "The amazing thing is
		not how well it locks, but that it locks at all."  Profiles
		of three competing font-lockers are in doc/profile_emacs.c_*.
		font-lock is the traditional font-lock (without any lazy/jit
		assistance); synfl-list-lock is an early lexer-only version
		that shows the importance of avoiding regexps; lock-c is the
		version that has the (still fully-instrumented) parser for
		a trivial stream-of-tokens grammar.  lock-c unoptimized is
		2-3 times as fast as font-lock.  The font-lock extents are
		structured as a syntax tree.  (Trivial, since the grammar is
		trivial, but really a syntax tree.)
		WARNING: make sure that tracing of the main loop is OFF when
		you run the parser; I only got halfway through "emacs.c" when
		the parser crashed with the trace buffer containing 900MB.
synfl-tests.el	Various tests for the parser and parser generator.  Quite
		educational if you'd like to watch an LR parser at work.
synfl-trace.el  Implementation of the tracing functionality used for
		debugging and the test functions.

README		This file.
Makefile	Makefile compatible with XEmacs package system.
package-info.in	Packages identification information for XEmacs package system.

These files contain no longer used code and will probably be removed:

doc/synfl-preliminary.el	An early attempt.  Big useful comment, though.
doc/synfl-defclass.el	An abortive attempt to "improve" on defstruct.
doc/synfl-junk.el	More unused junk code.

These files contain illustrative profiles and will be removed when they
become irrelevant:

doc/profile_emacs.c_font-lock
doc/profile_emacs.c_lock-c
doc/profile_emacs.c_synfl-list-lock
