Skip to main content

Cobol db2/cics/dli IBM Mainframe syntax lexer for Pygments

Project description

This package contains a Pygments Lexer for cobol (db2, cics and dli embedded)

Many early programming languages, including Fortran, Cobol and the various IBM assembler languages,
used only the first 7-72 columns of a 80-column card

### MAINFRAME COBOL CODING FORM:
---------------------------
Columns
1- 6 Tags, Remarks or Sequence numbers identifying pages or lines of a program
7 Continuation, comment or starting of a new page
8 - 72 COBOL program statements
73- 80 Tags, Remarks or Sequence numbers (often garbage...)

=> Column 7 * (asterisk) designates entire line as comment
/ (slash) forces page break when printing source listing
- (dash) to indicate continuation of nonnumeric literal
=> Columns 8-72 divided into two areas
- Area A - columns 8 to 11
- Area B - columns 12 to 72

Division, section and paragraph-names must all begin in Area A and end with a period.
CBL/PROCESS statement can start in columns 1 through 70

### Installation

The lexer is available as a Pip package:

pip install pygments_ibm_cobol_lexer

### Usage

After installation the ibmcobol Lexer and ibmcobol Style automatically registers itself for files with the ".cbl"
extensions. Therefore, usage is easy:

- pygmentize -O full,linenos=tab,style=ibmcobol -o test.html HORREUR.cbl
- pygmentize -O full,encoding=iso8859-1,outencoding=latin1,linenos=tab,style=ibmcobol -o HORREUR.html HORREUR.cbl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygments_ibm_cobol_lexer-1.0.tar.gz (10.4 kB view hashes)

Uploaded Source

Built Distribution

pygments_ibm_cobol_lexer-1.0-py2.7.egg (42.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page