[][src]Macro lalrpop_util::lalrpop_mod

macro_rules! lalrpop_mod {
    ($(#[$attr:meta])* $modname:ident) => { ... };
    ($(#[$attr:meta])* pub $modname:ident) => { ... };
    ($(#[$attr:meta])* $modname:ident, $source:expr) => { ... };
    ($(#[$attr:meta])* pub $modname:ident, $source:expr) => { ... };
}

Define a module using the generated parse from a .lalrpop file.

You have to specify the name of the module and the path of the file generated by LALRPOP. If the input is in the root directory, you can omit it.

Example

This example is not tested
// load parser in src/parser.lalrpop
lalrpop_mod!(parser);

// load parser in src/lex/parser.lalrpop
lalrpop_mod!(parser, "/lex/parser.rs");

// define a public module
lalrpop_mod!(pub parser);