Automatic detection of a COBOL dialect ?
From: diesmo (partoche_at_caramail.com)
Date: 09/08/04
- Next message: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Previous message: James J. Gavan: "Re: Paragraph name flagged as unknown verb during compilation by MICROFOCUS"
- Next in thread: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Reply: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Reply: Robert Wagner: "Re: Automatic detection of a COBOL dialect ?"
- Reply: Frederico Fonseca: "Re: Automatic detection of a COBOL dialect ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Sep 2004 08:37:32 -0700
Hello!
I am trying to enhance a javaCC parser for COBOL, which only accept
free format with "*>" comments.
I must say i have little knowledge about COBOL.
For now, I automatically detect fixed or free format, like this :
- if the first line (without spaces) starts with a number, then it
is fixed,
- else it is free format.
This seems to work (if the cols 1-6 in fixed format, when trimed,
always contains a number :) ).
For "variable" format, it is more tricky... Cols 1-6 may contain
anything, it seems.
Does anyone know a trick to distinguish a fixed format cobol program
from a variable format one ?
For example, if the column 1-6 only contains spaces, then it is
variable format ?
Or a way to determin the dialect (assuming each dialect uses only one
format)?
Or is it impossible, and the user must specify the format manually ?
Thanks in advance.
Regards,
diesmo.
- Next message: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Previous message: James J. Gavan: "Re: Paragraph name flagged as unknown verb during compilation by MICROFOCUS"
- Next in thread: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Reply: William M. Klein: "Re: Automatic detection of a COBOL dialect ?"
- Reply: Robert Wagner: "Re: Automatic detection of a COBOL dialect ?"
- Reply: Frederico Fonseca: "Re: Automatic detection of a COBOL dialect ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|