Bugs item #1711240, was opened at 2007-05-02 05:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1711240&group_id=96864

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: problem with '"' and 7F on EBCDIC plattforms

Initial Comment:
Hello Peter,

first on:
   I only recently discovered re2c in the web. It's a great tool that provides
   all the things I've been missing when using flex.
I found out a little problem when using the generated code on ebcdic-platforms.

re2c produces the following code in a switch-statement:
switch(yych)
   {
    ...
    case '"':
    ...
    case 0x07F:
    ...
   }

this code can not be compiled on EBCDIC-platforms, because there the
code of '"' is actually 0x07F. So the compiler complains about duplicate
case-labels.
I temporarily fixed the problem in my version of re2c by changing prtChOrHex in
dfa.cc so that it always prints only the Hex-Value like:

void prtChOrHex(std::ostream& o, uint c, bool useTalx)
{
 int oc = (int)(re2c::wFlag || !useTalx ? c : re2c::talx[c]);
//
//  if ((oc < 256) && isprint(oc))
//  {
//      o << '\'';
//      prtCh(o, oc);
//      o << '\'';
//  }
//  else
   {
       prtHex(o, c);
   }
}

Now it is compiling and the result of the code-genration should accept the same 
expressions.

Many Greetings
   Thomas

[EMAIL PROTECTED]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1711240&group_id=96864

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Re2c-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/re2c-general

Reply via email to