Class Lexer

java.lang.Object
com.easydesk.lucene.analyzer.latex.Lexer
Direct Known Subclasses:
LaTeXLexer

public abstract class Lexer extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    DOCUMENT ME!
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract int
    getKeyword(int position, boolean strict)
    Get the keyword at the current position
    abstract int
    Get the token's identifier
    abstract void
    Set the document in the lexer
    abstract void
    setRange(int start, int end)
    Set the range to parse
    abstract int
    Get the actual position in the parsed reader
    abstract int
    Get the length of the matched token

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • start

      public int start
      DOCUMENT ME!
  • Constructor Details

    • Lexer

      public Lexer()
  • Method Details

    • setRange

      public abstract void setRange(int start, int end)
      Set the range to parse
      Parameters:
      start - the start
      end - the end
    • yychar

      public abstract int yychar()
      Get the actual position in the parsed reader
      Returns:
      the position
    • yylength

      public abstract int yylength()
      Get the length of the matched token
      Returns:
      the length
    • scan

      public abstract int scan() throws IOException
      Get the token's identifier
      Returns:
      the id
      Throws:
      IOException
    • getKeyword

      public abstract int getKeyword(int position, boolean strict)
      Get the keyword at the current position
      Parameters:
      position - where to search
      strict - if true then the keyword is searched just after position
      Returns:
      the keyword id
    • setDocument

      public abstract void setDocument(Document doc)
      Set the document in the lexer
      Parameters:
      doc - the document