Class FileLexer

  • Direct Known Subclasses:
    JavaLexer

    public abstract class FileLexer
    extends java.lang.Object
    • Constructor Detail

      • FileLexer

        public FileLexer​(java.io.Reader reader)
      • FileLexer

        public FileLexer​(java.io.Reader reader,
                         ReadBuffer readbuf)
    • Method Detail

      • yylex

        public abstract short yylex​(java.lang.Object lexrock,
                                    java.lang.Object yylval,
                                    java.util.Hashtable t)
      • getReadBuffer

        public ReadBuffer getReadBuffer()
      • setToken

        public void setToken​(Token token)
      • getToken

        public Token getToken()
      • getLineStart

        public int getLineStart()
      • getLineNumber

        public int getLineNumber()
      • getExprIndex

        public int getExprIndex()
      • getChar

        public char getChar()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • peekChar

        public char peekChar()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseIdentifier

        public java.lang.String parseIdentifier​(char c)
                                         throws java.io.IOException,
                                                ParseException
        Throws:
        java.io.IOException
        ParseException
      • parseChar

        public java.lang.Character parseChar​(char c)
                                      throws java.io.IOException,
                                             ParseException
        Throws:
        java.io.IOException
        ParseException
      • parseString

        public java.lang.String parseString​(char c)
                                     throws java.io.IOException,
                                            ParseException
        Throws:
        java.io.IOException
        ParseException
      • parseNumber

        public java.lang.Number parseNumber​(char firstChar,
                                            boolean neg)
                                     throws ParseNumberException,
                                            java.io.IOException
        first char should be [0-9-+.]

        note that the radix is hardcoded to '.', this may be different in another locale.

        Throws:
        ParseNumberException
        java.io.IOException
      • setChar

        public char[] setChar​(char[] buf,
                              int index,
                              char c)