bugText Extractor TXR - Bugs: bug #35139, Byacc versus bison difference?...

 
 

bug #35139: Byacc versus bison difference? unterminated lists not diagnosed right.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Wed 21 Dec 2011 01:37:21 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: CorrectnessStatus: Fixed
Privacy: PublicAssigned to: Kaz Kylheku <kkylheku>
Originator Name: Open/Closed: Closed
Component Version: NoneOperating System: None
Fixed Release: NonePlanned Release: None
Architecture: AllABI: All

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 25 Apr 2016 06:14:21 PM UTC, comment #3:

This was in fact fixed on December 21, 2011 in commit 213412b3e747e29bf885e15b269191d9edb06a0a and its parent 7515303c46d2e4e0b18544d1fe5acd942163ef42.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Wed 21 Dec 2011 03:14:45 PM UTC, comment #2:

Actually both Bison and Byacc set yychar to 0 in that same situation. It's just that Bison defines YYEOF as zero, whereas Byacc doesn't define YYEOF. I defined YYEOF myself with bogus code like this:

#ifndef YYEOF
#define YYEOF YYEMPTY
#endif

I think the right fix is just to do this:

#ifndef YYEOF
#define YYEOF 0
#endif

Now the yybadtoken function tests for YYEMPTY and for 0.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Wed 21 Dec 2011 02:39:33 PM UTC, comment #1:

This is because byacc stupidly sets yychar to 0 in those situations instead of the value YYEOF or YYEMPTY.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Wed 21 Dec 2011 01:37:21 AM UTC, original submission:

I have a build of TXR with byacc, and seeing some wacky error diagnostics:

$ ./txr -c '@(do'
./txr: (cmdline:2): syntax error
./txr: (cmdline:2): misplaced character in list expression
$ ./txr -c '@(do ('
./txr: (cmdline:2): syntax error
./txr: (cmdline:2): misplaced character in list expression

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kkylheku (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 25 Apr 2016 06:14:21 PM UTCkkylhekuStatusIn Progress=>Fixed
    Wed 21 Dec 2011 02:39:08 PM UTCkkylhekuStatusNeed Info=>In Progress
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1