All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class collage.parser.CSParser

java.lang.Object
   |
   +----collage.parser.CSParser

public class CSParser
extends Object
implements CSParserConstants

Variable Index

 o error_column
 o error_line
 o error_string
 o expected_tokens
 o lookingAhead
 o token
 o token_source

Constructor Index

 o CSParser(CSParserTokenManager)
 o CSParser(InputStream)

Method Index

 o AddPoint(PointSequence)
 o disable_tracing()
 o enable_tracing()
 o getEnvi()
Returns the environment object which contains all relevant results of a global parsing process.
 o getNextToken()
 o getToken(int)
 o main(String[])
The main function may be used to test this parser as an external program.
 o NewPartTrans()
 o ParseAnyOf()
 o ParseBoolean()
Parses a boolean constant, which may be either "true" or "false".
 o ParseCharacter()
Parses a single character and returns it as a string.
 o ParseCollage()
Parses a single collage.
 o ParseCollageElement(Collage)
Parses one arbitrary element into a given collage.
 o ParseCollageGrammar()
Parses a complete collage grammar.
 o ParseDelete()
 o ParseDerivation(Table)
Parses a derivation specification in a given Table object.
 o ParseDerivEntry(Table)
Parses a single derivation entry into a given Table object.
 o ParseEdge(EdgeSet)
Parses a single Hyperedge.
 o ParseGrammar(Grammar)
Parses the grammar part, not including parameters or derivation specification, into a given Grammar object.
 o ParseIdentifier()
Parses an identifier and returns it as a string.
 o ParseLabel()
Parses a label.
 o ParseNumber()
 o ParseOption()
Parses an arbitrary option.
 o ParseParameter(Factory)
 o ParseParameters(Factory)
 o ParsePart(EdgeSet)
Parses a single "part".
 o ParsePins(PointSequence)
Parses pin-points into a given PointSequence object.
 o ParsePoint()
 o ParsePoints(PointSequence)
 o ParsePointsTerm(PointSequence)
 o ParsePointTerm()
 o ParseProduct()
 o ParseRule(RuleSet)
Parses a single rule into a given RuleSet object.
 o ParseRuleProb()
 o ParseStartCollage()
Parses the start collage.
 o ParseString()
Parses a string enclosed in quotation marks.
 o ParseTerm()
 o PtOperation()
 o ReInit(CSParserTokenManager)
 o ReInit(InputStream)
 o setEnvi(Envi)
Sets the environment object which contains all relevant results of a global parsing process.
 o token_error()

Variables

 o token_source
  public CSParserTokenManager token_source
 o token
  public Token token
 o lookingAhead
  public boolean lookingAhead
 o error_line
  protected int error_line
 o error_column
  protected int error_column
 o error_string
  protected String error_string
 o expected_tokens
  protected String expected_tokens[]

Constructors

 o CSParser
  public CSParser(InputStream stream)
 o CSParser
  public CSParser(CSParserTokenManager tm)

Methods

 o setEnvi
  public void setEnvi(Envi envi)
Sets the environment object which contains all relevant results of a global parsing process.

This call is neccesary before the parser can be used.

 o getEnvi
  public Envi getEnvi()
Returns the environment object which contains all relevant results of a global parsing process. Note that many parsing functions can be used locally, i.e. without relying on, or affecting, the environment object.

 o main
  public static void main(String args[])
The main function may be used to test this parser as an external program. However, the results of the parsing process are lost since there is no way of storing the result in a file or something similar. Therefore, this entry point is only useful for testing purposes.

 o ParseCollageGrammar
  public final void ParseCollageGrammar() throws ParseError
Parses a complete collage grammar.

Results are stored in the envi member of this parser.

 o ParseOption
  public final void ParseOption() throws ParseError
Parses an arbitrary option.

Results are stored in the envi member of this parser.

 o ParseGrammar
  public final void ParseGrammar(Grammar cg) throws ParseError
