[antlr-interest] I wrote a Java Lexer for Cobol and need your suggestions

Andrés Griñó agrinob at hotmail.com
Mon Mar 8 09:15:28 PST 2010







Hi:

I wrote a Java Lexer for Cobol (free & fixed format). It takes a cobol source program like this:

044500 B10-1-INIT-OPTION-SWITCHES.                                      EXEC84.2
044600     MOVE    SPACES  TO WZ-MISCELLANEOUS.                         EXEC84.2

and produce a list of tokens like this:

AREA_A (444, 8, ''/0)
WORD (444, 8, 'B10-1-INIT-OPTION-SWITCHES'/26)
SEPARATOR (444, 34, '.'/1)
WORD (445, 12, 'MOVE'/4)
WORD (445, 20, 'SPACES'/6)
WORD (445, 28, 'TO'/2)
WORD (445, 31, 'WZ-MISCELLANEOUS'/16)
SEPARATOR (445, 47, '.'/1)

My Lexer is based mainly in standard Cobol 85 (plus amendments), and I validate it using the suite (newcob.val) from the National Institute of Std & Tech., plus some other examples in free format I got from the web. I'm writing the documentation right now, but I can send the working program if you ask. Soon it will be available in Freshmeat.

I want to make it useful for people writing antlr grammars. I need suggestions about a nice output format for antlr. You can post your answer or email me (agrinob at hotmail.com).

Thanks

Andrés Griñó



 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969


More information about the antlr-interest mailing list