public ENFA_GroupingEnd(ENFA_Controller controller, bool recording, string groupName, ENFA_GroupingEnd parent, StateType stateType) : base(controller, stateType) { _parent = parent; _recording = recording; if (string.IsNullOrEmpty(groupName)) { groupName = Guid.NewGuid().ToString(); } _groupName = groupName; if (_recording) { RegisterGroupName(_groupName); } }
private void Kill() { if (Node.List.Count > 1) { Node.List.Remove(this); // TODO remove matches from matchTree until split _controller = null; _node = null; _patternLocation = null; } else { // TODO Insert Error token for one char and go back } }
public ENFA_Tokenizer(ENFA_Controller controller) { _controller = controller; }
public ENFA_GroupStart(ENFA_Controller controller, ENFA_GroupingStart parent) : base(controller, parent) { }
public ENFA_Parser(ENFA_Controller controller) { _controller = controller; }
public ENFA_Regex_MatchPath(ENFA_Regex_MatchPath cloneThis) { _controller = cloneThis.Controller; _node = cloneThis.Node; _patternLocation = cloneThis.PatternLocation; }
//A state can be a pattern end public ENFA_PatternEnd(ENFA_PatternStart patternStart, ENFA_Controller controller, string terminalName, StateType stateType) : base(controller, true, terminalName, null, stateType) { _patternStart = patternStart; _terminalName = terminalName; }
//A state can be a lookbehind end public ENFA_LookbehindEnd(ENFA_Controller controller, ENFA_LookbehindStart lookbehindStart, ENFA_GroupingEnd parent) : base(controller, false, null, parent) { _lookbehindStart = lookbehindStart; }
public ENFA_Grammar_Parser(ENFA_Controller controller) : base(controller) { }
public ENFA_GroupingStart(ENFA_Controller controller, ENFA_GroupingStart parent) : base(controller, StateType.NotApplicable) { _parent = parent; }
//A state can be a group end public ENFA_GroupEnd(ENFA_Controller controller, ENFA_GroupStart groupStart, bool recording, string groupName, ENFA_GroupingEnd parent) : base(controller, recording, groupName, parent) { _groupStart = groupStart; }
public ENFA_Grammar_Factory(ENFA_Controller controller) : base(controller) { _grammarTokenizer = new ENFA_Grammar_Tokenizer(controller); _grammarParser = new ENFA_Grammar_Parser(controller); }
//A state* can be a placeholder for a recorded group public ENFA_PlaceHolder(ENFA_Controller controller, string groupName) : base(controller, StateType.NotApplicable) { _groupName = groupName; }
public ENFA_State(ENFA_Controller controller, ENFA_Base prevoiusState, string stateName, StateType stateType) : base(controller, stateType) { _stateName = stateName; _prevoiusState = prevoiusState; }
public ENFA_Factory(ENFA_Controller controller) { _controller = controller; }
public ENFA_Regex_Parser(ENFA_Controller controller) : base(controller) { }
//A state# can be a context switch to another grammar public ENFA_ContextSwitch(ENFA_Controller controller, StateType stateType) : base(controller, stateType) { }
//A state can be a pattern start (always recording) public ENFA_PatternStart(ENFA_Controller controller) : base(controller, null) { }
public ENFA_Grammar_Tokenizer(ENFA_Controller controller) : base(controller) { }
public ENFA_GroupingEnd(ENFA_Controller controller, bool recording, string groupName, ENFA_GroupingEnd parent) : this(controller, recording, groupName, parent, StateType.NotApplicable) { }
//A state# can be a scope end (pops scope off scope stack) public ENFA_ScopeEnd(ENFA_Controller controller, StateType stateType) : base(controller, stateType) { }
public ENFA_Regex_Tokenizer(ENFA_Controller controller) : base(controller) { }
//A state can be a lookbehind start public ENFA_LookbehindStart(ENFA_Controller controller, AssertionType assertionType, ENFA_GroupingStart parent) : base(controller, parent) { _assertionType = assertionType; }
public ENFA_Regex_Factory(ENFA_Controller controller) : base(controller) { _regexTokenizer = new ENFA_Regex_Tokenizer(controller); _regexParser = new ENFA_Regex_Parser(controller); }