Navigation
Synopsis Save the current object parser to a file.
Function str saveParser(loc outFile)
Usage import ParseTree;
Description saveParser will save the current object parser (constructed from (imported) syntax declarations) to a file. The name of the parser class is returned, for reference.

The saved parser can be used later on by loading the parser class from the JAR file, instantiating it and calling the parse() method.
Examples
import ParseTree;
// import a grammar
import demo::lang::Exp::Concrete::NoLayout::Syntax;

// save the parser to a JAR file
saveParser(|file:///tmp/Exp.jar|);
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.