Parser package is a basic framework of interfaces for building a lexer or parser for various document types.See: Description
| Interface | Description |
|---|---|
| Lexer |
The
Lexer interface describes the set of calls that need to be implemented by a Lexer for any given language. |
| LexerToken |
The
LexerToken interface encapsulates a single token retrieved by a call to Lexer.lex(). |
| SyntaxListener | |
| SyntaxToken |
The
SyntaxToken interface encapsulates a single syntax token retrieved by a call to SyntaxTranslator.translate(). |
| Class | Description |
|---|---|
| AbstractLexer |
The
AbstractLexer is a basic abstract implementation which takes care of common functionality across all Lexers, such as the buffer and offset issues, and for providing a basic LexerToken object which just stores token and offset information. |
| AbstractLexer.DefaultLexerToken |
The
DefaultLexerToken just implements a basic LexerToken which stores a token and start/end offsets. |
| AbstractSyntaxRecognizer |
The
AbstractSyntaxRecognizer is a basic abstract implementation which takes care of common functionality across SyntaxRecognizers for LL(1) parsers. |
Parser package is a basic framework of interfaces for building a lexer or parser for various document types. It includes lexer implementations for HTML, Java, and Java properties files, and a parser implementation for Java files. It also includes a basic generic lexer implementation to quickly prototype a lexer for additional languages.
The lexer framework is defined primarily to allow rapid implementation of syntax highlighting support for new languages by implementing a Lexer for the new language and implementing the appropriate editor language interfaces necessary for a new syntax highlighting module.