# YACC INPUT TO GENERATE FIRST PASS OF RUSSELL PARSER # Error recovery assumes modified parser. The parser variable yychar # is referenced but not altered. # The syntax tree is built during the parse. No other semantic # actions are performed. # Denotations are only incompletely parsed using the yacc parser. # Mkappl is then called to refine the parse. # Note: Nonterminals consisting only of lower case letters generate # the empty string. They are introduced only to perform appropriate # semantic actions. ################################################################# #NOTES #Moved the section to top & moved top comments into it. #Moved %tokens & %left next & cut declarations out - they #are already moved to global_vars.icn. #Changed included files #Remove comments in rules section #Changed tests for nil to \ or / as appropriate #Changed NIL to nil everwhere left -- with query - to be careful #Added then for if s #Removed conitional debug code - will do own debug #Changed ! to = FALSE as appropriate (FALSE is 0) (mainly initflag) #or not(--) as needed #In ifs TRUE could be any non-zero so use ~= FALSE #Changed -> to . #Added do for while s #Changed == to djddjd #Check = s some will need to be := - others not. #mknode & mklist - add [] s #Remove extra ; s - spliting some compound lines #At line 200 - decided to change ;s at end of productions to semisemi (manual) #Also change quoted ; to semiquote (global) #Then save as grammar.edit.presemi.y #Then global change - remove semi #Then change semisemi to ; #Then change semiquote to ; #Change case to nothing - checking #Change switch to case of #Change && to & - move if needed - also add some parens #Change djdddjd to = #Change || to | - move if needed - also add some parens #NOTE - may need to change some if s to use \ if test for NIL #Change -1 to end_of_args (nil) #Remove (NodeStar) cast # Had to remove single quotes from these comments ################################################################## Moved Comments HERE Wrote fixgram.sno Fixing chgfld fix some locals & for loops wrote fixgram.sno to add } as needed remove (int) casts work on locals & remove atoi remove breaks in cases - missed some before fix case statements fix name creation Fix initfld Remove (NODE *) casts Trying to use line info in in file to find where to put locals in .y file Failed to find place for many locals. Have warning on - leaving as undeclared locals as making global might cause trouble with recursion.