org.graphstream.stream.file.tlp
Class TLPParser

java.lang.Object
  extended by org.graphstream.stream.file.tlp.TLPParser
All Implemented Interfaces:
TLPParserConstants, Parser

public class TLPParser
extends Object
implements Parser, TLPParserConstants

This class defines a TLP parser.


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 TLPParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.graphstream.stream.file.tlp.TLPParserConstants
AUTHOR, CBRACKET, CLUSTER, COMMENTS, DATE, DEF, DEFAULT, DIGIT, EDGE, EDGES, EOF, EOL, GRAPH, HEXDIGIT, INTEGER, NODE, NODES, OBRACKET, PROPERTY, PTYPE, REAL, STRING, TLP, tokenImage
 
Constructor Summary
TLPParser(FileSourceTLP tlp, InputStream stream)
          Create a new parser associated with a TLP source from an input stream.
TLPParser(FileSourceTLP tlp, Reader stream)
          Create a new parser associated with a DOT source from a reader.
TLPParser(InputStream stream)
          Constructor with InputStream.
TLPParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
TLPParser(Reader stream)
          Constructor.
TLPParser(TLPParserTokenManager tm)
          Constructor with generated Token Manager.
 
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(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 void ReInit(TLPParserTokenManager tm)
          Reinitialise.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public TLPParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

TLPParser

public TLPParser(FileSourceTLP tlp,
                 InputStream stream)
Create a new parser associated with a TLP source from an input stream.


TLPParser

public TLPParser(FileSourceTLP tlp,
                 Reader stream)
Create a new parser associated with a DOT source from a reader.


TLPParser

public TLPParser(InputStream stream)
Constructor with InputStream.


TLPParser

public TLPParser(InputStream stream,
                 String encoding)
Constructor with InputStream and supplied encoding


TLPParser

public TLPParser(Reader stream)
Constructor.


TLPParser

public TLPParser(TLPParserTokenManager 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(TLPParserTokenManager 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 © 2011. All Rights Reserved.