Annotation of parser3/src/main/compile.C, revision 1.5

1.1       paf         1: /*
1.5     ! paf         2:   $Id: compile.C,v 1.4 2001/02/21 06:59:43 paf Exp $
1.1       paf         3: */
                      4: 
1.3       paf         5: #include "pa_string.h"
1.1       paf         6: #include "pa_array.h"
                      7: #include "code.h"
                      8: #include "compile_tools.h"
                      9: #include "compile.h"
1.4       paf        10: #include "pa_exception.h"
1.1       paf        11: 
                     12: #include <stdio.h>
                     13: 
                     14: extern int yydebug;
                     15: extern int yyparse (void *);
                     16: 
                     17: Array *real_compile(COMPILE_PARAMS) {
1.2       paf        18:        if(!source)
                     19:                return 0;
                     20: 
1.4       paf        21:        Pool& pool=request.pool();
                     22: 
1.5     ! paf        23:        yydebug=1;
1.1       paf        24:        struct parse_control pc;
                     25:        /* input */
1.4       paf        26:        pc.pool=&pool;
                     27:        pc.exception=&request.exception();
1.1       paf        28:        pc.source=source;
                     29: #ifndef NO_STRING_ORIGIN
                     30:        pc.file=file;
1.4       paf        31:        pc.line=pc.col=1;
1.1       paf        32: #endif
                     33:        /* state to initial */
                     34:        pc.pending_state=0;
1.4       paf        35:        pc.string=new(pool) String(pool);
1.1       paf        36:        pc.ls=LS_USER;
                     37:        pc.sp=0;
                     38:        /* parse! */
1.4       paf        39:        yyparse(&pc);
                     40:        
1.1       paf        41:        /* result */
1.4       paf        42:        return pc.result;
1.1       paf        43: }

E-mail: