Aardvark.Base


ParserCase<'TNode>

Case represents a state transition of a generic recursive descent parser.

Constructors

ConstructorDescription
new(pattern, matchedFun, adjustFun)
Signature: (pattern:string * matchedFun:Func<TextParser,'TNode,ParserState<'TNode>> * adjustFun:Func<TextParser,'TNode,Text,Text>) -> unit

A supplied adjustFun can modify the text preceeding the match of the case in a searching state, before it is handed to the TextAct of the state.

new(matchedFun, adjustFun)
Signature: (matchedFun:Func<TextParser,'TNode,ParserState<'TNode>> * adjustFun:Func<TextParser,'TNode,Text,Text>) -> unit
new(regex, matchedFun, adjustFun)
Signature: (regex:Regex * matchedFun:Func<TextParser,'TNode,ParserState<'TNode>> * adjustFun:Func<TextParser,'TNode,Text,Text>) -> unit
new(rx, matchedFun, adjustFun)
Signature: (rx:Rx * matchedFun:Func<TextParser,'TNode,ParserState<'TNode>> * adjustFun:Func<TextParser,'TNode,Text,Text>) -> unit
Fork me on GitHub