Re: Porting lex scanner on EBCDIC machine.

kkaempf@didymus.rmi.de (Klaus Kaempf)
Tue, 4 Apr 1995 08:20:21 GMT

          From comp.compilers

Related articles
Porting lex scanner on EBCDIC machine. c1veeru@WATSON.IBM.COM (Virendra K. Mehta) (1995-04-01)
Re: Porting lex scanner on EBCDIC machine. gvcormac@plg.uwaterloo.ca (1995-04-03)
Re: Porting lex scanner on EBCDIC machine. mduffy@netcom.com (1995-04-03)
Re: Porting lex scanner on EBCDIC machine. rameshag@herbrand.cs.albany.edu (1995-04-03)
Re: Porting lex scanner on EBCDIC machine. kkaempf@didymus.rmi.de (1995-04-04)
Re: Porting lex scanner on EBCDIC machine. vern@daffy.ee.lbl.gov (1995-04-05)
Re: Porting lex scanner on EBCDIC machine. sasghm@unx.sas.com (1995-04-15)
Re: Porting lex scanner on EBCDIC machine. sasghm@unx.sas.com (1995-04-18)
| List of all articles for this month |

Newsgroups: comp.compilers
From: kkaempf@didymus.rmi.de (Klaus Kaempf)
Keywords: lex, comment
Organization: proGIS Softwareentwicklung
References: 95-04-035
Date: Tue, 4 Apr 1995 08:20:21 GMT

Virendra K. Mehta" <c1veeru@WATSON.IBM.COM> writes:


>[...] However the mainframe uses EBCDIC
>while lex generated tables, state machines etc. expect an ASCII input.


Hmm, this sounds easy. Just #define your own lex YYINPUT macro which
converts ebcdic to ascii. This could be done in a 256 char table with
YYINPUT defined as ebcdic2ascii[getchar()]. All you have to supply is
the proper conversion table. Have a look at oak.oakland.edu (former
simtel archive) in msdos/txtutl there is ebc2asc.arc for example.


Klaus
--
proGIS Software E-Mail: kkaempf@didymus.rmi.de
Dipl.-Inform. Klaus Kämpf Fax: 0241-47067-29
Jakobstr. 117 Voice: 0241-47067-11
D-52064 Aachen GERMANY
[Only works in AT&T lex; see later messages for how to do this in flex. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.