Guest User

Untitled

a guest
Jun 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. hel<b>lo[if foo]bar is [bar].[else]baz[end]world</b>!
  2.  
  3. write('hel<b>lo')
  4. if('foo')
  5. write('bar is')
  6. substitute('bar')
  7. write('.')
  8. else()
  9. write('baz')
  10. end()
  11. write('world</b>!')
  12.  
  13. * Sequence
  14. ** Write
  15. *** ('hel<b>lo')
  16. ** If
  17. *** ('foo')
  18. *** Sequence
  19. **** Write
  20. ***** ('bar is')
  21. **** Substitute
  22. ***** ('bar')
  23. **** Write
  24. ***** ('.')
  25. *** Write
  26. **** ('baz')
  27. ** Write
  28. *** ('world</b>!')
  29.  
  30. class Instruction {
  31. }
  32. class Write : Instruction {
  33. string text;
  34. }
  35. class Substitute : Instruction {
  36. string varname;
  37. }
  38. class Sequence : Instruction {
  39. Instruction[] items;
  40. }
  41. class If : Instruction {
  42. string condition;
  43. Instruction then;
  44. Instruction else;
  45. }
Add Comment
Please, Sign In to add comment