home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / m4v05as.zip / PLANS < prev    next >
Text File  |  1992-02-19  |  2KB  |  62 lines

  1. Future ideas and plans for GNU m4.     -*- text -*-
  2.  
  3. If you have any comments on these things, or just good ideas of your own, I
  4. would very much like to hear about them.
  5.  
  6.  
  7.  
  8. Include file path search
  9. ========================
  10.  
  11. The ability for search through a user specified search path for files
  12. mentioned in `include' and `sinclude' calls would be useful, especially if you
  13. tend to build up libraries for useful macros, for common use.
  14.  
  15. The implementation would use an environment variable, M4PATH, and an `-Idir'
  16. command line option.  The search path for an included file would then be:
  17. first the directories mentioned on the command line, then the directories from
  18. the colon separated list in M4PATH, and last the current working directory.
  19.  
  20. If there are no -I options, and M4PATH is not set, the behaviour is as it has
  21. always been.
  22.  
  23.  
  24.  
  25. A new `format' builtin
  26. ======================
  27.  
  28. This will support printf-like formatting capabilities, which will be useful
  29. when making (semi-)tabular output.  The syntax will be
  30.  
  31.     format(fmt, arg1, arg2, ...)
  32.  
  33. where `fmt' can contain `%' specifications, with field widths and precisions
  34. as usual.  The expansion will be the formatted string.
  35.  
  36.  
  37.  
  38. A new `regexp' builtin
  39. ======================
  40.  
  41. This will support matching regular expressions in m4.  I imagine a syntax with
  42. two or three arguments.  If called with two arguments, 
  43.  
  44.     regexp(regular expression, string)
  45.  
  46. `regexp' will expand to either `0' or `1', depending on whether `string'
  47. matches the regular expression.  Called with three arguments, it is possible
  48. to control the expansion.
  49.  
  50.     regexp(regular expression, string, substitution)
  51.  
  52. Here the expansion is `substitution' with `\digit' and `\&' sequences
  53. substituted as usual.
  54.  
  55.  
  56.  
  57. Shorthands in translit
  58. ======================
  59.  
  60. The `translit' builtin should support shorthands, like tr(1) does.  This might
  61. be implementated in a future version of GNU m4.
  62.