Bison parser skeleton replacment with builtin error repair


 
Object_Id               : 89
Title                   : Bison parser skeleton replacment with builtin error repair
Node_Type               : Production
Format                  : text
Address                 :  file:/home2/foster/tools/ErrorRepair.tar.gz
Keywords                : Yacc
                          Bison
                          Grammars
                          Compiler
Abstract                : This is a replacement for the bison.simple grammar skeleton
                          with builtin error-repairing mechanisms which use the 
                          tables built by bison to replace and delete symbols as
                          appropriate to recover from errors encountered.
                          
                          No change is required to any grammars in order to use this
                          code. The code is supplied with grammars for both C and
                          Modula-2.
                          
                          I tested the program with the following buggy C program:
                          
                          int main(int argc, char *argv[))
                          {
                              int i = 0;
                           
                              i += 1;
                           
                              return(0);
                          }}
                          
                          and received the following result:
                          
                          io <916> C test.c 
                          YYERROR: Parse error on ')': line 2 col 31
                          YYERROR: yytext=`)' symbol was (41)
                          Recovery: ( 0.01)[2][184] Inserted ']' and deleted ')' 
                          YYERROR: Parse error on '}', expecting `$': line 9 col 2
                          YYERROR: yytext=`}' symbol was (125)
                          Recovery: ( 0.00)[1][31] Inserted nothing and deleted '}' 
                          
                          which I believe is brilliant for no extra effort ;)
Date_Entry_Created      : 18/10/96
Entry_Created_By        : Paul Foster
Date_Entry_Last_Modified: 
Entry_Last_Modified_By  : 
Asset_Qualification     : excellent
Other_Opinions          : It's glorious!!!! 
Contact_Person          : Paul Foster (foster@citr)
IP_or_Copyright_Owner   : Corey Yeatman, Bruce McKenzie, Lorraine de Vere  - University
                          of Canterbury, N.Z
Support_re_Ownership    : 
                          
Date_Item_Created       : 
Usage_Conditions        : This software is released under the GPL.
                          
                          Bison output since version 2.4 is able to be used
                          in commercial products.
Support_re_Usage_Condns : 
Authors_and_Contributors: Corey Yeatman, 
                          Bruce McKenzie, 
                          Lorraine de Vere
                          (University of Canterbury, N.Z)
Projects_Used_In        : None
Obtained_From           :  http://kaka.cosc.canterbury.ac.nz/~bruce/ErrorRepair.html
Derived_From            : 
Related_Items           : 
Code_Type               : simple tool
Programming_Language    : C
Portations              : SunOS
                          Solaris
                          HP-UX 
                          
                          It should run on whatever
                          platform bison does.
Source_Location         :  file:/home2/foster/tools/ErrorRepair.tar.gz
Binaries_Location       : 
Issues_Bug_etc_List_Locn: 
Additional_Info         :