Thanks John, but the whole point is to try to leverage the internal tables and 
mechanisms that exist in Bison …. In particular the yytranslate[] table…. And 
to be able to write rules that use *all* the hex codes which flex -8 is 
supposed to pass along e.g.

R : ‘\x9f’ ‘\xfe’ | ‘\xff’ | ‘\x00’ ;

As well as succinctly express notions such as “any byte” — without listing 
every possible 8-bit value and having to check against them to accept a byte.


> On Apr 1, 2021, at 11:05, John P. Hartmann <jphartm...@gmail.com> wrote:
> 
> Write your own scanner in C.
> 
> On 4/1/21 16:28, Stephen Taylor via Users list for the GNU Bison parser 
> generator wrote:
>> Thanks, that seems to get around \x00 -- unfortunately, the same issue then 
>> reappears with the values \x80 - \xff … I could special case every single 
>> value e.g.
>> \x00 {return ZERO; }
>> \x80 { return X80; }
>> \x81 { return X81; }
>>  :
>> \xff { return XFF; }
>> . | \n  { return *yytext; }
>> But seems a bit clumsy. Any thoughts?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

  • Parsing '... Stephen Taylor via Users list for the GNU Bison parser generator
    • Re: ... Chris verBurg
      • ... Stephen Taylor via Users list for the GNU Bison parser generator
        • ... Chris verBurg
          • ... Stephen Taylor via Users list for the GNU Bison parser generator
            • ... Stephen Taylor via Users list for the GNU Bison parser generator
              • ... Akim Demaille

Reply via email to