* configure.ac, Makefile.am, src/Makefile.am, doc/Makefile.am,
examples/Makefile.am, examples/Makefile.def, examples/adder/Makefile.am, examples/calculator/Makefile.am, examples/cmilner/Makefile.am, examples/fdd/Makefile.am, examples/internal/Makefile.am, examples/milner/Makefile.am, examples/money/Makefile.am, examples/queen/Makefile.am, examples/solitar/Makefile.am, m4/debug.m4, m4/gccwarns.m4, ChangeLog, INSTALL: New files. * config, makefile, src/makefile, doc/makefile, examples/adder/makefile, examples/calculator/makefile examples/cmilner/makefile, examples/fdd/makefile, examples/internal/makefile, examples/milner/makefile, examples/money/makefile, examples/queen/makefile, examples/solitare/makefile : Delete. * examples/adder/adder.cxx, examples/fdd/statespace.cxx, examples/internal/bddtest.cxx, examples/milner/milner.cxx, examples/money/money.cxx, examples/queen/queen.cxx, examples/solitare/solitare.cxx: Include iostream. * examples/calculator/parser.y: Rename as ... * examples/calculator/parser.yxx: ... this. Remove spurious comas in %token, %right, and %left arguments. * examples/calculator/parser.h: Rename as ... * examples/calculator/parser_.h: ... this, because the bison rule with output parser.h (not tokens.h) from parser.y. * examples/calculator/lexer.l: Rename as ... * examples/calculator/lexer.lxx: ... this. Include parser.h instead of tokens.h. * examples/calculator/slist.h (voidSList::voisSListElem, SList::ite): Fix friend usage. * src/kernel.h (DEFAULT_CLOCK): Default to 60 if not already defined. * README: Update build instruction, and file listing.
This commit is contained in:
parent
cf5dd46350
commit
605dce2aac
79 changed files with 768 additions and 669 deletions
44
buddy/examples/calculator/parser_.h
Normal file
44
buddy/examples/calculator/parser_.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*************************************************************************
|
||||
FILE: parser.h
|
||||
DESCR: parser defs. for BDD calculator
|
||||
AUTH: Jorn Lind
|
||||
DATE: (C) may 1999
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef _PARSER_H
|
||||
#define _PARSER_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "bdd.h"
|
||||
|
||||
#define MAXIDLEN 32 /* Max. number of allowed characters in an identifier */
|
||||
|
||||
struct token /* BISON token data */
|
||||
{
|
||||
char id[MAXIDLEN+1];
|
||||
char *str;
|
||||
int ival;
|
||||
bdd *bval;
|
||||
};
|
||||
|
||||
#define YYSTYPE token
|
||||
#define YY_SKIP_YYWRAP
|
||||
#define YY_NO_UNPUT
|
||||
#define yywrap() (1)
|
||||
|
||||
extern YYSTYPE yylval; /* Declare for flex user */
|
||||
extern void yyerror(char *,...); /* Declare for flex and bison */
|
||||
extern FILE *yyin;
|
||||
extern int yylex(void); /* Declare for bison */
|
||||
extern int yyparse(void); /* Declare for bison user */
|
||||
extern int linenum; /* Declare for error handler */
|
||||
|
||||
/* Use this instead of strdup() to avoid malloc() */
|
||||
inline char *sdup(const char *s)
|
||||
{
|
||||
return strcpy(new char[strlen(s)+1], s);
|
||||
}
|
||||
|
||||
#endif /* _PARSER_H */
|
||||
|
||||
/* EOF */
|
||||
Loading…
Add table
Add a link
Reference in a new issue