类 JFlexLexer

java.lang.Object
com.thoughtworks.qdox.parser.impl.JFlexLexer
所有已实现的接口:
CommentScanner, JavaLexer, Lexer

public class JFlexLexer extends Object implements JavaLexer
  • 字段详细资料

    • YYEOF

      public static final int YYEOF
      This character denotes the end of file.
      另请参阅:
    • YYINITIAL

      public static final int YYINITIAL
      另请参阅:
    • JAVADOC

      public static final int JAVADOC
      另请参阅:
    • JAVADOCTAG

      public static final int JAVADOCTAG
      另请参阅:
    • JAVADOCLINE

      public static final int JAVADOCLINE
      另请参阅:
    • CODEBLOCK

      public static final int CODEBLOCK
      另请参阅:
    • PARENBLOCK

      public static final int PARENBLOCK
      另请参阅:
    • ASSIGNMENT

      public static final int ASSIGNMENT
      另请参阅:
    • STRING

      public static final int STRING
      另请参阅:
    • CHAR

      public static final int CHAR
      另请参阅:
    • SINGLELINECOMMENT

      public static final int SINGLELINECOMMENT
      另请参阅:
    • MULTILINECOMMENT

      public static final int MULTILINECOMMENT
      另请参阅:
    • ANNOTATION

      public static final int ANNOTATION
      另请参阅:
    • ANNOSTRING

      public static final int ANNOSTRING
      另请参阅:
    • ANNOCHAR

      public static final int ANNOCHAR
      另请参阅:
    • ARGUMENTS

      public static final int ARGUMENTS
      另请参阅:
    • NAME

      public static final int NAME
      另请参阅:
    • ANNOTATIONTYPE

      public static final int ANNOTATIONTYPE
      另请参阅:
    • ENUM

      public static final int ENUM
      另请参阅:
    • MODULE

      public static final int MODULE
      另请参阅:
    • RECORD

      public static final int RECORD
      另请参阅:
    • TYPE

      public static final int TYPE
      另请参阅:
    • ANNOTATIONNOARG

      public static final int ANNOTATIONNOARG
      另请参阅:
    • ATANNOTATION

      public static final int ATANNOTATION
      另请参阅:
    • NAME_OR_MODIFIER

      public static final int NAME_OR_MODIFIER
      另请参阅:
  • 构造器详细资料

    • JFlexLexer

      public JFlexLexer(Reader reader, Writer writer)
    • JFlexLexer

      public JFlexLexer(InputStream stream)
    • JFlexLexer

      public JFlexLexer(InputStream stream, Writer writer)
    • JFlexLexer

      public JFlexLexer(Reader in)
      Creates a new scanner
      参数:
      in - the java.io.Reader to read input from.
  • 方法详细资料

    • text

      public String text()
      指定者:
      text 在接口中 Lexer
    • lex

      public int lex() throws IOException
      指定者:
      lex 在接口中 Lexer
      抛出:
      IOException
    • getLine

      public int getLine()
      指定者:
      getLine 在接口中 Lexer
    • getColumn

      public int getColumn()
      指定者:
      getColumn 在接口中 Lexer
    • getCodeBody

      public String getCodeBody()
      指定者:
      getCodeBody 在接口中 Lexer
    • addCommentHandler

      public void addCommentHandler(CommentHandler handler)
      从接口复制的说明: CommentScanner
      Register this handler as a comment-listener. If scanner hits a comment, all handlers will be triggered.
      指定者:
      addCommentHandler 在接口中 CommentScanner
      参数:
      handler - the commentHandler to add to the CommentScanner
    • yyclose

      public final void yyclose() throws IOException
      Closes the input reader.
      抛出:
      IOException - if the reader could not be closed.
    • yyreset

      public final void yyreset(Reader reader)
      Resets the scanner to read from a new input stream.

      Does not close the old reader.

      All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.

      Internal scan buffer is resized down to its initial length, if it has grown.

      参数:
      reader - The new input stream.
    • yyatEOF

      public final boolean yyatEOF()
      Returns whether the scanner has reached the end of the reader it reads from.
      返回:
      whether the scanner has reached EOF.
    • yystate

      public final int yystate()
      Returns the current lexical state.
      返回:
      the current lexical state.
    • yybegin

      public final void yybegin(int newState)
      Enters a new lexical state.
      参数:
      newState - the new lexical state
    • yytext

      public final String yytext()
      Returns the text matched by the current regular expression.
      返回:
      the matched text.
    • yycharat

      public final char yycharat(int position)
      Returns the character at the given position from the matched text.

      It is equivalent to yytext().charAt(pos), but faster.

      参数:
      position - the position of the character to fetch. A value from 0 to yylength()-1.
      返回:
      the character at position.
    • yylength

      public final int yylength()
      How many characters were matched.
      返回:
      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.

      参数:
      number - the number of characters to be read again. This number must not be greater than yylength().
    • yylex

      public int yylex() throws IOException
      Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
      返回:
      the next token.
      抛出:
      IOException - if any I/O-Error occurs.