tags:

views:

18

answers:

0

I have added the new token RATIONAL that recognises rational numbers on my javacc parser. How can I update the output part of the program to print the numeric value of the rational number? For example ('2/5') value =0.4, (8/2') value = 4.0, (4/0') value = infinity, I will be gratefull if anyone could help me thanks.