eval.c amp

back: builtin.c & builtin.h
forward: syntax.c & syntax.h
fastback: syntax.c & syntax.h
up: library implementation
fastforward: beginnings of a configure.in for small project
top: autoconf, automake, and libtool
contents: table of contents
index: index
about: about this document `eval.c' & `eval.h'

Having created a Sic parser, and populated it with some Builtin handlers, a user of this library must tokenize and evaluate its input stream. These files define a structure for storing tokenized strings ( Tokens ), and functions for converting char * strings both to and from this structure type:

 #ifndef SIC_EVAL_H #define SIC_EVAL_H 1 #include <sic/common.h> #include <sic/sic.h> BEGIN_C_DECLS typedef struct {   int  argc;            /* number of elements in ARGV */   char **argv;          /* array of pointers to elements */   size_t lim;           /* number of bytes allocated */ } Tokens; extern int eval       (Sic *sic, Tokens *tokens); extern int untokenize (Sic *sic, char **pcommand, Tokens *tokens); extern int tokenize   (Sic *sic, Tokens **ptokens, char **pcommand); END_C_DECLS #endif /* !SIC_EVAL_H */ 

These files also define the eval function, which examines a Tokens structure in the context of the given Sic parser, dispatching the argv array to a relevant Builtin handler, also written by the library user.

This document was generated by Gary V. Vaughan on May, 24 2001 using texi2html

GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net