Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.cobol
Class CobolWords

java.lang.Object
  extended bycom.ibm.lpex.cobol.CobolWords


public final class CobolWords
extends Object

Keywords and keyword-related functions for the COBOL document parsers.


Nested Class Summary
static class CobolWords.Word
          This class is used to combine a keyword String with an id int.
 
Field Summary
static int AUTHOR
          Id for a COBOL reserved word.
static int CBL
          Id for a COBOL reserved word.
static int CONTROL
          Id for a COBOL reserved word.
static int DATE
          Id for a COBOL reserved word.
static int DATE_COMPILED
          Id for a COBOL reserved word.
static int DATE_WRITTEN
          Id for a COBOL reserved word.
static int DIVISION
          Id for a COBOL reserved word.
static int EJECT
          Id for a COBOL reserved word.
static int FORMAT
          Id for a COBOL reserved word.
static int FUNCTION
          Id for a COBOL reserved word.
static int INSTALLATION
          Id for a COBOL reserved word.
static int IS
          Id for a COBOL reserved word.
static int LAST_ID
          Id for a COBOL reserved word.
static int PICTURE
          Id for a COBOL reserved word.
static int PROGRAM_ID
          Id for a COBOL reserved word.
static int SECTION
          Id for a COBOL reserved word.
static int SECURITY
          Id for a COBOL reserved word.
static int SKIP
          Id for a COBOL reserved word.
static int TITLE
          Id for a COBOL reserved word.
 
Method Summary
static String[] controlOptions()
          Return an array of the control options defined in here.
static String[] dateFormats()
          Return an array of the date formats defined in here.
static String[] directives()
          Return an array of the directives defined in here.
static CobolWords.Word findDirective(StringBuffer stringBuffer)
          Determine if the specified string is a directive (compiler-directing statement keyword).
static CobolWords.Word findReservedWord(StringBuffer stringBuffer)
          Determine if the specified string is a reserved word.
static Object findWord(Object[] _words, StringBuffer word)
          Perform a binary search for the specified word in an array of Words or Strings.
static String[] functionNames()
          Return an array of the function names defined in here.
static boolean isControlOption(StringBuffer stringBuffer)
          Determine if the specified string is a valid option for the *CONTROL (*CBL) directive.
static boolean isDateFormat(StringBuffer stringBuffer)
          Determine if the specified string is a date format.
static boolean isFunctionName(StringBuffer stringBuffer)
          Determine if the specified string is a function name.
static String[] listWords(Object[] _words)
          Utility method to return an array of all the strings in an array of Words or Strings.
static String[] reservedWords()
          Return an array of the reserved words defined in here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

 

Field Detail

 

 

AUTHOR

public static final int AUTHOR

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

DATE

public static final int DATE

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

DATE_COMPILED

public static final int DATE_COMPILED

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

DATE_WRITTEN

public static final int DATE_WRITTEN

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

DIVISION

public static final int DIVISION

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

FORMAT

public static final int FORMAT

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

FUNCTION

public static final int FUNCTION

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

INSTALLATION

public static final int INSTALLATION

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

IS

public static final int IS

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

PICTURE

public static final int PICTURE

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

PROGRAM_ID

public static final int PROGRAM_ID

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

SECTION

public static final int SECTION

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

SECURITY

public static final int SECURITY

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

CBL

public static final int CBL

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

CONTROL

public static final int CONTROL

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

EJECT

public static final int EJECT

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

SKIP

public static final int SKIP

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

TITLE

public static final int TITLE

Id for a COBOL reserved word.

See Also:
Constant Field Values


 

 

LAST_ID

public static final int LAST_ID

Id for a COBOL reserved word.

See Also:
Constant Field Values
Method Detail

 

 

findReservedWord

public static CobolWords.Word findReservedWord(StringBuffer stringBuffer)

Determine if the specified string is a reserved word.


 

 

reservedWords

public static String[] reservedWords()

Return an array of the reserved words defined in here.


 

 

isFunctionName

public static boolean isFunctionName(StringBuffer stringBuffer)

Determine if the specified string is a function name.


 

 

functionNames

public static String[] functionNames()

Return an array of the function names defined in here.


 

 

isDateFormat

public static boolean isDateFormat(StringBuffer stringBuffer)

Determine if the specified string is a date format.


 

 

dateFormats

public static String[] dateFormats()

Return an array of the date formats defined in here.


 

 

findDirective

public static CobolWords.Word findDirective(StringBuffer stringBuffer)

Determine if the specified string is a directive (compiler-directing statement keyword).


 

 

directives

public static String[] directives()

Return an array of the directives defined in here.


 

 

isControlOption

public static boolean isControlOption(StringBuffer stringBuffer)

Determine if the specified string is a valid option for the *CONTROL (*CBL) directive.


 

 

controlOptions

public static String[] controlOptions()

Return an array of the control options defined in here.


 

 

listWords

public static String[] listWords(Object[] _words)

Utility method to return an array of all the strings in an array of Words or Strings.


 

 

findWord

public static Object findWord(Object[] _words,
                              StringBuffer word)

Perform a binary search for the specified word in an array of Words or Strings. Returns the word if found, otherwise returns null. The array of words is assumed to be sorted and uppercase. The search word may be any case, but will match case insensitively.


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD