Package org.graphstream.stream.file.dot
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 Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.DOTParserTokenManagertoken_sourceGenerated Token Manager. -
Constructor Summary
Constructors Constructor Description DOTParser(InputStream stream)Constructor with InputStream.DOTParser(InputStream stream, String encoding)Constructor with InputStream and supplied encodingDOTParser(Reader stream)Constructor.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. -
Method Summary
Modifier and Type Method Description voidall()Parse the whole stream.voidclose()Closes the parser, closing the opened stream.voiddisable_tracing()Disable tracing.voidenable_tracing()Enable tracing.ParseExceptiongenerateParseException()Generate ParseException.TokengetNextToken()Get the next Token.TokengetToken(int index)Get the specific Token.booleannext()voidopen()Start parsing the stream.voidReInit(InputStream stream)Reinitialise.voidReInit(InputStream stream, String encoding)Reinitialise.voidReInit(Reader stream)Reinitialise.voidReInit(DOTParserTokenManager tm)Reinitialise.
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
DOTParser
Create a new parser associated with a DOT source from an input stream. -
DOTParser
Create a new parser associated with a DOT source from a reader. -
DOTParser
Constructor with InputStream. -
DOTParser
Constructor with InputStream and supplied encoding -
DOTParser
Constructor. -
DOTParser
Constructor with generated Token Manager.
-
-
Method Details
-
close
Closes the parser, closing the opened stream.- Specified by:
closein interfaceParser- Throws:
IOException
-
all
Description copied from interface:ParserParse the whole stream.- Specified by:
allin interfaceParser- Throws:
ParseException
-
next
- Specified by:
nextin interfaceParser- Returns:
- Throws:
ParseException
-
open
Description copied from interface:ParserStart parsing the stream.- Specified by:
openin interfaceParser- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-