
PARSER(1)                                               PARSER(1)

DDEESSCCRRIIPPTTIIOONN
       Preparser  parses  through  all  commands  sent  to majik,
       before they are actually  executed.  It  performs  history
       functions,  alias  and  command alias checking in order to
       ease  your game  play.  Wisely  created  aliases  ease  up
       things  that  you  need  to  type often. Preparser is also
       recursive up to the maximum recursion depth of four recur-
       sions.  In  other  words,  you  can stack multiple aliases
       inside another. If you know what you are doing,  it  is  a
       really powerful tool, but you can also get infinite recur-
       sion loops very easily.

       Every command can be divided into two sections:  vveerrbb  and
       aarrgguummeennttss.

       _t_e_l_l _s_i_n_i_s_t_e_r _d_a_r_n_, _y_o_u_'_r_e _m_e_a_n_!

       |__| |_________________________|

       Verb         Arguments

CCOOMMMMAANNDD ((``VVEERRBB'')) AALLIIAASSEESS
       Command aliases can be defined with the command ccoommmmaanndd.

       _c_o_m_m_a_n_d _s_h _s_m_i_l_e _h_a_p_p_i_l_y

       Would bind `sh' to `smile happily'.  When entering `sh' on
       the command line, it would result on `smile happily'  pro-
       cessed  in  majik.  To expand command alias functionality,
       preparser also supports dollar substitution.

       _$      is substituted with entire argument line

       _$_n     is substituted with argument number n

       _$_-_n    is substituted with argument line  except  n  first
              arguments

       _$_L_n    is substituted with n last arguments

       _$_-_L_n   is  substituted  with  argument  line except n last
              arguments

   EEXXAAMMPPLLEE
       _`_t_d_' _-_> _`_t_e_l_l _d_a_z_z_t _$_'
              `td a1 a2 a3 a4' -> `tell dazzt a1 a2 a3 a4'

       _`_t_d_' _-_> _`_t_e_l_l _d_a_z_z_t _$_3_'
              `td a1 a2 a3 a4' -> `tell dazzt a3'

                         MAJIK PREPARSER                        1

PARSER(1)                                               PARSER(1)

       _`_t_d_' _-_> _`_t_e_l_l _d_a_z_z_t _$_-_2_'
              `td a1 a2 a3 a4' -> `tell dazzt a3 a4'

       _`_t_d_' _-_> _`_t_e_l_l _d_a_z_z_t _$_L_3_'
              `td a1 a2 a3 a4' -> `tell dazzt a2'

       _`_t_d_' _-_> _`_t_e_l_l _d_a_z_z_t _$_-_L_1_'
              `td a1 a2 a3 a4' -> `tell dazzt a1 a2 a3'

AARRGGUUMMEENNTT AALLIIAASSEESS
       Argument aliases replace strings  on  your  argument  list
       with  another strings. It is mainly used for giving short-
       cuts to long or otherwise difficult names.

       After defining an alias,

       _a_l_i_a_s _s_i _s_i_n_i_s_t_e_r
              `si' is alias for `sinister'

       every `si' on your argument line  will  be  replaced  with
       `sinister'.   For  example,  typing  `tell  si  yo!' would
       result in `tell sinister yo!'.

HHIISSTTOORRYY FFUUNNCCTTIIOONNSS
       Every command you have sent to majik will be added to your
       history  buffer.  You can recall your recent commands with
       `!' command.

       History functions are:

       _!      Reruns the previous command

       _!_n     Runs the  command  you  have  run  n  commands  ago

OOVVEERRRRIIDDIINNGG TTHHEE PPRREEPPAARRSSEERR
       Preparser  can be overridden by preceding the command with
       `@' character.  When doing that, no  aliases  or  commands
       are checked. If you want to override existing command with
       new one, you must use @ in the command body.

       _`_t_e_l_l_' _-_> _`_t_e_l_l_'
              would result in infinite loop.

       _`_t_e_l_l_' _-_> _`_@_t_e_l_l_'
              @tell is not parsed so infinite loop is avoided.

                         MAJIK PREPARSER                        2

PARSER(1)                                               PARSER(1)

                         MAJIK PREPARSER                        3

