Object Oriented YACC (OOYACC)

OOYacc is an Object Oriented version of standard Berkeley Yacc v1.9.
 

Advantages over other Yacc's (Bison etc)

 

Differences  over  berkeley  Yacc

Using  the OOYACC

The Header File format and usage

#ifndef <file Prefix)_OOYACC_H  // the default file prefix is y
#define <fiel prefix>_OOYACC_H  // File prefixes are usefull when you have more than one grammar
....
....

typedef union{
....
....
} YYSTYPE; // redefine YYSTYPE if using multiple grammars
class <symbol prefix>Parser{   //  The default symbol prefix is yy. User defined prefixes
                               //  are useful when having more than one
                               //  parser class.
  private:
    int yydebug;
    int yynerrs;
    int yyerrflag;
    int yychar;
    short *yyssp;
    YYSTYPE *yyvsp;
    YYSTYPE yyval;
    YYSTYPE yylval;
    short yyss[YYSTACKSIZE];
    YYSTYPE yyvs[YYSTACKSIZE];
    int yym,yyn,yystate;
    char* yys;
  public:
    yyParser();            // default constructor of the parser.
    int yyparse();         // the parser function
    YYSTYPE* getLVal();    // function to retrieve the top of parser stack
};

DownLoad OOYACC executable

Currently OOYACC is available on the following platforms

DownLoad OOYACC source code

Under GPL - General Public License  

You are visitor No since 16th April 1998