|Flex, Bison, Ebcdic, IBM/MVS email@example.com (Bruno Peeters) (1996-10-30)|
|From:||Bruno Peeters <firstname.lastname@example.org>|
|Date:||30 Oct 1996 13:30:16 -0500|
|Keywords:||lex, yacc, question|
At company I work for, we are developing a tool to check cobol
coding standards. This tool was initially developed in a Windows
NT environment (with flex and bison and using a Microsoft C
compiler). We planned to port this tool to our IBM/MVS mainframe
environment (using the SAS C compiler). We are not yet running
Open Edition on our mainframe.
We were aware of the ASCII - EBCDIC conversion problem, but we
are been faced now with problems that seems quite difficult to
solve. We found in various archives threads about this matter,
but each answer left over several other questions.
1. An alternative we investigated was to change, on the
mainframe, the input to flex from EBCDIC to ASCII, in order
to use the same version of flex on both platforms (WinNT +
IBM/MVS). The output of flex then needs again to be translated
back to EBCDIC. This poses us various problems. Flex passes
sometimes information to Bison that is not really what we expect
to be passed. The reason for this is that we suspect that the
ASCII-EBCDIC translation and back is not done on the right places.
This does also seem to be a not so elegant solution.
2. In several replies to the various threads, a suggestion was
made to port Flex to the target machine and run it there to
produce the scanner. We downloaded the last flex source code
(2.5.3). One of the files in the distribution package discussses
the changes to make to adapt flex to run on an IBM mainframe.
We did this. Several other changes had to be made in the C
programs, in order to cope with the file system on the mainframe.
The patches for flex in the distribution package date back
from the 2.3 release. We are therefore not sure if they work
for the last release. We did not succeed in compiling the
EBCDIC scanner program (scan.c)
I would like to ask if anyone who was involved with similar problems
would like to share his/her experiences.
Any guidance on this matter is welcome
Thanks in advance,
[When this has come up in the past, the most workable advice has been to pick
a character code, write your application using it, and only translate on the
way in and out if you have to use a different character set. EBCDIC used
to have the additional problem that there wasn't a single universally agreed
code page for the punctuation characters that C uses. -John]
Return to the
Search the comp.compilers archives again.