parser.c File Reference

#include "pcctscfg.h"
#include "pccts_stdio.h"
#include "charbuf.h"
#include "stringbuffer.h"
#include "libicl.h"
#include "libicl_private.h"
#include "glib.h"
#include <stdio.h>
#include "ast.h"
#include "antlr.h"
#include "tokens.h"
#include "dlgdef.h"
#include "mode.h"
#include "ast.c"

Go to the source code of this file.

Defines

#define ANTLR_VERSION   13333
#define AST_FIELDS   int isDefined; int type; char* tokenData; size_t tokenLen;
#define ZZCOL
#define USER_ZZSYN
#define ZZLEXBUFSIZE   10485760
#define zzcr_ast(ast, attr, ttype, text)
#define LL_K   2
#define GENAST
#define zzSET_SIZE   8
#define PCCTS_PURIFY(r, s)   memset((char *) &(r),'\0',(s));

Enumerations

enum  parser_state_vals { parser_dblquote_CONTINUE, parser_dblquote_FOUNDQUOTE }

Functions

ICLTermparser_getTermFromString (char *str, size_t len)
ICLTermparser_getTermFromStringDebug (char *str, size_t len)
int parser_getTermFromBuf (ICLTerm **result, stringbuffer_t *buf, int *lookedAhead)
int parser_getNetTermFromBuf (ICLTerm **result, stringbuffer_t *buf)
int parser_setDebug (int b)
void handleDblQuotedData ()
 Binary data isn't handled well by pccts, so we do it ourselves.
ICLTermparser_getTermFromStringReal (char *str, size_t len, int debug)
void parser_errorWriter (const char *s)
void zzsynstd (char *text, int tok, char *egroup, SetWordType *eset, int etok, int k, char *bad_text)
void zzsyn (char *text, int tok, char *egroup, SetWordType *eset, int etok, int k, char *bad_text)
void printAst (AST *a)
void before (AST *a)
void after (AST *a)
int currentBuf_read ()
void traverse (AST *tree, void(*func)(AST *, void *), void(*pre)(AST *, void *), void(*post)(AST *, void *), void *data)
void parser_freeASTData (AST *a, void *dummy)
void parser_freeTree (AST *root)
int astToTerm (AST *root, ICLTerm **result, int debug)
AST * getASTFromString (char *str, size_t len, int debug)
void startOneOnly (AST **_root)
void startNet (AST **_root)
void netstruct (AST **_root)
void structure (AST **_root)
void semiExpression (AST **_root)
void backslashExpression (AST **_root)
void equalsExpression (AST **_root)
void colonExpression (AST **_root)
void plusMinusExpression (AST **_root)
void multiplicativeExpression (AST **_root)
void unaryExpression (AST **_root)
void normalStruct (AST **_root)
void nonEmptyExpressionList (AST **_root)
void expressionList (AST **_root)
void icldataqStruct (AST **_root)
void icldataqShortStruct (AST **_root)
void icldataqLongStruct (AST **_root)
void unaryExpressionNotPlusMinus (AST **_root)
void str (AST **_root)
void var (AST **_root)
void list (AST **_root)
void group (AST **_root)

Variables

GByteArray * parser_dblQuoteBuf
char * parser_tmpStrIn
int parser_dblQuoteLen
int parser_error
zzASTgvars ANTLR_INFO int zzSyntaxErrCount
void(*) zzerr (const char *)
int parser_error = FALSE
int parser_DEBUG = FALSE
int parser_dblQuoteLen
GByteArray * parser_dblQuoteBuf = NULL
char * parser_tmpStrIn = NULL


Detailed Description

Definition in file parser.c.


Define Documentation

#define ANTLR_VERSION   13333

Definition at line 13 of file parser.c.

#define AST_FIELDS   int isDefined; int type; char* tokenData; size_t tokenLen;

Definition at line 28 of file parser.c.

#define GENAST

Definition at line 135 of file parser.c.

#define LL_K   2

Definition at line 134 of file parser.c.

#define PCCTS_PURIFY ( r,
 )     memset((char *) &(r),'\0',(s));

Definition at line 148 of file parser.c.

#define USER_ZZSYN

Definition at line 32 of file parser.c.

#define ZZCOL

Definition at line 30 of file parser.c.

#define zzcr_ast ( ast,
attr,
ttype,
text   ) 

Definition at line 87 of file parser.c.

#define ZZLEXBUFSIZE   10485760

Definition at line 35 of file parser.c.

#define zzSET_SIZE   8

Definition at line 139 of file parser.c.


Enumeration Type Documentation

enum parser_state_vals

Enumerator:
parser_dblquote_CONTINUE 
parser_dblquote_FOUNDQUOTE 

Definition at line 166 of file parser.c.


Function Documentation

void after ( AST *  a  ) 

Definition at line 302 of file parser.c.

int astToTerm ( AST *  root,
ICLTerm **  result,
int  debug 
)

Definition at line 350 of file parser.c.

