MCPcopy Create free account
hub / github.com/boostorg/build / parse_file

Function parse_file

v2/engine/parse.c:33–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31static PARSE * yypsave;
32
33void parse_file( OBJECT * f, FRAME * frame )
34{
35 /* Suspend scan of current file and push this new file in the stream. */
36 yyfparse( f );
37
38 /* Now parse each block of rules and execute it. Execute it outside of the
39 * parser so that recursive calls to yyrun() work (no recursive yyparse's).
40 */
41
42 for ( ; ; )
43 {
44 PARSE * p;
45 FUNCTION * func;
46
47 /* Filled by yyparse() calling parse_save(). */
48 yypsave = 0;
49
50 /* If parse error or empty parse, outta here. */
51 if ( yyparse() || !( p = yypsave ) )
52 break;
53
54 /* Run the parse tree. */
55 func = function_compile( p );
56 parse_free( p );
57 list_free( function_run( func, frame, stack_global() ) );
58 function_free( func );
59 }
60}
61
62
63void parse_save( PARSE * p )

Callers 2

function_runFunction · 0.85
mainFunction · 0.85

Calls 7

yyfparseFunction · 0.85
function_compileFunction · 0.85
parse_freeFunction · 0.85
list_freeFunction · 0.85
function_runFunction · 0.85
stack_globalFunction · 0.85
function_freeFunction · 0.85

Tested by

no test coverage detected