%{ /* Copyright K. Mitchell 1995. This file has been generated by a program and is not intended to be read by a human. Run the file occam.w through nuweb. This produces a file called occam.tex. Typeset this file using LaTeX and then preview the resulting .dvi file, or just print it out. */ #include #include #include typedef int bool; #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #include "pool.h" #include "symbol_table.h" #include "occam.h" #include "interpreter.h" #include "parser.h" %} %token NL %token STOP %token SEQ %% program : { insert_name (display, 2, DISPLAY_T); insert_name (chanblock, CHANNEL_BLOCK_SIZE, CHAN_BLOCK_T); insert_name (find_name("stdin" ), 1, CHAN_T); insert_name (chanblock, CHANNEL_BLOCK_SIZE, CHAN_BLOCK_T); insert_name (find_name("stdout"), 1, CHAN_T); } process { program_code = build_ccode(exit_scope_code(), Stop, END); } process: STOP NL | sequence; sequence: SEQ NL processes; processes: /* no processes at all */ | process processes; /* one or more processes */ %% yyerror (char* s) { error ("Parse error", "Unrecognized input.\n"); }