home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / agent10.lzh / examples / view_classes < prev    next >
Encoding:
Text File  |  1992-05-16  |  3.9 KB  |  148 lines

  1. /*
  2.         This file describes some classes for Personal Agent 1.0
  3. */
  4.  
  5. These are comment lines.
  6. Note as no special introducer is needed...
  7.  
  8. Comments may be anywhere except into a class definition (class ... end) or
  9. an action definition (action ... end).
  10.  
  11. The keywords "class", "action" and "end" act as delimiters; to avoid confusions
  12. (since "class" often appears in comments), they MUST be in upper case; "class",
  13. "action" and "end" in uppercase are RESERVED words.
  14. Every other element of the language (patterns included) is case-insensitive.
  15.  
  16.  
  17. ############################
  18. # Some typical ASCII docs
  19. ############################
  20.  
  21. CLASS ASCII HAS    NAME #?.doc
  22.                 OR NAME #?.txt
  23.                 OR NAME #?.man
  24.                 OR NAME #?.rea
  25.                 OR NAME #?read#?me#?
  26. END
  27.  
  28.  
  29. #############################
  30. # Various packers' archives
  31. #############################
  32.  
  33. CLASS LZH HAS NAME #?.lzh OR NAME #?.lha OR "-lh" AT 2 AND "-" AT 6 END
  34.  
  35. CLASS ZIP HAS NAME #?.zip OR "PK" AT 0 END
  36.  
  37. CLASS ZOO HAS NAME #?.zoo OR "ZOO" AT 0 AND "Archive" AT 9 END
  38.  
  39. CLASS ARC HAS NAME #?.arc END
  40.  
  41. CLASS DSM HAS NAME #?.dsm OR "DSM" AT 0 END
  42.  
  43.  
  44. ####################
  45. # Some IFF format
  46. ####################
  47.  
  48. CLASS ILBM HAS  "FORM" AT 0 AND "ILBM" AT 8 END
  49.  
  50. CLASS C100 HAS  "FORM" AT 0 AND "C100" AT 8 END
  51.  
  52.  
  53. ###################
  54. # Tracker modules
  55. ###################
  56.  
  57. CLASS TRACKER HAS NAME mod.#? OR "st-" at 20 and "@" at 45 END
  58. CLASS MED HAS "MED" at 0 END
  59.  
  60.  
  61. #################################################################
  62. # Amiga executable files (includes .devices, .library & .fonts)
  63. #################################################################
  64.  
  65. CLASS Exe HAS $00 $00 $03 $f3 at 0 OR name #?.exe END
  66.  
  67.  
  68. ###############
  69. # .info files
  70. ###############
  71.  
  72. CLASS .info HAS NAME #?.info OR $E3 $10 $00 $01 AT 0 END
  73.  
  74.  
  75. ###################
  76. # Source Programs
  77. ###################
  78.  
  79. CLASS CREXX has "/*" at 0 END
  80.  
  81. CLASS C has "#include" at 0
  82.         OR  10 "#include" at 0
  83.         OR  10 10 "#include" at 0
  84.         OR name #?.c
  85.         OR name #?.h
  86. END
  87.  
  88.  
  89. #######################################
  90. # Some minor, specialized file format
  91. #######################################
  92.  
  93. CLASS TDLOG HAS "TrapDoor" AT 22 END
  94. CLASS VLT_SCRIPT has name #?.scp END
  95.  
  96.  
  97.  
  98.  
  99. ##########################################################
  100. # Actions for the above defined classes, in my own system
  101. ##########################################################
  102. #
  103. #ACTION VIEW ILBM IS dh0:usr/misc/m "%s" END
  104. #ACTION VIEW ASCII IS dh0:usr/etc/view80 "%s" END
  105. #ACTION VIEW C IS lc:lse <NIL: >NIL: "%s" END
  106. #ACTION VIEW CREXX IS lc:lse <NIL: >NIL: "%s" END
  107. #ACTION VIEW Exe IS %s ? END
  108. #ACTION VIEW TRACKER IS echo "%s" is a SoundTracker module END
  109. #ACTION VIEW .info IS echo "%s" is a .info file END
  110. #ACTION VIEW C100 IS c1-text:C1-Text "%s" END
  111. #ACTION VIEW LZH IS dh0:usr/archivers/lz v "%s" END
  112. #ACTION VIEW ZIP IS dh0:usr/archivers/unzip -v "%s" END
  113. #ACTION VIEW ZOO IS dh0:usr/archivers/zoo v "%s" END
  114. #ACTION VIEW ARC IS dh0:usr/archivers/arc v "%s" END
  115. #ACTION VIEW TDLOG IS dh0:usr/user/dme "%s" END
  116. #ACTION VIEW VLT_SCRIPT IS dh0:usr/user/dme "%s" END
  117. #
  118. #ACTION VIEW DEFAULT IS dh0:usr/etc/view80 "%s" END
  119. #
  120.  
  121. ##################################################
  122. # Actions for the above defined classes, generic
  123. ##################################################
  124.  
  125. ACTION VIEW ILBM IS display "%s" END
  126. ACTION VIEW ASCII IS more "%s" END
  127. ACTION VIEW C IS memacs "%s" END
  128. ACTION VIEW CREXX IS memacs "%s" END
  129. ACTION VIEW Exe IS %s ? END
  130. ACTION VIEW TRACKER IS echo "%s" is a SoundTracker module END
  131. ACTION VIEW MED IS echo "%s" is a MED module END
  132. ACTION VIEW .info IS echo "%s" is a .info file END
  133. ACTION VIEW C100 IS echo "%s" is a C1-Text document END
  134. ACTION VIEW LZH IS lz v "%s" END
  135. ACTION VIEW ZIP IS unzip -v "%s" END
  136. ACTION VIEW ZOO IS zoo v "%s" END
  137. ACTION VIEW ARC IS arc v "%s" END
  138. ACTION VIEW TDLOG IS ed "%s" END
  139. ACTION VIEW VLT_SCRIPT IS ed "%s" END
  140.  
  141.  
  142. ##################
  143. # Default action
  144. ##################
  145.  
  146. ACTION VIEW DEFAULT IS more "%s" END
  147.  
  148.