Building Parsers with Java

sjm.engine
Class Query

java.lang.Object
  |
  +--sjm.engine.Rule
        |
        +--sjm.engine.DynamicRule
              |
              +--sjm.engine.Query

public class Query
extends DynamicRule

A Query is a dynamic rule that stands outside of a program and proves itself by referring to a program.


Fields inherited from class sjm.engine.DynamicRule
as, headInvolved, scope, tail
 
Fields inherited from class sjm.engine.Rule
structures
 
Constructor Summary
  Query(AxiomSource as, Rule rule)
          Create a query from the given rule's structures, to prove itself against the given axiom source.
protected Query(AxiomSource as, Scope scope, Structure[] structures)
           
  Query(AxiomSource as, Structure structure)
          Create a query from the given structure, to prove itself against the given axiom source.
  Query(AxiomSource as, Structure[] structures)
          Create a query from the given structures, to prove itself against the given axiom source.
  Query(Structure structure)
          Create a query from the given structure, to prove itself without any axiom source.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of this query.
 
Methods inherited from class sjm.engine.DynamicRule
canEstablish, canFindNextProof, getScope, isEmpty, lookup, provableStructures, resolvent, tail, variables
 
Methods inherited from class sjm.engine.Rule
dynamicAxiom, equals, head
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Query

public Query(AxiomSource as,
             Structure[] structures)
Create a query from the given structures, to prove itself against the given axiom source.
Parameters:
AxiomSource - the source to prove against
Structures - the structures to prove

Query

public Query(AxiomSource as,
             Rule rule)
Create a query from the given rule's structures, to prove itself against the given axiom source.
Parameters:
AxiomSource - the source to prove against
Rule - the rule that contains structures to prove

Query

protected Query(AxiomSource as,
                Scope scope,
                Structure[] structures)

Query

public Query(AxiomSource as,
             Structure structure)
Create a query from the given structure, to prove itself against the given axiom source.
Parameters:
AxiomSource - the source to prove against
Structures - the structure to prove

Query

public Query(Structure structure)
Create a query from the given structure, to prove itself without any axiom source. For example new Query(new Comparison())
Parameters:
AxiomSource - the source to prove against
Structure - the structure to prove
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this query.
Overrides:
toString in class Rule
Returns:
a string representation of this query.

by Steve Metsker