/// <summary> /// Called when the previous Detect() call has loaded the token /// into the parent stack and the lexer is now asking the token /// whether or not it wants to be unloaded as a parent (e.g the /// current code block has finished). /// </summary> /// <param name="l">The lexer.</param> /// <returns>Whether or not to unload the token as a parent.</returns> internal virtual bool DetectEnd(Lexer l) { return true; }
public Machine(string inpath, string outhpath, string outcpath) { this.p_InputFile = new StreamReader(inpath); this.p_OutputHFile = new StreamWriter(outhpath); this.p_OutputCFile = new StreamWriter(outcpath); this.p_FilePath = inpath; this.p_OutputHFile.NewLine = "\n"; this.p_OutputCFile.NewLine = "\n"; this.p_Lexer = new Lexer(this); this.p_Transformer = new LuaTransformer(this); }
/// <summary> /// Called when the lexer is asking the token to detect whether /// or not the current text state is suitable for it's use. /// </summary> /// <param name="l">The lexer.</param> internal abstract void Detect(Lexer l);