sleep.parser
Class CommentRule

java.lang.Object
  extended by sleep.parser.Rule
      extended by sleep.parser.CommentRule

public class CommentRule
extends Rule


Field Summary
 
Fields inherited from class sleep.parser.Rule
close, open, PRESERVE_ENTITY, PRESERVE_SINGLE
 
Constructor Summary
CommentRule()
           
 
Method Summary
 Rule copyRule()
           
 int getType()
           
 boolean isBalanced()
           
 boolean isLeft(char n)
           
 boolean isMatch(char n)
           
 boolean isRight(char n)
           
 java.lang.String toString()
           
 void witnessClose(Token token)
          Used to keep track of closing braces to check balance later on
 void witnessOpen(Token token)
          Used to keep track of opening braces to check balance later on
 java.lang.String wrap(java.lang.String value)
           
 
Methods inherited from class sleep.parser.Rule
getLeft, getRight, getSyntaxError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommentRule

public CommentRule()
Method Detail

getType

public int getType()
Overrides:
getType in class Rule

toString

public java.lang.String toString()
Overrides:
toString in class Rule

wrap

public java.lang.String wrap(java.lang.String value)
Overrides:
wrap in class Rule

isLeft

public boolean isLeft(char n)
Overrides:
isLeft in class Rule

isRight

public boolean isRight(char n)
Overrides:
isRight in class Rule

isMatch

public boolean isMatch(char n)
Overrides:
isMatch in class Rule

isBalanced

public boolean isBalanced()
Overrides:
isBalanced in class Rule

copyRule

public Rule copyRule()
Overrides:
copyRule in class Rule

witnessOpen

public void witnessOpen(Token token)
Used to keep track of opening braces to check balance later on

Overrides:
witnessOpen in class Rule

witnessClose

public void witnessClose(Token token)
Used to keep track of closing braces to check balance later on

Overrides:
witnessClose in class Rule