Guest User

Untitled

a guest
Mar 27th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1.  
  2.  
  3.  
  4. The if condition:
  5.  
  6. <keyword><conditional expression><code>
  7.  
  8. Conditional expressions need a LEFT and RIGHT side:
  9.  
  10. if 1 < 2 && 0 != "Hello" foobar();
  11. | | | | | |
  12. | L + R L -+--- R <code>
  13. | | |
  14. | L ---+--- R
  15. | |
  16. | <cond. expr.>
  17. <keyword>
  18.  
  19.  
  20. Parsing:
  21. Enter EXPRESSION PARSER when <keyword> is encountered
  22. Exit EXPRESSION PARSER when sides are balanced
  23.  
  24.  
  25. Single-sided expressions: If the LEFT side returns a boolean value
  26. OR/AND no conditional operator is found, the expression is also balanced.
Advertisement
Add Comment
Please, Sign In to add comment