[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in Manual

From: Claus Fischer
Subject: Bug in Manual
Date: Tue, 1 Oct 2002 06:01:57 +0200
User-agent: Mutt/1.3.28i

The section 'Calling Conventions for yylex' gives sample code
how to look up a token in yytname. I guess it's wrong
since the strncmp(...) will actually return 0 if both strings
are equal; so it should read:
          for (i = 0; i < YYNTOKENS; i++)
              if (yytname[i] != 0
                  && yytname[i][0] == '"'
                  && strncmp (yytname[i] + 1, token_buffer,
                              strlen (token_buffer)) == 0
                  && yytname[i][strlen (token_buffer) + 1] == '"'
                  && yytname[i][strlen (token_buffer) + 2] == 0)
Furthermore, what will this code do if the token_buffer is not
a valid identifier? Probably something wrong.

How should I report the error in this case anyway?
Cause I need to do this ...



Claus Fischer <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]