I'm using Emacs pretest 24.2.91, compiled for Windows, and the semantic
bundled with that.
I'm working on a grammar that has lots of actions of the form:
subprogram
: PROCEDURE SYMBOL
(wisi-cache-keywords
$1 'procedure nil $region1
$2 'other nil $region2)
;
Ensuring the $1 matches the $region1 is getting tedious, so I wrote a
macro, and the grammar action now has the form:
subprogram
: PROCEDURE SYMBOL
`,(wisi-cache-action
1 'procedure
2 'other)
;
However, the semantic lexer in semantic/grammar-wy.el doesn't like this;
it just skips the subprogram declaration.
I think the problem is in this bit of code:
(define-lex-sexp-type-analyzer semantic-grammar-wy--<qlist>-sexp-analyzer
"sexp analyzer for <qlist> tokens."
"\\s'\\s-*("
'PREFIXED_LIST)
That allows for one punctuation character before an sexp, but not two.
So I tried changing that regexp to "\\s'\\s'?\\s-*(". It actually occurs
twice in grammar-wy.el, so I copied the whole file and edited it (the
source grammar.wy is not in the emacs pretest, which is annoying, and
counter to open source philosophy, but I'm guessing that's Emacs
policy?).
But that didn't help.
Complete grammar file attached (it's very small; just enough to show
this problem).
Can anyone help?
--
-- Stephe
|