Hi Eric,
>>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=3F
>
>
> That sounds familiar. What was the reason why the new punctuation
> routine cannot return `punctuation' for unhandled punctuation
> characters=3F
Simply to let other analyzers give a try ;-)
Also it is possible to return `punctuation' for unhandled punctuation
characters using a default value declaration like:
%token <punctuation> punctuation
>>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:
[...]
>>All that to say that maybe "type" could be used instead of "token"
>>for things related to %token declarations. So names could become:
[...]
>
> That's a good idea. Thanks!
I committed changes to do all that! The change log follows.
I finally kept `semantic-lex-punctuation' as it is, and moved
`wisent-lex-punctuation' into semantic-lex.el as
`semantic-lex-punctuation-type'. I found that new name consistent
with the new `semantic-lex-type-...' API ;-)
> 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.
I am impatient to see them!
Thanks!
David
P.S.: I noticed that `senator-jump-interactive' is broken for
Elisp. I got the following error when the point is outside
parenthesized block:
Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 1 1)
scan-lists(1 -1 1)
up-list(-1)
semantic-beginning-of-command-emacs-lisp-mode()
semantic-beginning-of-command()
semantic-ctxt-current-function-emacs-lisp-mode(nil)
semantic-ctxt-current-function()
senator-jump-interactive("Jump to: " nil nil t)
Also the function `function-at-point', used in
`semantic-ctxt-current-function' in semantic-el.el, seems to not exist
in Emacs 21.3.50.
---------- change log:
* semantic-lex.el:
(semantic-lex-tokens-obarray): Renamed to...
(semantic-lex-types-obarray): New.
(semantic-lex-token-invalid): Renamed to...
(semantic-lex-type-invalid): New.
(semantic-lex-token-symbol): Renamed to...
(semantic-lex-type-symbol): New.
(semantic-lex-token-class-p): Renamed to...
(semantic-lex-type-p): New.
(semantic-lex-token-set): Renamed to...
(semantic-lex-type-set): New.
(semantic-lex-token-value): Renamed to...
(semantic-lex-type-value): New.
(semantic-lex-token-put): Renamed to...
(semantic-lex-type-put): New.
(semantic-lex-token-get): Renamed to...
(semantic-lex-type-get): New.
(semantic-lex-make-token-table): Renamed to...
(semantic-lex-make-type-table): New.
(semantic-lex-map-tokens): Renamed to...
(semantic-lex-map-types): New.
(semantic-lex-tokens): Renamed to...
(semantic-lex-types): New.
(semantic-lex-punctuation-type): New.
* semantic-grammar.el:
(semantic-grammar-lexer): Use `semantic-lex-punctuation-type'.
(semantic-grammar-automaton)
(semantic-grammar-keywords, semantic-grammar-tokens)
(semantic-grammar-setup-semantic): Re-generated.
(semantic-grammar-tokentable-builder-default): Call
`semantic-lex-make-type-table'.
(semantic-grammar-syntax-table): Removed '=3F' as a quote character.
* wisent-awk.el:
(wisent-awk-automaton)
(wisent-awk-keywords, wisent-awk-tokens)
(wisent-awk-setup-parser): Re-generated.
* wisent-bovine.el:
(wisent-lex-token-rules)
(wisent-lex-token-get)
(wisent-lex-make-token-table): Use new `wisent-lex-type-...' API.
(wisent-lex-punctuation): Removed.
* wisent-calc.el:
(wisent-calc-automaton)
(wisent-calc-tokens)
(wisent-calc-setup-parser): Re-generated.
* wisent-cim.el:
(wisent-cim-automaton)
(wisent-cim-keywords, wisent-cim-tokens)
(wisent-cim-default-setup): Re-generated.
* wisent-grammar.el:
(wisent-grammar-setupcode-builder): Generate setup of
`semantic-lex-types-obarray'.
* wisent-java-lex.el:
(wisent-java-tags-lexer)
(wisent-java-lexer): Use `semantic-lex-punctuation-type'.
* wisent-java-tags.el:
* wisent-java.el:
(wisent-java-parser-tables)
(wisent-java-keywords, wisent-java-tokens)
(wisent-java-default-setup): Re-generated.
* wisent-python.el:
(wisent-python-parser-tables)
(wisent-python-keywords, wisent-python-tokens)
(wisent-python-default-setup): Re-generated.
|