Unix/Linux Go Back    

Plan 9 - man page for twig (plan9 section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

TWIG(1) 										  TWIG(1)

       twig - tree-manipulation language

       twig [ -sASC ] [ -w suffix ] file.mt

       Twig  converts a tree-specification scheme consisting of pattern-action rules with associ-
       ated costs into C functions that can be called to manipulate input trees.  The C functions
       first  find a minimum-cost covering of an input tree using a dynamic programming algorithm
       and then execute the actions associated with the patterns used in the covering.	The tree-
       specification  scheme  may allow several coverings for an input tree, but the dynamic pro-
       gramming algorithm resolves any ambiguities by selecting a cheapest covering.

       The input file containing the tree-specification scheme must have the suffix Twig produces
       two  output  files: walker.c, which becomes the source file for the tree matcher, and sym-
       bols.h, which contains the definitions for the node and label symbols used in  the  source

       To build walker.c, twig uses an internal template file, by default one appropriate for use
       with fprintf(2).

       The options are

       -A	  Use a template file for ANSI/POSIX source files.

       -C	  Use a template file for files that use libc's print(2) routines.

       -S	  Use a template file for files that use fprintf(2).

       -s	  Do not produce a symbols.h file.

       -w suffix  Use the template file /sys/lib/twig/walker.suffix.

	      System area for template files.


       S. W. K. Tjiang, ``The Twig Reference Manual'', Computing  Science  Technical  Report  No.
       120, AT&T Bell Laboratories, Murray Hill, N.J.
       A.  V.  Aho,  M. Ganapathi, and S. W. K. Tjiang, ``Code generation using tree matching and
       dynamic programming.''

       When tree matching fails, the debugging output is cryptic.

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:11 PM.