Package org.intellij.jflex.parser
Class _JFlexLexer
java.lang.Object
org.intellij.jflex.parser._JFlexLexer
- All Implemented Interfaces:
com.intellij.lexer.FlexLexer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intNumber of characters from the last newline up to the start of the matched text.static final intThis character denotes the end of filestatic final intlexical states -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.intellij.psi.tree.IElementTypeadvance()Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.final intfinal intvoidreset(CharSequence buffer, int start, int end, int initialState) final voidyybegin(int newState) Enters a new lexical statefinal charyycharat(int pos) Returns the character at positionposfrom the matched text.final intyylength()Returns the length of the matched text region.voidyypushback(int number) Pushes the specified amount of characters back into the input stream.final intyystate()Returns the current lexical state.final CharSequenceyytext()Returns the text matched by the current regular expression.
-
Field Details
-
YYEOF
public static final int YYEOFThis character denotes the end of file- See Also:
-
YYINITIAL
public static final int YYINITIALlexical states- See Also:
-
COMMENT
public static final int COMMENT- See Also:
-
MACROS
public static final int MACROS- See Also:
-
CODE
public static final int CODE- See Also:
-
REGEXPSTART
public static final int REGEXPSTART- See Also:
-
EXPRBAR
public static final int EXPRBAR- See Also:
-
REGEXP
public static final int REGEXP- See Also:
-
STATES
public static final int STATES- See Also:
-
ACTION_CODE
public static final int ACTION_CODE- See Also:
-
STRING_CONTENT
public static final int STRING_CONTENT- See Also:
-
CHARCLASS
public static final int CHARCLASS- See Also:
-
MACROUSE
public static final int MACROUSE- See Also:
-
REPEATEXP
public static final int REPEATEXP- See Also:
-
CLASSCHARS
public static final int CLASSCHARS- See Also:
-
CHARRANGE
public static final int CHARRANGE- See Also:
-
REGEXP_CODEPOINT
public static final int REGEXP_CODEPOINT- See Also:
-
STRING_CODEPOINT
public static final int STRING_CODEPOINT- See Also:
-
SKIP_TOEOL
public static final int SKIP_TOEOL- See Also:
-
SKIP_WSNL
public static final int SKIP_WSNL- See Also:
-
REPORT_UNCLOSED
public static final int REPORT_UNCLOSED- See Also:
-
REGEXPSTART0
public static final int REGEXPSTART0- See Also:
-
yycolumn
protected int yycolumnNumber of characters from the last newline up to the start of the matched text.
-
-
Constructor Details
-
_JFlexLexer
public _JFlexLexer() -
_JFlexLexer
Creates a new scanner- Parameters:
in- the java.io.Reader to read input from.
-
-
Method Details
-
getTokenStart
public final int getTokenStart()- Specified by:
getTokenStartin interfacecom.intellij.lexer.FlexLexer
-
getTokenEnd
public final int getTokenEnd()- Specified by:
getTokenEndin interfacecom.intellij.lexer.FlexLexer
-
reset
- Specified by:
resetin interfacecom.intellij.lexer.FlexLexer
-
yystate
public final int yystate()Returns the current lexical state.- Specified by:
yystatein interfacecom.intellij.lexer.FlexLexer
-
yybegin
public final void yybegin(int newState) Enters a new lexical state- Specified by:
yybeginin interfacecom.intellij.lexer.FlexLexer- Parameters:
newState- the new lexical state
-
yytext
Returns the text matched by the current regular expression. -
yycharat
public final char yycharat(int pos) Returns the character at positionposfrom the matched text. It is equivalent to yytext().charAt(pos), but faster- Parameters:
pos- the position of the character to fetch. A value from 0 to yylength()-1.- Returns:
- the character at position pos
-
yylength
public final int yylength()Returns the length of the matched text region. -
yypushback
public void yypushback(int number) Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method- Parameters:
number- the number of characters to be read again. This number must not be greater than yylength()!
-
advance
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.- Specified by:
advancein interfacecom.intellij.lexer.FlexLexer- Returns:
- the next token
- Throws:
IOException- if any I/O-Error occurs
-