|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sonar.sslr.api.Token
public class Token
Tokens are string of character like an identifier, a literal, an integer, ... which are produced by the lexer to feed the parser. By definition, comments and preprocessing directives should not be seen by the parser that's why such Trivia, when they exist, are attached to the next token.
| Nested Class Summary | |
|---|---|
static class |
Token.Builder
|
| Method Summary | |
|---|---|
void |
addAllTrivia(List<Trivia> currentTrivia)
FIXME no such method in SSLR 1.9 |
static Token.Builder |
builder()
|
static Token.Builder |
builder(Token token)
|
int |
getColumn()
|
String |
getCopyBookOriginalFileName()
|
int |
getCopyBookOriginalLine()
|
File |
getFile()
FIXME no such method in SSLR 1.9 |
int |
getLine()
|
String |
getOriginalValue()
|
List<Trivia> |
getTrivia()
|
TokenType |
getType()
|
URI |
getURI()
|
String |
getValue()
|
boolean |
hasTrivia()
|
boolean |
isCopyBook()
|
boolean |
isGeneratedCode()
|
boolean |
isOnSameLineThan(Token other)
|
boolean |
isReplacement()
|
void |
setCopyBook(boolean copyBook)
FIXME no such method in SSLR 1.9 |
void |
setCopyBookOriginalFileName(String copyBookOriginalFileName)
FIXME no such method in SSLR 1.9 |
void |
setCopyBookOriginalLine(int copyBookOriginalLine)
FIXME no such method in SSLR 1.9 |
void |
setGeneratedCode(boolean b)
FIXME no such method in SSLR 1.9 |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public TokenType getType()
public String getValue()
public String getOriginalValue()
public int getLine()
public int getColumn()
public URI getURI()
public boolean isCopyBook()
public boolean isGeneratedCode()
public boolean isReplacement()
public boolean hasTrivia()
public List<Trivia> getTrivia()
public int getCopyBookOriginalLine()
public String getCopyBookOriginalFileName()
public boolean isOnSameLineThan(Token other)
public String toString()
toString in class Objectpublic static Token.Builder builder()
public static Token.Builder builder(Token token)
public void setGeneratedCode(boolean b)
public File getFile()
public void setCopyBook(boolean copyBook)
public void setCopyBookOriginalFileName(String copyBookOriginalFileName)
public void setCopyBookOriginalLine(int copyBookOriginalLine)
public void addAllTrivia(List<Trivia> currentTrivia)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||