Interface IQcGrammarConstruct
Creates a Parser for a custom grammar construct that is loaded and used by the QuantumParser. Grammar constructs are tested and used before resorting to IQcParsers for object value parsing.
Namespace: QFSW.QC
Assembly: QFSW.QC.dll
Syntax
public interface IQcGrammarConstruct
Properties
Precedence
The precedence of this grammar construct.
Declaration
int Precedence { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Match(String, Type)
If the incoming data matches this grammar construct.
Declaration
bool Match(string value, Type type)
Parameters
Type | Name | Description |
---|---|---|
String | value | The incoming string data. |
Type | type | The type to test. |
Returns
Type | Description |
---|---|
Boolean | If it matches the grammar defined by this construct. |
Parse(String, Type, Func<String, Type, Object>)
Parses the incoming string to the specified type.
Declaration
object Parse(string value, Type type, Func<string, Type, object> recursiveParser)
Parameters
Type | Name | Description |
---|---|---|
String | value | The incoming string data. |
Type | type | The type to parse the incoming string to. |
Func<String, Type, Object> | recursiveParser | Delegate back to the main parser to allow for recursive parsing of sub elements. |
Returns
Type | Description |
---|---|
Object | The parsed object. |