void backslashExpression ( AST **  _root  ) 

Definition at line 979 of file parser.c.

void before ( AST *  a  ) 

Definition at line 297 of file parser.c.

void colonExpression ( AST **  _root  ) 

Definition at line 1063 of file parser.c.

int currentBuf_read (  ) 

Definition at line 307 of file parser.c.

void equalsExpression ( AST **  _root  ) 

Definition at line 1021 of file parser.c.

void expressionList ( AST **  _root  ) 

Definition at line 1401 of file parser.c.

AST* getASTFromString ( char *  str,
size_t  len,
int  debug 
)

Definition at line 590 of file parser.c.

void group ( AST **  _root  ) 

Definition at line 1827 of file parser.c.

void handleDblQuotedData (  ) 

Binary data isn't handled well by pccts, so we do it ourselves.

This function relies on the fact that we use our own stringbuffer type to buffer intermediate data.

void icldataqLongStruct ( AST **  _root  ) 

Definition at line 1515 of file parser.c.

void icldataqShortStruct ( AST **  _root  ) 

Definition at line 1490 of file parser.c.

void icldataqStruct ( AST **  _root  ) 

Definition at line 1449 of file parser.c.

void list ( AST **  _root  ) 

Definition at line 1800 of file parser.c.

void multiplicativeExpression ( AST **  _root  ) 

Definition at line 1164 of file parser.c.

void netstruct ( AST **  _root  ) 

Definition at line 863 of file parser.c.

void nonEmptyExpressionList ( AST **  _root  ) 

Definition at line 1366 of file parser.c.

void normalStruct ( AST **  _root  ) 

Definition at line 1263 of file parser.c.

void parser_errorWriter ( const char *  s  ) 

Definition at line 243 of file parser.c.

void parser_freeASTData ( AST *  a,
void *  dummy 
)

Definition at line 335 of file parser.c.

void parser_freeTree ( AST *  root  ) 

Definition at line 346 of file parser.c.

int parser_getNetTermFromBuf ( ICLTerm **  result,
stringbuffer_t buf 
)

int parser_getTermFromBuf ( ICLTerm **  result,
stringbuffer_t buf,
int *  lookedAhead 
)

ICLTerm* parser_getTermFromString ( char *  str,
size_t  len 
)

ICLTerm* parser_getTermFromStringDebug ( char *  str,
size_t  len 
)

ICLTerm * parser_getTermFromStringReal ( char *  str,
size_t  len,
int  debug 
)

Definition at line 617 of file parser.c.

int parser_setDebug ( int  b  ) 

void plusMinusExpression ( AST **  _root  ) 

Definition at line 1114 of file parser.c.

void printAst ( AST *  a  ) 

Definition at line 287 of file parser.c.

void semiExpression ( AST **  _root  ) 

Definition at line 937 of file parser.c.

void startNet ( AST **  _root  ) 

Definition at line 825 of file parser.c.

void startOneOnly ( AST **  _root  ) 

Definition at line 787 of file parser.c.

void str ( AST **  _root  ) 

Definition at line 1648 of file parser.c.

void structure ( AST **  _root  ) 

Definition at line 894 of file parser.c.

void traverse ( AST *  tree,
void(*)(AST *, void *)  func,
void(*)(AST *, void *)  pre,
void(*)(AST *, void *)  post,
void *  data 
)

Definition at line 311 of file parser.c.

void unaryExpression ( AST **  _root  ) 

Definition at line 1215 of file parser.c.

void unaryExpressionNotPlusMinus ( AST **  _root  ) 

Definition at line 1574 of file parser.c.

void var ( AST **  _root  ) 

Definition at line 1775 of file parser.c.

void zzsyn ( char *  text,
int  tok,
char *  egroup,
SetWordType *  eset,
int  etok,
int  k,
char *  bad_text 
)

Definition at line 278 of file parser.c.

void zzsynstd ( char *  text,
int  tok,
char *  egroup,
SetWordType *  eset,
int  etok,
int  k,
char *  bad_text 
)

Definition at line 261 of file parser.c.


Variable Documentation

GByteArray* parser_dblQuoteBuf = NULL

Definition at line 162 of file parser.c.

GByteArray* parser_dblQuoteBuf

Definition at line 162 of file parser.c.

int parser_dblQuoteLen

Definition at line 161 of file parser.c.

int parser_dblQuoteLen

Definition at line 161 of file parser.c.

int parser_DEBUG = FALSE

Definition at line 160 of file parser.c.

int parser_error = FALSE

Definition at line 159 of file parser.c.

int parser_error

Definition at line 159 of file parser.c.

char* parser_tmpStrIn = NULL

Definition at line 163 of file parser.c.

char* parser_tmpStrIn

Definition at line 163 of file parser.c.

void(*) zzerr(const char *)

zzASTgvars ANTLR_INFO int zzSyntaxErrCount


Generated on Wed May 23 17:20:16 2007 using doxygen 1.5.2