org.graphstream.stream.file.pajek
Class PajekParser

java.lang.Object
  extended by org.graphstream.stream.file.pajek.PajekParser
All Implemented Interfaces:
PajekParserConstants, Parser

public class PajekParser
extends Object
implements Parser, PajekParserConstants


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 PajekParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.graphstream.stream.file.pajek.PajekParserConstants
A, A1, A2, AP, ARCS, ARCSLIST, B, BC, BOX, BW, C, COMMENT, CROSS, DEFAULT, DIAMOND, DIGIT, EDGES, EDGESLIST, ELLIPSE, EMPTY, EOF, EOL, FONT, FOS, H1, H2, HEXDIGIT, IC, INT, K1, K2, KEY, L, LA, LC, LP, LPHI, LR, MATRIX, NETWORK, P, PHI, Q, R, REAL, S, SIZE, STRING, tokenImage, TRIANGLE, VERTICES, W, XFACT, YFACT
 
Constructor Summary
PajekParser(FileSourcePajek pajek, InputStream stream)
           
PajekParser(FileSourcePajek pajek, Reader stream)
           
PajekParser(InputStream stream)
          Constructor with InputStream.
PajekParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
PajekParser(PajekParserTokenManager tm)
          Constructor with generated Token Manager.
PajekParser(Reader stream)
          Constructor.
 
Method Summary
 void all()
          Unused rule, call it to slurp in the whole file.
 Token anyGraphicAttribute()
           
 void close()
          Closes the parser, closing the opened stream.
 String color()
           
 void disable_tracing()
          Disable tracing.
 void edge()
           
 void edgeList()
           
 void edges()
           
 void enable_tracing()
          Enable tracing.
 void EO()
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 String keyOrString()
           
 void matrix()
           
 ArrayList<String> matrixline(org.graphstream.stream.file.pajek.EdgeMatrix mat)
           
 void network()
           
 boolean next()
           
 String number()
           
 void open()
          Start parsing the stream.
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(PajekParserTokenManager tm)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 Token validIdentifier()
           
 void vertex()
           
 void vertices()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public PajekParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

PajekParser

public PajekParser(FileSourcePajek pajek,
                   InputStream stream)

PajekParser

public PajekParser(FileSourcePajek pajek,
                   Reader stream)

PajekParser

public PajekParser(InputStream stream)
Constructor with InputStream.


PajekParser

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


PajekParser

public PajekParser(Reader stream)
Constructor.


PajekParser

public PajekParser(PajekParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

open

public void open()
Description copied from interface: Parser
Start parsing the stream.

Specified by:
open in interface Parser

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
Unused rule, call it to slurp in the whole file.

Specified by:
all in interface Parser
Throws:
ParseException

next

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

network

public final void network()
                   throws ParseException
Throws:
ParseException

vertices

public final void vertices()
                    throws ParseException
Throws:
ParseException

vertex

public final void vertex()
                  throws ParseException
Throws:
ParseException

edges

public final void edges()
                 throws ParseException
Throws:
ParseException

edge

public final void edge()
                throws ParseException
Throws:
ParseException

edgeList

public final void edgeList()
                    throws ParseException
Throws:
ParseException

matrix

public final void matrix()
                  throws ParseException
Throws:
ParseException

matrixline

public final ArrayList<String> matrixline(org.graphstream.stream.file.pajek.EdgeMatrix mat)
                                   throws ParseException
Throws:
ParseException

keyOrString

public final String keyOrString()
                         throws ParseException
Throws:
ParseException

number

public final String number()
                    throws ParseException
Throws:
ParseException

color

public final String color()
                   throws ParseException
Throws:
ParseException

EO

public final void EO()
              throws ParseException
Throws:
ParseException

anyGraphicAttribute

public final Token anyGraphicAttribute()
                                throws ParseException
Throws:
ParseException

validIdentifier

public final Token validIdentifier()
                            throws ParseException
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(PajekParserTokenManager 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.