diva.sketch.parser2d
Interface Rule

All Known Implementing Classes:
AbstractRule, SingleRule

public interface Rule

A parse rule interface that matches the RHS of a production and generates the LHS.

Version:
$Revision: 1.9 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Method Summary
 Type getLHSType()
          Return the LHS type of the rule.
 String[] getRHSNames()
          Return the RHS names of the rule.
 Type[] getRHSTypes()
          Return the RHS types of the rule.
 CompositeElement match(CompositeElement[] rhs, Scene db)
          Match the given scene elements and return a resulting element, or return null if there is no match.
 

Method Detail

getLHSType

Type getLHSType()
Return the LHS type of the rule.


getRHSTypes

Type[] getRHSTypes()
Return the RHS types of the rule.


getRHSNames

String[] getRHSNames()
Return the RHS names of the rule.


match

CompositeElement match(CompositeElement[] rhs,
                       Scene db)
Match the given scene elements and return a resulting element, or return null if there is no match.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.