David Engster <deng@...> writes:
> Stephen Leake writes:
>> 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?).
>
> It is in admin/grammars.
Ah, my mistake. I only looked in the binary install, which has some lisp
source, but not all sources.
--
-- Stephe

Stephen Leake writes:
> 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?).
It is in admin/grammars.
-David

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

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details