Back: eval.c & eval.h
Forward: Beginnings of a for Small Project
FastBack: Beginnings of a for Small Project
Up: Library Implementation
FastForward: Beginnings of a for Small Project
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document `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':


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);


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 February, 8 2006 using texi2html