>>> David PONCE <david.ponce@...> seems to think that:
>> This is great. If as you say, the change don't effect existing
>> grammars, I recommend checking it in. I may not get a chance to play
>> with it much until the weekend.
>OK. I committed the changes.
>>>I attached a sample grammar gr-test.wy that you can use to experiment
>>>lexical analyzer generation ;-)
>> I did not find this file, but it may be wise to check it into the
>> 'test' directory so it can be regularly tested along with the other
>> items in there.
>Oops! I forgot to attach it. Sorry. I checked it into the test
I see it now. I will look at it too.
>>>! (defun semantic-grammar-types-properties (tokens &optional props)
>>>! "Return the list of type properties for lexical tokens TOKENS.
>>>! If optional argument PROPS is non-nil, it is an existing list of
>>>! properties where to add type properties."
>> I'm having trouble following some of your more advanced code in here.
>> In this function, and several others, I am confused by the names
>> Since % is a valid character for symbols in Emacs Lisp, perhaps
>> functions and variable that refer to a "token" or "tokens" that
>> represent output from %token or %type, or %start could use "%token"
>> to distinguish from what the lexer produces which are also tokens.
>> This is particularly important since you are referencing special
>> tokens which are really tags (in our parser speak) that describe
>> tokens from a lexer.
>> Unfortunately, that implies renaming vast amounts in this file since
>> most commands that reference any %keyword type thing would need a new
>> name to be consistent. :(
>I created two new functions: `semantic-grammar-token-%put-properties'
>and `semantic-grammar-token-%type-properties' which, I hope, are
>better named. I also wrote clearer doc strings. For compatibility
>reason, I kept `semantic-grammar-token-properties' which now just
>call the two above functions. I also rewrote its doc string to be
Thanks. When you feel you have reached a final stage on the code, it
would be good to add it to the doc. While I have poked through many
sections recently, I have not been through the lex portion.
>> Unfortunately I don't really have time for a detailed look today.
>> If you check it in, I will use it to port my dot grammar to see how
>> it works. That would be a good excuse to test my new idle completion
>> tool in a .wy file too. ;)
>The new idle scheduler seems to work fine. It is a great idea and
>addition to Semantic ;-) Maybe in the future, it could become a CEDET
That is a good idea I hadn't thought of. The most important feature
of the idle scheduler is that it synchronizes the tag table in the
current buffer in a special way. It is really geared toward semantic
in that way.
If you write a tool that does not use semantic tags, using and idle
scheduler yourself is probably just as easy.
>The only minor (but a little annoying problem) I encountered with the
>idle scheduler re-parse feature, is that sometimes re-parse seems to
>have been disabled, and is no more scheduled. The only way I found to
>re-enable it, is to disable then enable the minor mode. Unfortunately
>I didn't had time enough to track that problem down, and I don't have
>more information to give you for now. Perhaps have you some idea on
[ ... ]
Yes, I noticed that too, but thought it was because I was changing
the idle code while it was running. ;) I will examine it more
closely. Since the scheduler has to reschedule itself, there was
probably and error before that action.
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