Persistate API documentation
GenerateParserFromFile Method (grammarFile, targetGenerator, generatedParser, errors)
NamespacesPersistate.LanguageSyntaxParserGenerateParserFromFile(String, IGeneratorClass, SyntaxParser%, ErrorToken%)

[This is preliminary documentation and is subject to change.]

Generates a SyntaxParser for a particular grammar from a text file. The grammar and target language will be case sensitive.
Declaration Syntax
C#
public static bool GenerateParserFromFile(
	string grammarFile,
	IGeneratorClass targetGenerator,
	out SyntaxParser generatedParser,
	out ErrorToken errors
)
Parameters
grammarFile (String)
The full path and file name of a text file containing the grammar for the parser to be generated. See the SyntaxParser documentation for details of how to write a grammar.
targetGenerator (IGeneratorClass)
The object to be used for generating code with the generated parser. This should have one method with the same LHS name as each production you want to handle during the code generation process.
generatedParser (SyntaxParser%)
On return, the SyntaxParser generated for the supplied grammar, or null if any lexical of syntax errors occurred.
errors (ErrorToken%)
On return, if no errors occurred, then null, otherwise an ErrorToken containing a single error of a collection of errors.
Return Value
True if no errors occurred and a SyntaxParser was generated, otherwise false.

Assembly: Persistate.Language (Module: Persistate.Language) Version: 0.6.1.20 (0.6.1.20)