diff --git a/doc/tutorial_episode_3.pod b/doc/tutorial_episode_3.pod index 3454c31..6832504 100644 --- a/doc/tutorial_episode_3.pod +++ b/doc/tutorial_episode_3.pod @@ -168,8 +168,20 @@ started. Replace the C rule with this rule: } +Replace the statementlist rule with this: + + rule statement_list { + * + } + +When you work on the action methods later, you'll also want to replace $ in the action method with $ + Add these rules: + rule stat_or_def { + + } + rule assignment { '=' } @@ -311,6 +323,10 @@ out how you do such a binding). =item 6. +Write the action method for stat_or_def. Simply retrieve the result object from statement and make that the result object. + +=item 7. + Run your compiler on a script or in interactive mode. Use the target option to see what PIR is being generated on the input "x = 42". @@ -414,6 +430,14 @@ Note that we set the lvalue flag on $lhs. See PDD26 for details on this flag. =item 6 +Write the action method for stat_or_def. Simply retrieve the result object from statement and make that the result object. + + method stat_or_def { + make $.ast; + } + +=item 7 + Run your compiler on a script or in interactive mode. Use the target option to see what PIR is being generated on the input "x = 42".