Next: , Previous: package Decl, Up: Declarations

2.3.2 languagemode Decl

— %-Decl: %languagemode mode1...

Declare in which major modes Emacs edits the sources that semantic parses using this grammar.

For instance, the following declares that the grammar will be used to parse files edited in c-mode or c++-mode by Emacs.

          %languagemode c-mode c++-mode

Typically, when a parser file is re-generated from a modified grammar, language modes are used to refresh local parser settings in buffers currently edited in those major modes.