Subversion Repositories programming

Rev

Rev 259 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 259 Rev 261
Line 24... Line 24...
24
 
24
 
25
program : program line
25
program : program line
26
    | ;
26
    | ;
27
 
27
 
28
line: NL            { if (interactive) System.out.print (input_str); r.reset(); }
28
line: NL            { if (interactive) System.out.print (input_str); r.reset(); }
29
    | S NL          { System.out.println ("There are: " + r.getVal() + " apples in the bag!");
29
    | S NL          { System.out.println ("There are: " + r.getVal() + " apples in the bag!\n");
30
                      if (interactive) System.out.print (input_str); r.reset(); };
30
                      if (interactive) System.out.print (input_str); r.reset(); };
31
 
31
 
32
S : P S T S         { }
32
S : P S T S         { }
33
    | P S           { }
33
    | P S           { }
34
    |               { };
34
    |               { };