home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sharew / exoten / rec / sqrec.cnv < prev    next >
Encoding:
INI File  |  1990-07-09  |  1.8 KB  |  76 lines

  1. [SQREC.CNV]
  2.  
  3. [bracketed comments]
  4. (()()()(
  5.     ([,(c,(R))):
  6.     (],(R));
  7.     ((^Z),(%t,unclosed comment)(%M));
  8.     (,(R)):
  9. )) c
  10.  
  11. [strings enclosed in double quotes]
  12. (()()()(
  13.     (<'>,(W,<=>)(s,(R))):
  14.     (<">,(W,<=>)(R));
  15.     ((^Z),(%t,unclosed double quote)(%M));
  16.     (,(W,<=>)(R)):
  17. )) d
  18.  
  19. [strings enclosed in single quotes]
  20. (()()()(
  21.     (<">,(W,<=>)(d,(R))):
  22.     (<'>,(W,<=>)(R));
  23.     ((^Z),(%t,unclosed single quote)(%M));
  24.     (,(W,<=>)(R)):
  25. )) s
  26.  
  27. [find next left brace, bracket, parenthesis]
  28. (()()()(
  29.     ([,(c,(R))):
  30.     ((or,<(>,{),<=>);
  31.     ((^Z),(%t,expected left brace or parenthesis)(%M));
  32.     ((or, ,(^)),(if,<=>,(^J),(%W,,.),)(R)):
  33.     (,(R)(%t,extraneous characters)):
  34. )) l
  35.  
  36. [expression]
  37. (()()()(
  38.     (<(>,(W,<=>)(e,(R))):
  39.     (<)>,(W,<=>)(R));
  40.     ((or,@,x,X),(W,<=>(R))(R)):
  41.     ([,(c,(R))):
  42.     ((^Z),(%t,unclosed expression)(%M));
  43.     (<'>,(W,<=>)(s,(R))):
  44.     (<">,(W,<=>)(d,(R))):
  45.     ( ,(if,(R),(IVL/0/9/),(W, <=>)(R))):
  46.     ({,(W,<=>)(p,(l,(R)))):
  47.     ((NOT,(^)),(W,<=>)(R)):
  48.     (,(R)):
  49. )) e
  50.  
  51. [program]
  52. (()()(0)(
  53.     (}..,(W,})(R));
  54.     (<0>..,(W,<0>)(l,(R))):
  55.     (<(>,(W,<=>)(if,(until,(e,(R)),<:f:>,,(R)),(^Z),<<
  56.             >>(%t,unclosed brace)(%M),<=>..)):
  57.     ({,(W,<=>)(if,(until,(p,(l,(R))),<:f:>,,(R)),(^Z),<<
  58.             >>(%t,unclosed brace)(%M),<=>..)):
  59. )) p
  60.  
  61. [main]
  62. ((
  63.     ((or,(IVL/!/~/),(^Z))) f    [subroutine name/EOF]
  64. )(
  65.     ((%r,<8>.REC,<[1]>,<=>,(^Z))) R
  66.     ((%W,<8>.RQC,<=>)) W
  67. )(8)(
  68.     (<8>.,(if,(%Or,<8>.REC),<>,<<
  69.     >>(%Ow,<8>.RQC)<<
  70.     >>(if,(l,(R)),<(>,(W,<=>)(,(e,(R))),<<
  71.         >><=>,{,(W,<=>)(,(p,(l,(R)))))<<
  72.     >>(%C,<8>.RQC))(,(%C,<8>.REC)));
  73.     (,<=>.):
  74. ))
  75.  
  76. [end]