|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jparsec.Indentation
public final class Indentation
Processes indentation based lexical structure according to the Off-side rule.
Field Summary | |
---|---|
static Parser<Void> |
WHITESPACES
A Parser that recognizes 1 or more whitespace characters on the same line. |
Constructor Summary | |
---|---|
Indentation()
Creates a Indentation object that generates default indent and outdent tokens. |
|
Indentation(Object indent,
Object outdent)
Creates an Indentation object that uses indent and outdent as the
token values for indentation and outdentation. |
Method Summary | |
---|---|
Parser<Token> |
indent()
A Parser that recognizes the generated indent token. |
Parser<List<Token>> |
lexer(Parser<?> tokenizer,
Parser<?> delim)
A Parser that greedily runs tokenizer , and translates line feed characters
('\n' ) to indent and outdent tokens. |
Parser<Token> |
outdent()
A Parser that recognizes the generated outdent token. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Parser<Void> WHITESPACES
Parser
that recognizes 1 or more whitespace characters on the same line.
Line continutation (escaped by a backslash character '\'
) is considered the same line.
Constructor Detail |
---|
public Indentation(Object indent, Object outdent)
Indentation
object that uses indent
and outdent
as the
token values for indentation and outdentation.
public Indentation()
Indentation
object that generates default indent and outdent tokens.
Method Detail |
---|
public Parser<Token> indent()
Parser
that recognizes the generated indent
token.
public Parser<Token> outdent()
Parser
that recognizes the generated outdent
token.
public Parser<List<Token>> lexer(Parser<?> tokenizer, Parser<?> delim)
Parser
that greedily runs tokenizer
, and translates line feed characters
('\n'
) to indent
and outdent
tokens.
Return values are wrapped in Token
objects and collected in a List
.
Patterns recognized by delim
are ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |