Advertisement
tinyevil

Untitled

Dec 2nd, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. :| Positive
  2. Digit0 (Positive)
  3. Digit1 (Positive)
  4. Stop
  5.  
  6. :| Integer
  7. P(Positive)
  8. N(Positive)
  9. Zero
  10.  
  11. to_value (P pos) = to_value_pos pos
  12. to_value (N pos) = - (to_value_pos pos)
  13. to_value Zero = 0
  14.  
  15. to_value_pos Stop = 1
  16. to_value_pos (Digit0 rest) = (2 * to_value_pos rest)
  17. to_value_pos (Digit1 rest) = (2 * to_value_pos rest) + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement