>>> David Ponce <david.ponce@...> seems to think that:
>Hi Eric,
>
> > As it stands, typing in `semantic-token-new-variable' seems long to
> > me. Perhaps we can have some sort of macro like `TOKEN-VARIABLE' or
> > `TOKEN' that expands to either what .by or .wy needs. This will
> > simplify token code, allow for eldoc help via existing mechanisms
> > (as ASSOC was done in .bnf files) and let us keep using some common
> > piece of code.
>
>That looks like a very good idea! As macro expanders are specific
>to each grammar mode, it would not be hard to expand macro to what
>the parser need.
>
>Maybe using names like VARIABLE-TAG instead of TOKEN-VARIABLE would
>be less implementation dependent?
>
>Also, when using rule based iteration in LALR grammars, it can be
>necessary to produce cooked tokens instead of raw ones. In such cases
>we could use an `EXPANDTAG' macro like this:
>
>(EXPANDTAG (VARIABLE-TAG $3 nil $2 'const t))
[ ... ]
Hmmm. Perhaps we need to think about our nomenclature more.
Unfortunately when I first wrote semantic I wasn't all that familiar
with the nomenclature of parsers. Right now we have:
token - A lexical entity
token - A semantic parsed entity, like a tag.
tag - used in descriptions and doc to describe a semantic parsed entity
nonterminal - another semantic parsed entity
nonterminal - a parser element in wisent
stream - a list of semantic parsed entities
stream - a list of lexical entities
It seems to me we could settle on some names for anything new:
token - lexical
stream - list of lexical entities
tag - semantic
nonterminal - a parser element in wisent
table, tag-table, database? - list of semantic tokens.
So I would go back and change semantic-token.el to be -tag.el
instead.
We could also migrate some of the -nontermial APIs over to tag as
well, or live with the double meaning.
I was realizing the other day that the semanticdb search routines took
arguments in a way that was flexible (from a tool sense) and
inflexible from a user sense. Changing everything to -tag, and
obsoleting the -nonterminal version of the searches would give me an
opportunity to rectify the problem.
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
|