home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / agent10.lzh / Docs / Agent_E.doc next >
Encoding:
Text File  |  1992-05-17  |  25.1 KB  |  618 lines

  1.  
  2.  
  3.                            Personal Agent 1.0
  4.  
  5.                 (C) Copyright 1992 V. Gervasi - ICARUS
  6.  
  7.  
  8.  
  9.          Introduction
  10.         --------------
  11.  
  12. ááPersonaláAgent is a program meant to make it easy operating on files via
  13. the Workbench's icons. Using this program, you will be able to easily look
  14. at  graphics  images,  listen to music files, unpack archives of different
  15. kinds,  read  on-line manuals and other documents and, in general, perform
  16. many  operations  that  would  otherwise  require using the CLI. By simply
  17. dragging  a  Workbench's  icon and dropping it over Personal Agent's icon,
  18. the program will automatically recognize the file associated with the icon
  19. and perform the corresponding actions.
  20.  
  21. ááThe program is completely configurable, thanks to a simple embedded
  22. programming language, and to a graphical user interface that conforms to
  23. your preferences.
  24.  
  25. ááIt  comes  with  some  pre-built configurations, understanding many file
  26. types,  and  with  a  number  of  icons  among  which  you can choose your
  27. favorites.
  28.  
  29. ááThis manual will first illustrate Personal Agent's basic operations, from
  30. installing  it  to using the standard configurations. Then we will look at
  31. how  to  configure  the  program,  and  at  FAM,  the internal programming
  32. language, and his compiler.
  33.  
  34.  
  35.  
  36.  
  37.          Installing and Using Personal Agent
  38.         -------------------------------------
  39.  
  40. ááIf you followed the standard installation procedure, that only require a
  41. double-click on the "Install" icon, and chose to execute Personal Agent at
  42. boot time (that is the default), you don't need to do nothing more.
  43.  
  44. ááIf,  instead,  you chose to NOT execute Personal Agent at boot time, you
  45. will need to run it by hand. Personal Agent can be run both from Workbench
  46. and  from CLI. In the first case, a double-click on its icon is enough; in
  47. the  second  one,  you  should  give  the  name  as  a command to the CLI,
  48. preferably preceded by "RUN" to ask for background execution.
  49.  
  50. ááAn example of the latter case is
  51.  
  52.         run >NIL: <NIL: Agent
  53.  
  54. ááUnless  you  incur  in  some  error (if this is the case, have a look at
  55. Appendix  A),  the  program  will  briefly display an information message,
  56. showing  what  FAM  configuration  it  is currently using, and a copyright
  57. notice.  Immediately  after  this,  an  icon  will appear on the Workbench
  58. screen representing the program.
  59.  
  60. ááFrom  now,  it  is sufficient to drag and drop a file icon over Personal
  61. Agent's  one,  to  have  the program analyze the file type and execute the
  62. appropriate  command  specified  in  the  FAM configuration. Usually, this
  63. command will permit to "look" at the file in the most appropriate way.
  64.  
  65. ááA  double-click  on the Personal Agent's icon will open a window showing
  66. various  statistics  on  the  program's  operations,  together  with three
  67. options  to  continue  the execution, clear the accumulated statistics, or
  68. terminate the program.
  69.  
  70.  
  71.  
  72.  
  73.  
  74.          Configuring Personal Agent
  75.         ----------------------------
  76.  
  77. ááThe main method used in configuring Personal Agent is by its icons' Tool
  78. Types.  If  you have followed the installation procedure, you'll find this
  79. Tool  Types  already  set  suitably;  otherwise, you will have to manually
  80. enter all required informations.
  81.  
  82. ááTo reach these options, you should select the icon "Agent," found in the
  83. same  drawer  you  installed  Personal Agent in, and choose "Informations"
  84. from  the  "Icons" menu of the Workbench (as an alternative, you can press
  85. Right  Amiga-I).  It  will show a window containing, among other things, a
  86. list  of Tool Types. You can change these options by selecting a line with
  87. the  mouse  and  editing its contents in the editing area at the bottom of
  88. the list; press RETURN when you have modified it.
  89.  
  90. ááWhen  you are satisfied of your choices, press the "Save" gadget. If you
  91. changed  your  mind, and don't want to change the current configuration as
  92. well, you can press the "Cancel" gadget.
  93.  
  94. ááHereafter  we  will  discuss  the parameters you can change to suit your
  95. needs or preferences.
  96.  
  97.  
  98.         ICON=<icon-name>
  99.  
  100. ááThis  setting  lets you choose which icon should appear on the Workbench
  101. screen  to  represent  the program. The <icon-name> you supply must be the
  102. name  of a file, with an optional path, whose icon is borrowed by Personal
  103. Agent.  If  this line is not present, Personal Agent will use its own icon
  104. (the icon of the file "Agent").
  105.  
  106.  
  107.         NAME=<name>
  108.  
  109. ááBy  using this setting, you can indicate what name should Personal Agent
  110. use  to  name its icon. This may be any name, but shorter ones are better.
  111. If this line is omitted, Personal Agent will use its own name ("Agent").
  112.  
  113.  
  114.         OUTPUT=<output>
  115.  
  116. ááWith  the  OUTPUT  parameter  you  can select where to send all messages
  117. produced  by  programs  executed by Personal Agent. Usually, you will want
  118. this messages to be displayed in an on-screen window, and will use CON: as
  119. <output>  (that is the default). It is also advisable to specify the /AUTO
  120. and  /WAIT  console  attributes, asking to make the window closable and to
  121. not open it at all unless some message is actually produced.
  122.  
  123. ááThe syntax for CON:áis
  124.  
  125.     CON:<left>/<top>/<width>/<height>/<title><attributes>
  126.  
  127. as an example,
  128.  
  129.     OUTPUT=CON:0/15/600/120/Agent/AUTO/WAIT
  130.  
  131. means  that  the  messages will be displayed in a window which has its top
  132. left  corner  at  (0,15), 600 pixels wide and 120 pixels tall, whose title
  133. will  be  "Agent."  Moreover,  the  window will open only if there is some
  134. message  to  display,  and  even after the end of the command, will wait a
  135. click  in  the  close  gadget  to  disappear.  You  can find more detailed
  136. information on CON: on your "Using The System Software" manual.
  137.  
  138. ááIf <output> contains the character sequence "%s," it will be replaced by
  139. the  name  of  the command Personal Agent runs to view the file (including
  140. any parameter).
  141.  
  142.  
  143.         CLASSES=<classes>
  144.  
  145. ááThis  Tool  Type  lets  you  indicate which file contains the source FAM
  146. program that defines file classes and related actions to look at them (the
  147. format of this file will be explained later). If this line is not present,
  148. the  file  "classes"  will  be used (if even "classes" cannot be found, an
  149. error message will be issued).
  150.  
  151.  
  152.         XPOS=<x-position>
  153.         YPOS=<y-position>
  154.  
  155. ááWith  these  you can choose the position that Personal Agent's icon will
  156. occupy  on the Workbench screen. The positions must be expressed in screen
  157. pixels;  (0,0)  is the upper left corner of the screen. If these lines are
  158. omitted, the icon will be placed in such a way to not interfere with other
  159. icons  already  present  on  the screen. You can obtain the same effect by
  160. setting  one  or  both  of  the  coordinates to "-1"; the system will then
  161. choose a suitable location.
  162.  
  163.  
  164.         WAIT=<seconds>
  165.  
  166. ááAt  last,  this parameter allows you to choose how long Personal Agent's
  167. messages  should wait on screen. The standard setting is 7 seconds. Please
  168. note that every message will disappear as soon as you click a mouse button
  169. in  the  message  window or press any key. To hold the message longer than
  170. the defined time, just click OUTSIDE of the message window; the time count
  171. will be suspended.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.          The FAM Language
  180.         ------------------
  181.  
  182. ááFAM  is  an  acronym  standing  for File Analysis Machine, and this name
  183. explains well the goals and the limits of FAM. If you chose to install the
  184. examples,  you  can  look  at some FAM programming examples by reading the
  185. files  "view_classes"  and  "unpack_classes." The files "view_classes.sys"
  186. and  "unpack_classes.sys"  contain  the  compiled  version of the same FAM
  187. programs.
  188.  
  189. ááFAM  is  a  very  specialized  language, with only few commands oriented
  190. towards  describing  file's  formats  and specifying actions to perform on
  191. these files.
  192.  
  193. ááThe  format  for  a  FAM  source  file is the so-called "free form." The
  194. placement  of the commands is not significative: spaces, tabs and newlines
  195. doesn't change the meaning of a program.
  196.  
  197. ááBesides this, the FAM has been thought to make for easy documentation of
  198. programs;  because  of  this, comments may be anywhere in the source file,
  199. and don't need any particular delimitation characters.
  200.  
  201. ááIndeed,  the  only parts of a source file at which the compiler look are
  202. those between "CLASS"-"END" and "ACTION"-"END" keywords; between these (in
  203. upper  case),  comments are not allowed. Any other element of the language
  204. is case-insensitive.
  205.  
  206. ááComments  apart,  FAM sources are made of two kinds of commands, usually
  207. (but   not  necessarily)  collected  in  two  separate  sections:  Classes
  208. Definitions and Actions Definitions.
  209.  
  210. ááClasses  Definitions are needed to allow Personal Agent to recognize the
  211. kind  of  file  it is dealing with; Actions Definitions are needed so that
  212. Personal Agent knows what to do with these files.
  213.  
  214. ááClasses  Definitions  let  you  define "classes" of files, by specifying
  215. what format must the file match to be considered a member of the class.
  216. The  format  specification  may be done on the name and on the contents of
  217. the file. The informal syntax for a class definition is
  218.  
  219.         CLASS <class-name> HAS <format> END
  220.  
  221. ááThe  <class-name>  is the (unique) name used to refer to the class; this
  222. name  will  be  used later to indicate what actions are to be performed on
  223. the  file.  The <format> is made from two kinds of items: name formats and
  224. contents formats.
  225.  
  226. ááName formats are like
  227.  
  228.                 NAME <pattern>
  229.  
  230. where  <pattern> can be any string containing AmigaDOS pattern characters:
  231. #  ?  ~  (  |  )  %  [ ]. You may wish to read your AmigaDOS manual on the
  232. meaning of these symbols.
  233.  
  234. ááContents format are like
  235.  
  236.                 <byte-list> AT <position>
  237.  
  238. where <byte-list> is a sequence of bytes, that can be expressed in several
  239. ways, and <position> is the position into the file, expressed as byte from
  240. the start of the file.
  241.  
  242. ááThe <byte-list> may contain
  243.  
  244.         decimal numbers:        123
  245.         octal numbers:          033
  246.         hexadecimal numbers:    $AB o 0xC0
  247.         binary numbers:         %01100110
  248.         strings:                "FORM"  (this string specifies 4 bytes)
  249.  
  250. ááThese  components  may  be  specified  in  any  order,  to specify bytes
  251. sequences  up  to 256 bytes in length. This is not a strict limit: if, for
  252. example,  you  need  to identify 300 bytes at the start of a file, you can
  253. write
  254.  
  255.         ... HAS <first 250 bytes> AT 0
  256.             AND <remaining 50 bytes> AT 250  ...
  257.  
  258. ááYou  can  connect different formats with AND and OR operators to specify
  259. complex conditions; AND takes precedence over OR. It is possible to define
  260. several  times  the  same class; in such cases, every single definition is
  261. ORed with the other ones.
  262.  
  263. ááIt is time for some example:
  264.  
  265. áá-  An  IFF  ILBM  file,  the standard format for graphical images on the
  266. Amiga,  contains  the string "FORM" in the first four bytes, the length of
  267. the  data  in the following four and the string "ILBM" in the bytes from 8
  268. to 11, followed by other data. A format for such a class could then be
  269.  
  270.  
  271.         CLASS ILBM has "FORM" at 0 AND "ILBM" at 8 END
  272.  
  273. áá- An executable file, on the Amiga, starts with the hexadecimal sequence
  274. 000003F3. This gives a definition like
  275.  
  276.         CLASS Exe has $00 $00 $03 $F3 at 0 END         or
  277.         CLASS Exe has 0 0 0x03 0xf3 at 0 END           or
  278.         CLASS Exe has 0 0 3 243 at 0 END               etc.
  279.  
  280. áá-  The  popular  packer/archiver  LhArc,  and  the  similar LZ, produces
  281. archive  files  whose name usually ends with ".lzh" or ".lha." These names
  282. are  not enforced, however, so we cannot rely on them to define our class.
  283. However,  such  archives  always  contain  a string of the form "-lh?-" at
  284. position  2,  where  ?  indicates  the style of compression applied to the
  285. original  file(s)  (usually  0, 1 or 5). Let's write a definition for this
  286. class:
  287.  
  288.         CLASS LZH has      NAME #?.lzh
  289.                         OR NAME #?.lha
  290.                         OR "-lh" at 2 AND "-" at 6
  291.         END
  292.  
  293. ááWe could also write
  294.  
  295.         CLASS LZH has     NAME #?.lzh
  296.                        OR NAME #?.lha
  297.                        OR "-lh0-" at 2
  298.                        OR "-lh1-" at 2
  299.                        OR "-lh5-" at 2
  300.         END
  301.  
  302. ááPlease  note  how  the  layout of the definition is absolutely free, and
  303. dictated here from aesthetical considerations.
  304.  
  305.  
  306. ááNow we come to actions definitions.
  307.  
  308. ááTheir format is
  309.  
  310.         ACTION VIEW <class-name> IS <action> END
  311.  
  312. ááIn this case, <class-name> is (obviously) the class' name, the same used
  313. in  the class' definition, while <action> is an AmigaDOS command that will
  314. be executed  when Personal Agent will face a file conforming to the class'
  315. definition.
  316.  
  317. ááIn  the  <action>  part,  every  occurrence  of  the string "%s" will be
  318. substituted  by the name of the file under exam. The AmigaDOS command will
  319. be executed in the same directory containing the file examined.
  320.  
  321. ááIt  is  necessary  to spend a few words on this topic. Usually, AmigaDOS
  322. commands  are  run from a Shell (or CLI), and may assume the presence of a
  323. "path,"  or,  a  list  of  directories where things like other programs or
  324. needed  files  are searched in. The same thing holds for Personal Agent IF
  325. the program has been ran from a CLI (or any other Shell, like AmigaShell);
  326. if  Personal  Agent  was ran from the Workbench, it cannot find a path and
  327. thus  the <action>s must explicitly indicate where to find the commands to
  328. execute. It is possible that this behavior will change on a future release
  329. of Personal Agent or the Operating System.
  330.  
  331.  
  332. ááLet's look at some example:
  333.  
  334. áá-  We  want  that, when Personal Agent meets an archive of class LZH (as
  335. defined  above),  it  will  show  the  list  of the files contained in the
  336. archive:
  337.  
  338.         ACTION VIEW LZH is lz v "%s" END
  339.  
  340. ááHere,  we  use the command LZ with the option v (that shows the contents
  341. of  the   archive); the %s will be substituted by the actual file name. We
  342. used "%s,"  not  %s:  this is a good rule of thumb, to avoid problems with
  343. file names containing spaces that could mess up LZ.
  344.  
  345. áá-  Now  we  want  that,  when  an ILBM file is analyzed, Personal Agents
  346. starts  a  graphical  editor (let's suppose it is named SuperPaint), ready
  347. to work on the analyzed file:
  348.  
  349.         ACTION VIEW ILBM is Work:usr/appl/SP/SuperPaint "%s" END
  350.  
  351. ááIn  this case, we have indicated the full path to reach SuperPaint: this
  352. may  be  needed if our usual path doesn't contain "Work:usr/appl/SP" or if
  353. we  would  like  to start Personal Agent from the Workbench (that, as said
  354. above, doesn't provide a path as the Shell does).
  355.  
  356. áá-  Let's  imagine  that, to "look" at an archive file, we really mean to
  357. unpack it. An adequate definition for LhArc would be
  358.  
  359.         ACTION VIEW LZH is lharc -a -x x "%s" #? RAM: END
  360.  
  361. ááThe  "VIEW"  in  the  syntax  of actions definitions is actually a place
  362. holder;  in  a future release of the language you could indicate different
  363. actions  to  perform  on a file. With this variation, we could have ACTION
  364. VIEW  to look at a file, ACTION RUN to execute it, ACTION UNPACK to unpack
  365. it,  ACTION  HEAR  to listen to it, ACTION INFO to get some information on
  366. the  file...  The  user  will  be  free  to  define  his set of actions; a
  367. graphical  interface  will  allow  him  to  select  which of the different
  368. actions to perform on the file.
  369.  
  370. ááIt is useful to consider that <action>s are run ASYNCHRONOUSLY; in other
  371. words,  Personal Agent does not wait the completation of a command, but is
  372. immediately  ready  to  accept  more  manipulations. This fact may be of a
  373. certain  importance  when you drop on Personal Agent's icon not one, but a
  374. set of icons (obtained either by shift-clicking them, or by drag-selecting
  375. them):  in such cases, Personal Agent will run almost contemporarily every
  376. command that pertains to any of the selected icons.
  377.  
  378.  
  379. ááLet's consider now the compilation pass.
  380.  
  381. ááTo  modify  FAM  programs,  or  to  write brand new ones, you can use an
  382. editor,  such  as  ED  or  MicroEmacs  (both  are part of the Amiga System
  383. Software)  and  save  the text in a file, whose name is in the CLASSES=...
  384. Tool Type of Personal Agent.
  385.  
  386. ááWhen  Personal  Agent  starts, it automatically checks to see if the FAM
  387. program  indicated  in his CLASSES parameter needs recompilation (based on
  388. system date and time). If it can determine that a compilation is required,
  389. the  process  happens silently, leaving the result in a file with the same
  390. name  as  the source file, but with a ".sys" suffix appended. In the event
  391. of  any  compilation  error  (wrong  syntax, insufficient memory, too many
  392. definitions...)  a  warning  message  will  appear  and  the  old (if any)
  393. compiled file will be retained. If all goes well, you should barely notice
  394. a small delay on startup: this is all.
  395.  
  396. ááWhen  Personal  Agent  is  called  to  analyze a file, it will check the
  397. file's name against all patterns defined in the FAM program, in appearance
  398. order. Only  if none of them matches will Personal Agent consider the "HAS
  399. xxx  AT yyy"  clauses  (since  checking them is a bit slower); again, them
  400. will be checked  in  appearance  order.  It  is quite possible that a file
  401. doesn't  match  a  given  clause, but matches a subsequent one relating to
  402. the same class:
  403.  
  404.  
  405.         CLASS LZH has "-lh1-" at 2 END
  406.  
  407.         CLASS FOO has "Foo1" at 10 END
  408.  
  409.         CLASS LZH has "-lh5-" at 2 END
  410.  
  411. ááNow,  the  file  is  considered  of  class LZH only if it has "-lh1-" at
  412. position 2, or if it has "-lh5-" at the same position BUT does not contain
  413. "Foo1"  at  position  10 (in that case, it would be considered as being of
  414. class FOO).
  415.  
  416. ááOnce the file's class has been determined, Personal Agent will check the
  417. class against the actions defined, as always in appearance order. If there
  418. is no "ACTION" relating to that class, an error message is displayed, else
  419. the corresponding AmigaDOS command is executed.
  420.  
  421. ááIf the file doesn't fall in one of the defined class, it is considered as
  422. being of the special class "DEFAULT." An action for class DEFAULT may (and
  423. should)  exist.  Usually,  ACTION  VIEW  DEFAULT will be some very general
  424. viewer  (as  "more %s" or "echo I don't know how to display %s!"), but the
  425. final  choice  is up to you. If no action for DEFAULT is defined, you will
  426. get a warning message.
  427.  
  428. ááAppendix B contains the formal syntax of FAM.
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.          Appendix A - Guide to the Messages
  437.         ------------------------------------
  438.  
  439. ááAll messages about compilation errors are rather auto-explicative. These
  440. messages  may  appear in three passes of compilation: compiling NAMEs (for
  441. HAS  NAME  xxx  clauses), compiling CODEs (for HAS xxx AT yyy clauses) and
  442. compiling ACTIONs (for ACTION VIEW yyy IS zzz clauses). In every case, the
  443. message  contains  suggestions on how to remedy to the error condition, as
  444. well as the offending FAM source line.
  445.  
  446. ááBesides the compilation errors, other unusual occurrences may happen, all
  447. signaled by a related message:
  448.  
  449.   "Error compiling FAM source file "xxx".
  450.    FAM Object file "xxx.sys" unchanged."
  451.  
  452. ááSince  some  error  occurred  during  the  compilation  phase, it wasn't
  453. possible  to    produce  a correct object file. The old one (if available)
  454. will be used instead.
  455.  
  456.   "Cannot open FAM source file "xxx" !
  457.    Look at the CLASSES=... ToolType in my icon."
  458.   "Cannot read FAM object file "xx.sys" !
  459.    Look for the CLASSES=... ToolType in my icon."
  460.  
  461. ááPersonal Agent could not find the file stated via the CLASSES parameter.
  462. Since  it  is not possible to know what class definitions to use, Personal
  463. Agent will not be executed.
  464.  
  465.   "Cannot start the File Analysis Machine !"
  466.  
  467. ááThis  messages  appear  usually after other, more specific, messages. It
  468. means  that the part of Personal Agent that actually recognizes file types
  469. could not initialize itself; Personal Agent will not be executed.
  470.  
  471.   "Couldn't add my icon to the Workbench screen"
  472.  
  473. ááThe system rejected Personal Agent's request to add its icon among those
  474. shown  by  Workbench.  This could happen due to a low memory condition, or
  475. because  Workbench  is  not  actually  running,  or  even  as an effect of
  476. previous errors.
  477.  
  478.   "Couldn't get my .info file !"
  479.  
  480. ááPersonal  Agent  could  not  find  the  file  containing  its  own  icon
  481. ("Agent.info").  Since this file contains all the Tool Types that Personal
  482. Agent needs to configure itself, the program cannot be executed.
  483.  
  484.   "Couldn't create a message port !"
  485.  
  486. ááThis  is  an  anomalous condition, that sometimes happens because of low
  487. memory. Personal Agent cannot be executed.
  488.  
  489.   "Cannot access that object (not a file ?)"
  490.  
  491. ááPersonal Agent was called to examine an icon that isn't actually a file,
  492. such  a disk's or drawer's icon, or even the icon of another program that,
  493. as Personal Agent does, resides on the Workbench screen.
  494.  
  495.   "Cannot access "xxx" !"
  496.   "Cannot access that object !"
  497.  
  498. ááFor some reason, Personal Agent cannot access to the file represented by
  499. the dropped icon. The file will not be examined.
  500.  
  501.   "Cannot open "xxx" !"
  502.   "Cannot open that object !"
  503.  
  504. ááAn  existing  file correspond to the given icon, but this file cannot be
  505. opened for reading. The file will not be examined.
  506.  
  507.   "Cannot start "xxx", system returned:
  508.    yyyy yyyyyyyyyy yyy yyyyyyy yyyyyy"
  509.  
  510. ááPersonal  Agent did recognize the file related to the given icon, but in
  511. the  attempt  of executing the related action ("xxx"), the system incurred
  512. in an error. A more detailed description is given case by case.
  513.  
  514.   "Sorry, cannot open "xxx" for output.
  515.    Look for the OUTPUT=... ToolType in my icon."
  516.  
  517. ááThe OUTPUT Tool Type specifies a file (or a CON:) that cannot be opened.
  518. If  it  is  a  CON:, most probably there is an error in his syntax, or the
  519. given coordinates lay out of the screen.
  520.  
  521.  
  522. ááThere  is  another  set of auto-explicative message, concerning cases of
  523. files  not  being recognized or, if recognized, of no action being defined
  524. for  that  class.  These are not errors, but a consequence of presenting a
  525. file in a format that Personal Agent doesn't "knows."
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.         Appendix B - FAM Formal Syntax
  534.         ------------------------------
  535.  
  536. ááThe FAM syntax is presented here using a variant of the EBNF notation.
  537.  
  538. ááSpaces,  tabs  and  newlines  are not significant, and can appear in any
  539. arbitrary sequence anywhere a single space can.
  540.  
  541. ááEverything  not  included between "CLASS" and "END", or between "ACTION"
  542. and  "END" is considered as not being a part of the FAM program - in other
  543. words,  it  is  a comment. The delimiters "CLASS", "ACTION" and "END" must
  544. appear  in  upper  case,  all  other  tokens  of  the  language (including
  545. identifiers and patterns) are case-insensitive.
  546.  
  547. ááAt last, here is the syntax: non-terminals are shown between "<" and ">",
  548. the  symbol  "<>"  stands for the null string, alternative productions are
  549. separated  by  "|"  and  the production symbol is "::=". All terminals are
  550. written  in upper case, but, except for CLASS, ACTION and END, case is not
  551. significative; informal definitions are delimited by "{" and "}".
  552.  
  553.  
  554.  
  555.  <program> ::=        <stmt-list>
  556.    <stmt-list> ::=     <> | <stmt> <stmt-list>
  557.    <stmt> ::=          <class-def> | <action-def>
  558.  
  559.     <class-def> ::=     CLASS <class-name> HAS <or-pr-list> END
  560.      <class-name> ::=    {Identifier}
  561.       <or-pr-list> ::=    <or-pred> | <or-pred> OR <or-pr-list>
  562.       <or-pred> ::=       NAME <pattern> | <and-pr-list>
  563.       <and-pr-list> ::=   <and-pred> | <and-pred> AND <and-pr-list>
  564.       <and-pred> ::=      <bytes> AT <offset>
  565.        <bytes> ::=         "<string>" | <byte> | "<string>" <bytes>
  566.                            | <byte> <bytes>
  567.        <string> ::=       {Any ASCII string, up to 255 bytes in length.
  568.                            It cannot contain '"'}
  569.        <byte> ::=         0x<HH> | 0<OOO> | $<HH> | %<BBBBBBBB> | <DDD>
  570.         <HH> ::=           {At most two hexadecimal digits}
  571.         <OOO> ::=          {At most three octal digits, with value <256}
  572.         <BBBBBBBB> ::=     {At most eight binary digits}
  573.         <DDD> ::=          {At most three decimal digits, with value <256}
  574.  
  575.     <action-def> ::=    ACTION <action> <class-name> IS <command> END
  576.      <action> ::=        {Identifier}
  577.      <command> ::=       {An AmigaDOS command}
  578.  
  579.  
  580. Notes:
  581. ááIdentifiers  are made of any sequence of ASCII characters, except space,
  582. tab  and  newline.  It  is better (for future compatibility) to follow the
  583. usual  rules  for  identifiers:  a  letter or _, followed by any number of
  584. letters, digits or _. Formally, using regular expressions,
  585.  
  586.         Identifier = [a-zA-Z_][a-zA-Z0-9_]*
  587.  
  588. ááKeep  in  mind  that,  as  of  the current release, <byte>s expressed in
  589. binary form are not supported, and the only <action> supported is VIEW. If
  590. any  <byte> denotes a value greater than 255, it will be considered modulo
  591. 256 (i.e., only the lowest-order byte is taken into account).
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.         Appendix C - Future Directions and Various Thanks
  599.         -------------------------------------------------
  600.  
  601. ááThe  FAM  language will undergo some revision, as already anticipated in
  602. the  previous  sections.  It will be possible to program different type of
  603. actions,  with different icons for each of them, all in a single FAM file;
  604. a descriptive comment for each defined class is a probable addition.
  605.  
  606. ááThe  next revision of Personal Agent will use some new service of the OS
  607. to  warrant support to different languages without the need for a separate
  608. version of the program for each language.
  609.  
  610. ááThe Author wish to thank two other member of the ICARUS group, that have
  611. greatly   contributed   to   Personal   Agent  verification  and  document
  612. preparation:
  613.  
  614.  
  615.   Paolo Canali, that handled the German version, and
  616.   Roberto Rosselli, that handled the French one.
  617.  
  618.