/*
* Reference ETL Parser for Java
* Copyright (c) 2000-2009 Constantine A Plotnikov
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.sf.etl.parsers;
import java.io.Reader;
/**
* <p>
* Term parser that returns events related to the terms. Along with all
* information returned by phrase parser, this parser returns object boundaries
* in the source code.
* </p>
*
* <p>
* The parser can be used "as is" and as foundation for AST based parsers.
* </p>
*
* @see net.sf.etl.parsers.beans.BeansTermParser
*
* @author const
*/
public interface TermParser extends AbstractParser<TermToken> {
/**
* Reparse sequence of segments. After end of segment sequence a EOF is
* reported.
*
* @param systemId
* a system id of the source being reparsed
* @param context
* a context of reparsing
* @param startPos
* a start position
* @param characters
* a data to reparse. The data should start before start of the
* segment being reparsed.
*/
void reparseSegmentSequence(String systemId, TermContext context,
TextPos startPos, Reader characters);
/**
* Reparse expression
*
* @param systemId
* a system id of the source being reparsed
* @param context
* a context of reparsing
* @param startPos
* a start position
* @param characters
* a data to reparse. The data should start before start of the
* segment being reparsed.
*/
void reparseExpression(String systemId, TermContext context,
TextPos startPos, Reader characters);
}