Class DOTParser

java.lang.Object
org.graphstream.stream.file.dot.DOTParser
All Implemented Interfaces:
DOTParserConstants, Parser

public class DOTParser
extends Object
implements Parser, DOTParserConstants
This class defines a DOT parser. It respects the specifications of the DOT language that can be found here. Subgraph produces no error but has no effect on the graph.
  • Field Details

    • token_source

      public DOTParserTokenManager token_source
      Generated Token Manager.
    • token

      public Token token
      Current token.
    • jj_nt

      public Token jj_nt
      Next token.
  • Constructor Details

    • DOTParser

      public DOTParser​(FileSourceDOT dot, InputStream stream)
      Create a new parser associated with a DOT source from an input stream.
    • DOTParser

      public DOTParser​(FileSourceDOT dot, Reader stream)
      Create a new parser associated with a DOT source from a reader.
    • DOTParser

      public DOTParser​(InputStream stream)
      Constructor with InputStream.
    • DOTParser

      public DOTParser​(InputStream stream, String encoding)
      Constructor with InputStream and supplied encoding
    • DOTParser

      public DOTParser​(Reader stream)
      Constructor.
    • DOTParser

      public DOTParser​(DOTParserTokenManager tm)
      Constructor with generated Token Manager.
  • Method Details

    • close

      public void close() throws IOException
      Closes the parser, closing the opened stream.
      Specified by:
      close in interface Parser
      Throws:
      IOException
    • all

      public final void all() throws ParseException
      Description copied from interface: Parser
      Parse the whole stream.
      Specified by:
      all in interface Parser
      Throws:
      ParseException
    • next

      public final boolean next() throws ParseException
      Specified by:
      next in interface Parser
      Returns:
      Throws:
      ParseException
    • open

      public final void open() throws ParseException
      Description copied from interface: Parser
      Start parsing the stream.
      Specified by:
      open in interface Parser
      Throws:
      ParseException
    • ReInit

      public void ReInit​(InputStream stream)
      Reinitialise.
    • ReInit

      public void ReInit​(InputStream stream, String encoding)
      Reinitialise.
    • ReInit

      public void ReInit​(Reader stream)
      Reinitialise.
    • ReInit

      public void ReInit​(DOTParserTokenManager tm)
      Reinitialise.
    • getNextToken

      public final Token getNextToken()
      Get the next Token.
    • getToken

      public final Token getToken​(int index)
      Get the specific Token.
    • generateParseException

      public ParseException generateParseException()
      Generate ParseException.
    • enable_tracing

      public final void enable_tracing()
      Enable tracing.
    • disable_tracing

      public final void disable_tracing()
      Disable tracing.