org.graphstream.stream.file.dot
Class DOTParser

java.lang.Object
  extended by 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 Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 DOTParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.graphstream.stream.file.dot.DOTParserConstants
COLON, COMMA, DEFAULT, DIGIT, DIGRAPH, EDGE, EDGE_OP, EOF, EOL, EQUALS, GRAPH, HEXDIGIT, LBRACE, LSQBR, NODE, RBRACE, REAL, RSQBR, STRICT, STRING, SUBGRAPH, tokenImage, WORD
 
Constructor Summary
DOTParser(DOTParserTokenManager tm)
          Constructor with generated Token Manager.
DOTParser(FileSourceDOT dot, InputStream stream)
          Create a new parser associated with a DOT source from an input stream.
DOTParser(FileSourceDOT dot, Reader stream)
          Create a new parser associated with a DOT source from a reader.
DOTParser(InputStream stream)
          Constructor with InputStream.
DOTParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
DOTParser(Reader stream)
          Constructor.
 
Method Summary
 void all()
          Parse the whole stream.
 void close()
          Closes the parser, closing the opened stream.
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 boolean next()
           
 void open()
          Start parsing the stream.
 void ReInit(DOTParserTokenManager tm)
          Reinitialise.
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public DOTParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

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 Detail

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.



Copyright © 2012. All Rights Reserved.