// *
// * Copyright (C) 2008 Roger Alsing : http://www.RogerAlsing.com
// *
// * This library is free software; you can redistribute it and/or modify it
// * under the terms of the GNU Lesser General Public License 2.1 or later, as
// * published by the Free Software Foundation. See the included license.txt
// * or http://www.gnu.org/copyleft/lesser.html for details.
// *
// *
namespace Alsing.SourceCode.SyntaxDocumentParsers
{
///
/// Parser interface.
/// Implement this interface if you want to create your own parser.
///
public interface IParser
{
///
/// Gets or Sets the Document object for this parser
///
SyntaxDocument Document { get; set; }
///
/// Gets or Sets the SyntaxDefinition for this parser
///
SyntaxDefinition SyntaxDefinition { get; set; }
string Separators { get; set; }
///
/// Initializes the parser with a spcified SyntaxFile
///
/// Filename of the SyntaxFile that should be used
void Init(string syntaxDefinitionPath);
///
///
///
///
///
void Init(string syntaxDefinitionPath, string separators);
///
/// Initializes the parser with a spcified syntaxDefinition object
///
/// The Language object to assign to the parser
void Init(SyntaxDefinition syntaxDefinition);
///
/// Called by the SyntaxDocument object when a row should be parsed
///
/// The row index in the document
/// true if keywords and operators should be parsed , false if only a span parse should be performed
void ParseRow(int RowIndex, bool ParseKeywords);
///
/// Called by the SyntaxDocument object when a row must be preview parsed.
///
/// Row index in the document
void ParsePreviewLine(int RowIndex);
}
}