Next: , Up: Declarations


2.3.1 package Decl

— %-Decl: %package library-name

Declare the Emacs Lisp library created from the grammar.

This will generate an Emacs Lisp file named library-name.el, and provide the library-name feature at the end of the generated file with:

          (provide 'library-name)

All variable and function names generated from the declarations section will be prefixed by library-name-, following Emacs standard coding conventions.

If there is no %package statement, a default library-name is used, of the form:

          grammar_filename_sans_extention-grammar_filename_extention

For instance, the default library name for the grammar in the foo.wy file is foo-wy.