|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.legstar.cobol.AbstractCobolSourceCleaner
com.legstar.cobol.CobolFixedFormatSourceCleaner
public class CobolFixedFormatSourceCleaner
Clean a fixed format COBOL source.
Fixed format is the traditional IBM z/OS format where columns 1-6 contain sequence numbers, column 7 is the indicator area, area A spans from column 8 to 11 and area B from 12 to 72.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.legstar.cobol.AbstractCobolSourceCleaner |
|---|
AbstractCobolSourceCleaner.CleaningContext |
| Field Summary |
|---|
| Fields inherited from class com.legstar.cobol.AbstractCobolSourceCleaner |
|---|
ALPHANUM_LITERAL_START, COBOL_DELIMITER, COMPILER_DIRECTIVES, DATA_DESCRIPTION_END, DATA_DESCRIPTION_START, DATA_DIVISION, IDENTIFICATION_DIVISION, PROCEDURE_DIVISION |
| Constructor Summary | |
|---|---|
CobolFixedFormatSourceCleaner(RecognizerErrorHandler errorHandler)
Construct with a shared error handler. |
|
CobolFixedFormatSourceCleaner(RecognizerErrorHandler errorHandler,
int startColumn,
int endColumn)
Construct with a shared error handler. |
|
| Method Summary | |
|---|---|
String |
cleanFixedLine(String line)
Clear sequence numbers in column 1-6 and anything beyond column 72. |
String |
extendedCleanLine(String line)
Derived classes can extend this method to further clean a line of code. |
int |
getIndicatorAreaPos()
|
boolean |
isComment(String line)
Specialized cleaners determine if this line is a comment. |
| Methods inherited from class com.legstar.cobol.AbstractCobolSourceCleaner |
|---|
clean, cleanLine, emitErrorMessage, getErrorHandler, isArgument, isDataDivision, isLineOfCode, removeExtraneousCharacters, replaceLongSeparators |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CobolFixedFormatSourceCleaner(RecognizerErrorHandler errorHandler)
errorHandler - handles error messages
public CobolFixedFormatSourceCleaner(RecognizerErrorHandler errorHandler,
int startColumn,
int endColumn)
errorHandler - handles error messagesstartColumn - column where code starts (indicator area)endColumn - column where code ends (right margin)| Method Detail |
|---|
public String extendedCleanLine(String line)
extendedCleanLine in class AbstractCobolSourceCleanerline - the current line of code
public int getIndicatorAreaPos()
getIndicatorAreaPos in class AbstractCobolSourceCleanerpublic String cleanFixedLine(String line)
line - the line of code
public boolean isComment(String line)
AbstractCobolSourceCleaner
isComment in class AbstractCobolSourceCleanerline - the line to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||