Annotation of parser3/src/main/compile.C, revision 1.1
1.1 ! paf 1: /*
! 2: $Id: core.C,v 1.20 2001/02/20 12:18:28 paf Exp $
! 3: */
! 4:
! 5: #include "pa_array.h"
! 6: #include "code.h"
! 7: #include "compile_tools.h"
! 8: #include "compile.h"
! 9:
! 10: #include <stdio.h>
! 11:
! 12: extern int yydebug;
! 13: extern int yyparse (void *);
! 14:
! 15: Array *real_compile(COMPILE_PARAMS) {
! 16: yydebug=1;
! 17: struct parse_control pc;
! 18: /* input */
! 19: pc.pool=pool;
! 20: pc.source=source;
! 21: #ifndef NO_STRING_ORIGIN
! 22: pc.file=file;
! 23: pc.line=1;
! 24: #endif
! 25: /* state to initial */
! 26: pc.pending_state=0;
! 27: pc.string=string_create(pool);
! 28: pc.ls=LS_USER;
! 29: pc.sp=0;
! 30: /* parse! */
! 31: printf("[yyparse returned %d]", yyparse(&pc));
! 32: /* result */
! 33: return static_cast<Array *>(pc.result);
! 34: }
E-mail: