>>> David Ponce <david@...> seems to think that:
>I worked a little more on your python stuff and submit you a new
>version based on a new feature I added to `wisent-flex'
>(in the attached tarball).
>It is now possible to setup a 'handler property to `semantic-flex'
>token, which specifies a function to be called by `wisent-flex' to
>handle such tokens.
>So with this new feature it is no more necessary to wrap
>`wisent-flex'. I just wrote a specific 'bol handler called
>`wisent-python-lex-bol' and setup the grammar accordingly:
>%token <bol> INDENT DEDENT
>%put bol handler wisent-python-lex-bol
>What do you think? Eric, any thoughts?
[ ... ]
I like the idea of handlers. It is similar to the flex extensions.
It would be nice if we could get all the different types of extensions
down into a common set of constructs. This makes a fourth style of
specialized lexical adaptation. (the first three being the syntax
table, flags, then the extensions.)
Perhaps when we combine the lexical notions of the LL and LALR
parsers, we could have one batch of handlers, and enabling whitespace,
newlines, comments, etc are all different handlers that you explicitly
add instead of flags. That would be more efficient. Unfortunately,
it seems like your handlers run at a different level from the
handlers I'm thinking of.
Next, I'm a little wary of putting lexical information in the grammar.
(Yes, I know we already put some of the lexical flags in the grammar
file too.) If we think it is good to put lexical information in the
grammar, we should probably design .wy grammar features for other
parts too the way lex does perhaps. Eeks.
Anyway, just worried about run-away feature-itis. It would be nice
to take the wide range of features and tidy them up.
Eric Ludlam: zappo@..., eric@...
Home: http://www.ultranet.com/~zappo Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org