changes to build script to increase java heap memory
[IRC.git] / Robust / JavaGrammar / Lex / Comment.java
1 package Lex;
2
3 abstract class Comment extends InputElement {
4   private StringBuffer comment = new StringBuffer();
5
6   String getComment() { return comment.toString(); }
7
8   void appendLine(String more) { // 'more' is '\n' terminated.
9     int i=0;
10
11     // skip leading white space.
12     for (; i<more.length(); i++)
13       if (!Character.isSpaceChar(more.charAt(i))) 
14         break;
15
16     // skip any leading stars.
17     for (; i<more.length(); i++)
18       if (more.charAt(i)!='*')
19         break;
20
21     // the rest of the string belongs to the comment.
22     if (i<more.length())
23       comment.append(more.substring(i));
24   }
25
26 }