Parses the grammar part, not including parameters or derivation specification, into a given Grammar object.

 o ParseStartCollage
  public final Collage ParseStartCollage() throws ParseError
Parses the start collage.

Returns the parsed Collage.

 o ParseCollage
  public final Collage ParseCollage() throws ParseError
Parses a single collage.

Returns the new collage.

 o ParseCollageElement
  public final void ParseCollageElement(Collage collage) throws ParseError
Parses one arbitrary element into a given collage.

Elements of a collage are pin-points, parts and edges.

 o ParsePins
  public final void ParsePins(PointSequence pins) throws ParseError
Parses pin-points into a given PointSequence object.

 o ParsePart
  public final Edge ParsePart(EdgeSet edges) throws ParseError
Parses a single "part".

If the EdgeSet parameter is not null then the new part will be added to the set.

Returns:
The parsed part
 o ParseParameters
  public final void ParseParameters(Factory factory) throws ParseError
 o ParseParameter
  public final void ParseParameter(Factory factory) throws ParseError
 o ParseEdge
  public final Edge ParseEdge(EdgeSet edges) throws ParseError
Parses a single Hyperedge.

If the EdgeSet parameter is not null then the new part will be added to the set.

Note that the Hyperedge class, which is a subclass of the abstract class Edge, is the only edge class directly known by the kernel, and thus does not require the presence of additional implementation classes.

 o ParseRule
  public final void ParseRule(RuleSet ruleSet) throws ParseError
Parses a single rule into a given RuleSet object.

 o ParseRuleProb
  public final double ParseRuleProb() throws ParseError
 o ParseAnyOf
  public final boolean ParseAnyOf() throws ParseError
 o ParseDelete
  public final boolean ParseDelete() throws ParseError
 o ParsePoints
  public final void ParsePoints(PointSequence ps) throws ParseError
 o ParsePointsTerm
  public final void ParsePointsTerm(PointSequence ps) throws ParseError
 o AddPoint
  public final void AddPoint(PointSequence ps) throws ParseError
 o ParsePoint
  public final Point ParsePoint() throws ParseError
 o ParsePointTerm
  public final Point ParsePointTerm() throws ParseError
 o ParseDerivation
  public final void ParseDerivation(Table table) throws ParseError
Parses a derivation specification in a given Table object.

 o ParseDerivEntry
  public final void ParseDerivEntry(Table table) throws ParseError
Parses a single derivation entry into a given Table object.

 o PtOperation
  public final void PtOperation() throws ParseError
 o NewPartTrans
  public final void NewPartTrans() throws ParseError
 o ParseNumber
  public final Number ParseNumber() throws ParseError
 o ParseProduct
  public final Number ParseProduct() throws ParseError
 o ParseTerm
  public final Number ParseTerm() throws ParseError
 o ParseLabel
  public final String ParseLabel() throws ParseError
Parses a label.

A label is considered to be a string enclosed in quotation marks, or a single alphabetic character, or an identifier. Returns the parsed entity as a String.

 o ParseString
  public final String ParseString() throws ParseError
Parses a string enclosed in quotation marks.

The quotation marks are excluded from the resulting string.

 o ParseCharacter
  public final String ParseCharacter() throws ParseError
Parses a single character and returns it as a string.

 o ParseBoolean
  public final Boolean ParseBoolean() throws ParseError
Parses a boolean constant, which may be either "true" or "false".

 o ParseIdentifier
  public final String ParseIdentifier() throws ParseError
Parses an identifier and returns it as a string.

 o ReInit
  public void ReInit(InputStream stream)
 o ReInit
  public void ReInit(CSParserTokenManager tm)
 o getNextToken
  public final Token getNextToken() throws ParseError
 o getToken
  public final Token getToken(int index) throws ParseError
 o token_error
  protected void token_error()
 o enable_tracing
  public final void enable_tracing()
 o disable_tracing
  public final void disable_tracing()

All Packages  Class Hierarchy  This Package  Previous  Next  Index