org.simantics.databoard.parser
Class DataParser

java.lang.Object
  extended by org.simantics.databoard.parser.DataParser
All Implemented Interfaces:
DataParserConstants

public class DataParser
extends java.lang.Object
implements DataParserConstants

Parser for data type definitions.

Author:
Hannu Niemist�

Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 DataParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.simantics.databoard.parser.DataParserConstants
COMMENT1, COMMENT2, DEFAULT, EOF, FLOAT, IDENT, INTEGER, LONG_STRING, POSITIVE_INTEGER, STRING, tokenImage, URI, WHITESPACE
 
Constructor Summary
DataParser(DataParserTokenManager tm)
          Constructor with generated Token Manager.
DataParser(java.io.InputStream stream)
          Constructor with InputStream.
DataParser(java.io.InputStream stream, java.lang.String encoding)
          Constructor with InputStream and supplied encoding
DataParser(java.io.Reader stream)
          Constructor.
 
Method Summary
 AstArray array()
           
 AstComponentAssignment assignment()
           
 java.lang.String attributeValue()
           
 AstType basicType()
           
 AstValue basicValue()
           
 AstComponent component()
           
 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.
 AstMap map()
           
 AstMapAssignment mapAssignment()
           
 java.lang.String numericValue()
           
 java.lang.String range()
           
 AstRecord record()
           
 AstType recordType(boolean referable)
           
 void ReInit(DataParserTokenManager tm)
          Reinitialise.
 void ReInit(java.io.InputStream stream)
          Reinitialise.
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
          Reinitialise.
 void ReInit(java.io.Reader stream)
          Reinitialise.
 AstType simpleType()
           
 AstValue tuple()
           
 AstType tupleType()
           
 AstType type()
           
 AstTypeDefinition typeDefinition()
           
 java.util.List<AstTypeDefinition> typeDefinitions()
          Type parser
 AstType typeReference()
           
 AstType unionType()
           
 AstValue value()
           
 AstValueDefinition valueDefinition()
           
 java.util.List<AstValueDefinition> valueDefinitions()
          Value parser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public DataParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

DataParser

public DataParser(java.io.InputStream stream)
Constructor with InputStream.


DataParser

public DataParser(java.io.InputStream stream,
                  java.lang.String encoding)
Constructor with InputStream and supplied encoding


DataParser

public DataParser(java.io.Reader stream)
Constructor.


DataParser

public DataParser(DataParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

typeDefinitions

public final java.util.List<AstTypeDefinition> typeDefinitions()
                                                        throws ParseException
Type parser

Throws:
ParseException

typeDefinition

public final AstTypeDefinition typeDefinition()
                                       throws ParseException
Throws:
ParseException

type

public final AstType type()
                   throws ParseException
Throws:
ParseException

unionType

public final AstType unionType()
                        throws ParseException
Throws:
ParseException

simpleType

public final AstType simpleType()
                         throws ParseException
Throws:
ParseException

basicType

public final AstType basicType()
                        throws ParseException
Throws:
ParseException

typeReference

public final AstType typeReference()
                            throws ParseException
Throws:
ParseException

numericValue

public final java.lang.String numericValue()
                                    throws ParseException
Throws:
ParseException

range

public final java.lang.String range()
                             throws ParseException
Throws:
ParseException

attributeValue

public final java.lang.String attributeValue()
                                      throws ParseException
Throws:
ParseException

tupleType

public final AstType tupleType()
                        throws ParseException
Throws:
ParseException

recordType

public final AstType recordType(boolean referable)
                         throws ParseException
Throws:
ParseException

component

public final AstComponent component()
                             throws ParseException
Throws:
ParseException

valueDefinitions

public final java.util.List<AstValueDefinition> valueDefinitions()
                                                          throws ParseException
Value parser

Throws:
ParseException

valueDefinition

public final AstValueDefinition valueDefinition()
                                         throws ParseException
Throws:
ParseException

value

public final AstValue value()
                     throws ParseException
Throws:
ParseException

basicValue

public final AstValue basicValue()
                          throws ParseException
Throws:
ParseException

array

public final AstArray array()
                     throws ParseException
Throws:
ParseException

tuple

public final AstValue tuple()
                     throws ParseException
Throws:
ParseException

record

public final AstRecord record()
                       throws ParseException
Throws:
ParseException

map

public final AstMap map()
                 throws ParseException
Throws:
ParseException

assignment

public final AstComponentAssignment assignment()
                                        throws ParseException
Throws:
ParseException

mapAssignment

public final AstMapAssignment mapAssignment()
                                     throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)
Reinitialise.


ReInit

public void ReInit(java.io.InputStream stream,
                   java.lang.String encoding)
Reinitialise.


ReInit

public void ReInit(java.io.Reader stream)
Reinitialise.


ReInit

public void ReInit(DataParserTokenManager 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.