>>> "David PONCE" <David.Ponce@...> seems to think that:
>Hi Eric,
>
>I finally come back to work (a little bit) more on Semantic ;-)
>
>As there is a long time now since our last conversation on changes
>that should be made on Semantic 2.0 code, I just want to be sure of this:
>
>If I correctly remember we planned to remove the lexical analyzer
>`wisent-lex-punctuation' from wisent-bovine.el and move it into
>semantic-lex.el as `semantic-lex-punctuation'. The current
>`semantic-lex-punctuation' would be renamed
>`semantic-lex-generic-punctuation'.
>
>Am I right?
That sounds familiar. What was the reason why the new punctuation
routine cannot return `punctuation' for unhandled punctuation
characters?
>While I was looking at the code in semantic-lex I noticed that the
>prefix `semantic-lex-token-...' is used to name two categories of
>variables and functions:
>
>- Those related to the token table:
>
> `semantic-lex-token-invalid'
> `semantic-lex-token-symbol'
> `semantic-lex-token-class-p'
> `semantic-lex-token-set'
> `semantic-lex-token-value'
> `semantic-lex-token-put'
> `semantic-lex-token-get'
>
>- Those related to the lexical tokens produced by the lexer:
>
> `semantic-lex-token'
> `semantic-lex-token-class'
> `semantic-lex-token-bounds'
> `semantic-lex-token-start'
> `semantic-lex-token-end'
> `semantic-lex-token-text'
>
>As you can see the above names are very confusing :-(
>
>IMO "semantic-lex-token" should be reserved to things returned by
>lexer. So the second list of names above is correct and names in the
>first list above should be changed.
>
>In fact symbols stored in the token table are actually the type of %token
>declarations. For example, the following:
>
>%token <symbol> SYM ;; default value of `symbol' type
>%token <symbol> ID0 "ID0"
>%token <symbol> ID1 "ID1"
>%token <punctuation> PLUS "+"
>
>will create two entries in the token table: `symbol' and
>`punctuation'. Their value will be respectively:
>
>(SYM (ID0 . "ID0") (ID1 . "ID1"))
>
>and
>
>(nil (PLUS . "+"))
>
>All that to say that maybe "type" could be used instead of "token"
>for things related to %token declarations. So names could become:
>
> `semantic-lex-token-invalid' -> `semantic-lex-type-invalid'
> `semantic-lex-token-symbol' -> `semantic-lex-type-symbol'
> `semantic-lex-token-class-p' -> `semantic-lex-type-p'
> `semantic-lex-token-set' -> `semantic-lex-type-set'
> `semantic-lex-token-value' -> `semantic-lex-type-value'
> `semantic-lex-token-put' -> `semantic-lex-type-put'
> `semantic-lex-token-get' -> `semantic-lex-type-get'
>
>and of course:
>
> `semantic-lex-tokens-obarray' -> `semantic-lex-types-obarray'
> `semantic-lex-make-token-table' -> `semantic-lex-make-type-table'
> `semantic-lex-map-tokens' -> `semantic-lex-map-types'
> `semantic-lex-tokens' -> `semantic-lex-types'
[ ... ]
That's a good idea. Thanks!
I've been pretty busy of late as well. It's pumpkin throwing season
again, and my catapult building team is behind schedule. We've been
spending many a late night in construction. I will regale you all
with pictures when I finish the website.
Eric
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|