Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!p0.f1.n491.z5.fidonet.org!Cobus.Debeer From: Cobus.Debeer@p0.f1.n491.z5.fidonet.org (Cobus Debeer) Newsgroups: comp.lang.modula2 Subject: Grammer continued 2/5 Message-ID: <291.2730462D@puddle.fidonet.org> Date: 29 Oct 90 05:15:44 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 5:491/1.0 - Golden City Opus, Johannesburg RSA Lines: 122 Grammer continued .... ====m2c.y (=yacc input) %token AND %token ARRAY %token _BEGIN %token BY %token CASE %token CONST %token DEFINITION %token DIV %token DO %token ELSE %token ELSIF %token END %token EXIT %token EXPORT %token FOR %token FROM %token IF %token IMPLEMENTATION %token IMPORT %token IN %token LOOP %token MOD %token MODULE %token NOT %token OF %token OR %token POINTER %token PROCEDURE %token QUALIFIED %token RECORD %token REPEAT %token RETURN %token SET %token THEN %token TO %token TYPE %token UNTIL %token VAR %token WHILE %token WITH %token ampersand %token asterisk %token colon %token colon_equals %token comma %token dot %token dot %token dot_dot %token end_of_file %token equals_sign %token greater_than %token greater_than_or_equals %token identifier %token integer %token left_curley_bracket %token left_parenthesis %token left_square_bracket %token left_square_bracket %token less_than %token less_than_or_equals %token minus %token not_equals %token plus %token pound_sign %token real %token right_curley_bracket %token right_parenthesis %token right_square_bracket %token semicolon %token slash %token string %token up_arrow %token vertical_bar %% compilation : compilation_unit_list ; compilation_unit_list : compilation_unit | compilation_unit_list compilation_unit; compilation_unit : module; module : program_module | definition_module | implementation_module; file_ident : identifier; program_module : MODULE file_ident priority_opt semicolon import_list_opt block ident dot; definition_module : DEFINITION MODULE file_ident semicolon import_list_opt export_opt definition_list_opt END ident dot; implementation_module : IMPLEMENTATION program_module; priority_opt : | priority; priority : left_square_bracket const_expression right_square_bracket; const_expression : expression; relation : equals_sign | pound_sign | not_equals | less_than | less_than_or_equals | greater_than | greater_than_or_equals | IN; import_list_opt : | import_list; import_list : import | import_list import; import : from_opt IMPORT ident_list semicolon; from_opt : | from; from : FROM ident; ident_list : ident | ident_list comma ident; ident : identifier; block : declaration_list_opt begin_and_stmts_opt END; declaration_list_opt : | declaration_list; declaration_list : declaration | declaration_list declaration; declaration : error semicolon | CONST constant_declaration_list_opt | TYPE type_declaration_list_opt | VAR variable_declaration_list_opt | procedure_declaration semicolon| module_declaration semicolon; begin_and_stmts_opt : | begin_and_stmts; Grammer continues ... Regards - Cobus -- uucp: uunet!m2xenix!puddle!5!491!1.0!Cobus.Debeer Internet: Cobus.Debeer@p0.f1.n491.z5.fidonet.org