9.2.2.4 syntax.c amp

back: eval.c & eval.h
forward: beginnings of a configure.in for small project
 
fastback: beginnings of a configure.in for small project
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

9.2.2.4 `syntax.c' & `syntax.h'

When tokenize splits a char * string into parts , by default it breaks the string into words delimited by whitespace. These files define the interface for changing this default behaviour, by registering callback functions which the parser will run when it meets an `interesting' symbol in the input stream. Here are the declarations from `syntax.h' :

 
 BEGIN_C_DECLS typedef int SyntaxHandler (struct sic *sic, BufferIn *in,                            BufferOut *out); typedef struct syntax {   SyntaxHandler *handler;   char *ch; } Syntax; extern int syntax_install (struct sic *sic, Syntax *table); extern SyntaxHandler *syntax_handler (struct sic *sic, int ch); END_C_DECLS 

A SyntaxHandler is a function called by tokenize as it consumes its input to create a Tokens structure; the two functions associate a table of such handlers with a given Sic parser, and find the particular handler for a given character in that Sic parser, respectively.


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

Similar book on Amazon

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