Class Lexer


  • public class Lexer
    extends Object
    Lexer of the CND definition.
    • Constructor Detail

      • Lexer

        public Lexer​(Reader r,
                     String systemId)
        Creates an unitialized lexer on top of the given reader.
        Parameters:
        r - the reader
        systemId - informational systemid of the given stream
    • Method Detail

      • getSystemId

        public String getSystemId()
        Returns the system id
        Returns:
        the system id
      • getLineNumber

        public int getLineNumber()
      • fail

        public void fail​(String message)
                  throws ParseException
        Creates a failure exception including the current line number and systemid.
        Parameters:
        message - message
        Throws:
        ParseException - the created exception
      • fail

        public void fail​(String message,
                         Throwable e)
                  throws ParseException
        Creates a failure exception including the current line number and systemid.
        Parameters:
        message - message
        e - root cause
        Throws:
        ParseException - the created exception
      • fail

        public void fail​(Throwable e)
                  throws ParseException
        Creates a failure exception including the current line number and systemid.
        Parameters:
        e - root cause
        Throws:
        ParseException - the created exception