spo.src.SPDB.Query
Class Parser

java.lang.Object
  |
  +--spo.src.SPDB.Query.Parser

public class Parser
extends java.lang.Object

A class which constructs a Recursive-Decent Parse tree Rules follow E -> V E -> OE|OEE O -> S|P|C|X|J V -> $ OR E -> V E -> O_1E E -> O_2EE O_1 -> S|P|C O_2 -> X|J V -> $


Constructor Summary
Parser(java.lang.String inputString)
          Initialize an instance for the class
 
Method Summary
 parseTree buildTree()
          Build the parse tree
 void evaluateTree(parseTree tree)
          Evaluate the query
static void main(java.lang.String[] args)
           
 java.util.Vector parseSQuery()
          Parse the actual structured query into a Vector format
 void showTree(parseTree tree)
          Show the parse tree in postorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(java.lang.String inputString)
Initialize an instance for the class

Parameters:
inputString - the string to be parsed
Method Detail

main

public static void main(java.lang.String[] args)

buildTree

public parseTree buildTree()
Build the parse tree


showTree

public void showTree(parseTree tree)
Show the parse tree in postorder

Parameters:
tree - the input parse tree

evaluateTree

public void evaluateTree(parseTree tree)
Evaluate the query

Parameters:
tree - the input parse tree

parseSQuery

public java.util.Vector parseSQuery()
Parse the actual structured query into a Vector format



Copyright © 2003 UKCS. All Rights Reserved.