work.rig 678 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- This is file WORK.RIG
  2. -- You can try examples
  3. -- EX1.RIG - how to take Tail and Head of list
  4. -- EX2.RIG - how to analyse and print polish form of arithmetic expression
  5. -- GRAM2.RIG - small language (SL) source syntax grammar
  6. -- GRAM1.RIG - tree abstract grammar for SL
  7. -- INTER.RIG - interpreter of SL
  8. -- BCOMP.RIG - compiler of SL to Pascal
  9. -- EX1.txt - input text in SL
  10. -- THIS IS SIMPLE PROGRAM ; TRY press F6 and then F7; Exit ALT+X
  11. #START
  12. OPEN S ' ';
  13. S<<FFFFF;
  14. $E:=2000000001;
  15. PRINT (. #NUMBER($E) $E DIV 5 $E DIV 100 .);
  16. $N:=3;
  17. $A:=<. AA : $E , BB : $N .>;
  18. #CALL_PAS(13 $A);
  19. #CALL_PAS(12 $A);
  20. -- $S:=$E[4];
  21. ##