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

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

Generates a SyntaxParser for a particular grammar from a text file.
Declaration Syntax
C#
public static bool GenerateParserFromFile(
	string grammarFile,
	IGeneratorClass targetGenerator,
	bool caseSensitive,
	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 file.
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.
caseSensitive (Boolean)
If true, the language that the generated parser parses will be case sensitive, if false it will be case insensitive.
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)