Re: How to reload Wisent grammar?

Andrea Turso <[email protected]> Wed, 17 Feb 2016 13:17:03 +0000
Newsgroups gmane.emacs.semantic
Message-ID <CADL_vS+bfx7fY3qqEb=aeyt5XDv-ZwGixrcfn7+3qzy0zrzRdw@mail.gmail.com>
Hello Gracjan,

Personally I have found that you can change the grammar, recompile and test
it as follows:

1) In the grammar file: C-u C-c C-c to fully recompile the parser
automaton. You'll often need to repeat this twice before the new grammar is
compiled and *automatically evaluated*
2) In the test file: C-x C-v to revert the buffer and parse it according to
the latest grammar.

Unfortunately, this approach works a number of times before it all starts
misbehaving.

It seems to me like the more recent releases of CEDET are more resilient,
but if you're actively experimenting with the grammar and its
mode-local-overrides you'll eventually witness some weird behaviour that
wouldn't affect a grammar compiled in a fresh instance of Emacs.

Therefore in my experience the best approach would be that of writing a
build script which compiles the grammar and opens it in a fresh instance of
emacs. Better yet if the grammar if you have a number of unit tests to
check the tags produced by the grammar.

Regards,
Andrea

On Wed, Feb 17, 2016 at 12:42 PM, Gracjan Polak <[email protected]>
wrote:

> Hi all,
>
> While working on a grammar I'd like to have a more interactive workflow.
>
> I'd like to do equivalent of (progn (semantic-mode -1) (semantic-mode)),
> but maybe is there a more appropriate way to notify semantic that grammar
> has changed and it should reparse current buffer?
>
> Thanks,
> Gracjan
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> cedet-semantic mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic