The following SDT computes the value of a string of O's and l's interpreted as a positive, binary integer.B -» Br 0 {B.val = 2 x Bx .val] | Bx 1 {B.val = 2 x Bx .val + 1} j 1 {B.val = 1}Rewrite this SDT so the underlying grammar is not left recursive, and yet the same value of B.val is computed for the entire input string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here