lives-group / APEG

2 stars 0 forks source link

Pretty Print issues #5

Closed deisekelley closed 6 years ago

deisekelley commented 6 years ago

It seems that there is an error on the visitor pretty printer or maybe in the template. The following grammar:

apeg expression;
s[int x, int y, int z, int w]:
  {? (x < y) || (z == 2) && (w > 10) }
;

Print as:

apeg expression;
s[int x, int y, int z, int w]:
  {? (x) < (y) || ((z == 2)) && ((w) \> (10)) }
;

Not that the operator > print as \>. Also the parenteses seems not to be just right. We really should check this out.