Persistate API documentation
GenerateParser Method (grammar, targetGenerator, caseSensitive, generatedParser, errors)
NamespacesPersistate.LanguageSyntaxParserGenerateParser(String, IGeneratorClass, Boolean, SyntaxParser%, ErrorToken%)

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

Generates a SyntaxParser for a particular grammar.
Declaration Syntax
C#
public static bool GenerateParser(
	string grammar,
	IGeneratorClass targetGenerator,
	bool caseSensitive,
	out SyntaxParser generatedParser,
	out ErrorToken errors
)
Parameters
grammar (String)
a string 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.
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 or a collection of errors. If the error(s) are syntax errors in the grammar, then no parser is produced. If the error(s) are shift/reduce or reduce/reduce conflicts, then one error message is produced with all details, but the parser is still created.
Return Value
True if a SyntaxParser was generated otherwise false. Even if the parser was generated, there may be shift/reduce or reduce/reduce conflicts reported in the errors parameters.

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