~ubuntu-branches/ubuntu/gutsy/jflex/gutsy

« back to all changes in this revision

Viewing changes to examples/simple/Utility.java

  • Committer: Bazaar Package Importer
  • Author(s): Takashi Okamoto
  • Date: 2002-02-16 13:38:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020216133821-5wsdprpt9xl7ondr
Tags: upstream-1.3.5
ImportĀ upstreamĀ versionĀ 1.3.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
class Utility {
 
2
  
 
3
  private static final String errorMsg[] = {
 
4
    "Error: Unmatched end-of-comment punctuation.",
 
5
    "Error: Unmatched start-of-comment punctuation.",
 
6
    "Error: Unclosed string.",
 
7
    "Error: Illegal character."
 
8
    };
 
9
  
 
10
  public static final int E_ENDCOMMENT = 0; 
 
11
  public static final int E_STARTCOMMENT = 1; 
 
12
  public static final int E_UNCLOSEDSTR = 2; 
 
13
  public static final int E_UNMATCHED = 3; 
 
14
 
 
15
  public static void error(int code) {
 
16
          System.out.println(errorMsg[code]);
 
17
  }
 
18
}
 
19