Hello,Everybody.
I wrote grammar file from PL/0 ebnf.
But Antlrworks emitted "Break on Enter subrule",then at event "Enter subrule 2".
I want to proceed parsing grammar file.
Please give me advice,or where to read "The Definitive ANTLR Reference".

Thanks.


<Debug INPUT Script>
const
 m =  7,
 n = 85;

var
 x, y, z, q, r;

procedure multiply;
var a, b;

begin
 a := x;
 b := y;
 z := 0;
 while b > 0 do begin
   if odd b then z := z + a;
   a := 2 * a;
   b := b / 2;
 end
end;

procedure divide;
var w;
begin
 r := x;
 q := 0;
 w := y;
 while w <= r do w := 2 * w;
 while w > y do begin
   q := 2 * q;
   w := w / 2;
   if w <= r then begin
     r := r - w;
     q := q + 1
   end
 end
end;

procedure gcd;
var f, g;
begin
 f := x;
 g := y;
 while f # g do begin
   if f < g then g := g - f;
   if g < f then f := f - g;
 end;
 z := f
end;

begin
 x := m;
 y := n;
 call multiply;
 x := 25;
 y :=  3;
 call divide;
 x := 84;
 y := 36;
 call gcd;
end.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Attachment: pl0.g
Description: Binary data

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to