Package eu.bandm.tools.xantlr.runtime
Class SAXEventGenerator
java.lang.Object
eu.bandm.tools.xantlr.runtime.SAXEventGenerator
- All Implemented Interfaces:
EventGenerator<NamespaceName,,XMLDocumentIdentifier> Locator
public class SAXEventGenerator
extends Object
implements EventGenerator<NamespaceName,XMLDocumentIdentifier>, Locator
Runtime class for an xantlr generated parser which maps the
AST-representing events onto SAX events.
For details please refer to
For the SAX events to reach a certain consumer, this class has to be linked to some SAX content handler by calling
X_LLkParser and to
the user doc.
For the SAX events to reach a certain consumer, this class has to be linked to some SAX content handler by calling
myParser.event.setContentHandler(ContentHandler) before starting the parser process.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ContentHandlerprotected XMLDocumentIdentifierfinal Attributesprotected ErrorHandlerprotected final antlr.Parserprotected Stringprotected intprotected Stringprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallow()voidcharacters(String name) voidendElement(NamespaceName name) voidvoidfatalError(String message) intintgetLocation(antlr.RecognitionException e) voidsetContentHandler(ContentHandler contentHandler) voidsetErrorHandler(ErrorHandler errorHandler) voidsetPublicId(String publicId) voidsetSystemId(String systemId) voidstartElement(NamespaceName name) voidsuppress()void
-
Field Details
-
EMPTY_ATTRIBUTES
-
parser
protected final antlr.Parser parser -
contentHandler
-
errorHandler
-
suppression
protected int suppression -
publicId
-
systemId
-
documentId
-
useSystemId
protected boolean useSystemId -
atEnd
protected transient boolean atEnd
-
-
Constructor Details
-
SAXEventGenerator
public SAXEventGenerator(antlr.Parser parser)
-
-
Method Details
-
getContentHandler
-
setContentHandler
-
getErrorHandler
-
setErrorHandler
-
suppress
public void suppress()- Specified by:
suppressin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier>
-
allow
public void allow() throws antlr.SemanticException- Specified by:
allowin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
startElement
- Specified by:
startElementin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
endElement
- Specified by:
endElementin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
characters
- Specified by:
charactersin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
warning
- Specified by:
warningin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
error
- Specified by:
errorin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
fatalError
- Specified by:
fatalErrorin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier> - Throws:
antlr.SemanticException
-
setPublicId
-
setSystemId
-
getPublicId
- Specified by:
getPublicIdin interfaceLocator
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator
-
getDocumentId
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceLocator
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceLocator
-
getLocation
- Specified by:
getLocationin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier>
-
getLocation
- Specified by:
getLocationin interfaceEventGenerator<NamespaceName,XMLDocumentIdentifier>
-