org.pz.platypus.parsers
Class LineCommentParser

java.lang.Object
  extended by org.pz.platypus.parsers.LineCommentParser

public class LineCommentParser
extends java.lang.Object

Parser that recognizes a line comment. Note: sole method is static.

Author:
alb

Constructor Summary
LineCommentParser()
           
 
Method Summary
static boolean isLineComment(java.lang.String line, java.lang.String closingBlockCommentSymbol)
          Static method that determines whether a line is a line comment; that is, one whose first non-whitespace characters are %%.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineCommentParser

public LineCommentParser()
Method Detail

isLineComment

public static boolean isLineComment(java.lang.String line,
                                    java.lang.String closingBlockCommentSymbol)
                             throws java.lang.IllegalArgumentException
Static method that determines whether a line is a line comment; that is, one whose first non-whitespace characters are %%. If it find this character combo, we must make sure it's not the closing symbol for a block comment (which can, in fact, start with multiple %% characters). If it is the close to a block comment, then it's not a line comment.

Parameters:
line - line to isLineComment for line comment
closingBlockCommentSymbol - null if we're not in a block comment; the symbol, if we are.
Returns:
true if this is a line comment, false if it's not
Throws:
java.lang.IllegalArgumentException - if passed a null line


Copyright © 2008-10 Pacific Data Works LLC