Changeset 271 for trunk/idl-compiler/c/nom-idl-compiler.c
- Timestamp:
- Mar 25, 2007, 8:32:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/c/nom-idl-compiler.c
r269 r271 109 109 110 110 GScanner *gScanner; 111 GTokenType curToken=G_TOKEN_EOF;112 PINTERFACE pCurInterface=NULL;113 111 114 112 /* Holding info about current token. Referenced by gScanner. */ 115 SYMBOLINFO curSymbol;113 //SYMBOLINFO curSymbol; 116 114 117 115 /* Holding the current state of parsing and pointers to necessary lists. */ 118 116 PARSEINFO parseInfo={0}; 117 PPARSEINFO pParseInfo=&parseInfo; 119 118 120 119 /** … … 151 150 value=gScanner->value; 152 151 153 switch( curToken)152 switch(gScanner->token) 154 153 { 155 154 case G_TOKEN_IDENTIFIER: … … 395 394 GTokenType token; 396 395 397 curToken=g_scanner_get_next_token(gScanner);398 token= curToken;396 g_scanner_get_next_token(gScanner); 397 token=gScanner->token; 399 398 GTokenValue value=gScanner->value; 400 399 401 switch( curToken)400 switch(token) 402 401 { 403 402 case '#': … … 465 464 #endif 466 465 default: 467 printToken( curToken);466 printToken(token); 468 467 break; 469 468 } … … 535 534 /* Vars for filename building */ 536 535 char* chrOutputFileName=""; 536 char* chrTemp; 537 537 538 538 GError *gError = NULL; … … 557 557 a++; 558 558 559 #if 0560 559 if(!a){ 561 560 g_printf("An emitter must be specified.\n\n"); … … 566 565 outputCompilerHelp(gContext, argv[0]); 567 566 } 568 #endif569 567 570 568 if(strlen(chrOutputName)==0) … … 602 600 chrOutputFileName=chrOutputName; 603 601 604 //g_message("Output file: %s", chrOutputFileName); 602 /* Add emitter extension */ 603 if(fOptionEmitH) 604 chrTemp=g_strconcat(chrOutputFileName, ".h", NULL); 605 else if(fOptionEmitIH) 606 chrTemp=g_strconcat(chrOutputFileName, ".ih", NULL); 607 else if(fOptionEmitC) 608 chrTemp=g_strconcat(chrOutputFileName, ".c", NULL); 609 g_free(chrOutputFileName); 610 chrOutputFileName=chrTemp; 611 612 g_message("Output file: %s", chrOutputFileName); 605 613 606 614 /* Open input */ … … 622 630 623 631 gScanner=g_scanner_new(NULL); 624 gScanner->user_data=(gpointer)&curSymbol; 625 curSymbol.pSymbols=idlSymbols; 632 //gScanner->user_data=(gpointer)&curSymbol; 626 633 627 634 gScanner->msg_handler=funcMsgHandler; … … 650 657 parseIt(); 651 658 659 /* Write the output file */ 660 if(fOptionEmitH) 661 emitHFile(pInterfaceArray); 662 663 #if 0 664 else if(fOptionEmitIH) 665 666 else if(fOptionEmitC) 667 a++; 668 652 669 if(pInterfaceArray->len) 653 670 printInterface(); 671 #endif 654 672 655 673 g_scanner_destroy(gScanner);
Note:
See TracChangeset
for help on using the changeset viewer.