home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / brfcla2.zip / CLASRCH.INC < prev    next >
Text File  |  1989-09-04  |  2KB  |  68 lines

  1. ;;*    next_word / previous_word macro for CLARION Language
  2. ;;*    
  3. ;;*    
  4. ;;*        .cla_next_word , .cla_previous_word
  5. ;;*        
  6. ;;*        
  7. ;;*
  8. ;;*        These definitions are used as "language sensitive" word patterns
  9. ;;*      for CLARION language. The following characters are skipped over:
  10. ;;*    space,tab ()[]{},.;:%?~\"'+-=*/|!&<>#
  11. ;;*
  12. ;;*    Revision History
  13. ;;*    ================
  14. ;;*    6-June-1989         Kevin Baradet      Incept Date
  15. ;;*    
  16. ;;*    Installation
  17. ;;*    ============
  18. ;;*    1) Copy the include directive below into SEARCH.M . 
  19. ;;*    Make sure it's in column 1. 
  20. ;;*       #include "clasrch.inc"
  21. ;;*    2) Recompile SEARCH.M
  22.  
  23.  
  24.  
  25.  
  26. (macro .cla_next_word
  27.     (
  28.         (int    ret_val)
  29.  
  30.         (save_position)
  31.  
  32.         (if (! (index " \t()[]{},.;:%?~\"'+-=*/|!&<>#" (read 1)))
  33.             (next_char)
  34.         )
  35.         (= ret_val (search_fwd "<|[ \t()\\[\\]{},.;:\\%\\?\\~\"'+\\-*\\\\/=|!&><#][~ \t()\\[\\]{},.;:\\%\\?\\~\"'+\\-*\\\\/=|!&><#\n]"))
  36.  
  37.         (if (index " \t()[]{},.;:%?~\"'+-=*/|!&<>#" (read 1))
  38.             (next_char)
  39.         )
  40.         (restore_position (! ret_val))
  41.         (returns ret_val)
  42.     )
  43. )
  44.  
  45. (macro .cla_previous_word
  46.     (                               
  47.         (int    ret_val
  48.                 col
  49.                 )
  50.  
  51.         (save_position)
  52.         (inq_position NULL col)
  53.                 (prev_char)
  54.  
  55.         (if ( (|| (> col 2) (index " \t()[]{},.;:%?~\"'+-=*/\\|!&<>#" (read 1))))
  56.             (prev_char)
  57.         )
  58.         (= ret_val (search_back "<|[ \t()\\[\\]{},.;:\\%\\?\\~\"'+\\-*\\\\/=|!&><#][~ \t()\\[\\]{},.;:\\%\\?\\~\"'+\\-*\\\\/=|!&><#\n]" 2))
  59.  
  60.         (if (index " \t()[]{},.;:%?~\"'+-=*/|!&<>#" (read 1))
  61.             (next_char)
  62.         )
  63.         (restore_position (! ret_val))
  64.         (returns ret_val)
  65.     )
  66. )
  67.  
  68.