[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yacc compatibility bug
From: |
Paul Eggert |
Subject: |
Re: yacc compatibility bug |
Date: |
Mon, 31 Oct 2011 10:07:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 |
That code is not portable yacc code, because it uses TAB
before defining it. It may work with some yacc implementations,
but not with others. To make the code portable, put this near the
start of the grammar:
%{
#define TAB '\t'
%}
so that the grammar doesn't use TAB before defining it.
For more on this, please see the yacc specification
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html>
which talks about this issue in its "Programs Section" section.