Changeset 264 for trunk/idl-compiler
- Timestamp:
- Mar 24, 2007, 7:17:11 PM (18 years ago)
- Location:
- trunk/idl-compiler
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/Makefile
r260 r264 32 32 $(OBJDIR)/classversion_parser.o \ 33 33 $(OBJDIR)/override_parser.o \ 34 $(OBJDIR)/hash_parser.o \ 35 $(OBJDIR)/lineinfo_parser.o \ 34 36 $(OBJDIR)/printdata.o 35 37 -
trunk/idl-compiler/c/nom-idl-compiler.c
r263 r264 162 162 parseInterface(token); 163 163 break; 164 case '#': 165 parseHash(); 166 break; 164 167 165 168 #if 0 … … 181 184 case ';': 182 185 g_message("Token: %d (semicolon)\t\t\t;", token); 183 break;184 case '#':185 g_message("Token: %d (hash)\t\t\t#", token);186 186 break; 187 187 case '/': … … 315 315 parseIt(); 316 316 317 if(pInterfaceArray->len)318 printInterface();317 //if(pInterfaceArray->len) 318 // printInterface(); 319 319 320 320 g_scanner_destroy(gScanner); -
trunk/idl-compiler/c/token.c
r259 r264 159 159 { 160 160 case IDL_SYMBOL_INTERFACE: 161 g_message("Token: %d (IDL_SYMBOL_INTERFACE)\t Parsing...", token);161 g_message("Token: %d (IDL_SYMBOL_INTERFACE)\t\t\t (LINE %d)", token, g_scanner_cur_line(gScanner)); 162 162 break; 163 163 case G_TOKEN_IDENTIFIER: 164 g_message("Token: %d (G_TOKEN_IDENTIFIER)\t\t%s", token, value.v_identifier); 164 g_message("Token: %d (G_TOKEN_IDENTIFIER)\t\t%s (LINE %d)", 165 token, value.v_identifier, g_scanner_cur_line(gScanner)); 165 166 break; 166 167 case G_TOKEN_STRING: … … 168 169 break; 169 170 case G_TOKEN_LEFT_PAREN: 170 g_message("Token: %d (G_TOKEN_LEFT_PAREN)\t\t (", token);171 g_message("Token: %d (G_TOKEN_LEFT_PAREN)\t\t\t( (LINE %d)", token, g_scanner_cur_line(gScanner)); 171 172 break; 172 173 case G_TOKEN_RIGHT_PAREN: 173 g_message("Token: %d (G_TOKEN_RIGHT_PAREN)\t\t)", token); 174 g_message("Token: %d (G_TOKEN_RIGHT_PAREN)\t\t\t) (LINE %d)", token, g_scanner_cur_line(gScanner)); 175 break; 176 case G_TOKEN_LEFT_CURLY: 177 g_message("Token: %d (G_TOKEN_LEFT_CURLY)\t\t\t{ (LINE %d)", token, g_scanner_cur_line(gScanner)); 178 break; 179 case G_TOKEN_RIGHT_CURLY: 180 g_message("Token: %d (G_TOKEN_RIGHT_CURLY)\t\t\t} (LINE %d)", token, g_scanner_cur_line(gScanner)); 174 181 break; 175 182 case ':': … … 201 208 break; 202 209 default: 203 g_message("Token: %d (---)\t\t\t (LINE %d)", token, g_scanner_cur_line(gScanner)); 204 break; 205 } 206 } 210 { 211 PSYMBOLINFO psi; 212 psi=(PSYMBOLINFO)gScanner->user_data; 213 214 if(token>G_TOKEN_LAST) 215 g_message("Token: %d (%s)\t\t\t (LINE %d)", token, 216 psi->pSymbols[token-G_TOKEN_LAST-1].chrSymbolName, g_scanner_cur_line(gScanner)); 217 else 218 g_message("Token: %d (---)\t\t\t (LINE %d)", token, g_scanner_cur_line(gScanner)); 219 break; 220 } /* default */ 221 } /* switch */ 222 } -
trunk/idl-compiler/include/parser.h
r261 r264 51 51 { 52 52 gchar* chrName; /* Name of this instance variable */ 53 gchar* chrIntroducingIFace; 53 54 }OVERMETHOD, *POVERMETHOD; 54 55 … … 100 101 const SYMBOL *pSymbols; /* List of our introduced symbols */ 101 102 guint uiCurSymbolKind; 103 guint uiLineCorrection; /* This is the line number put by the preprocessor into 104 the source file. It's used to calculate proper line numbers 105 for errors. */ 106 char* chrCurrentSourceFile;/* The preprocessor includes files for us. This is the info 107 about their name. */ 102 108 }SYMBOLINFO,*PSYMBOLINFO; 103 109 … … 145 151 void parseClassVersion(void); 146 152 void parseOverrideMethod(void); 153 void parseHash(void); 154 void parsePreprocLineInfo(void); 147 155 148 -
trunk/idl-compiler/parser_c/interface_parser.c
r261 r264 37 37 38 38 #include <glib.h> 39 #include <glib/gprintf.h> 39 40 #include "parser.h" 40 41 … … 71 72 72 73 do{ 73 //g_printf("%d: ", __LINE__);74 //printToken(curToken);74 g_printf("%d: ", __LINE__); 75 printToken(curToken); 75 76 if(matchNext(IDL_SYMBOL_CLSVERSION)) 76 77 parseClassVersion(); … … 85 86 else 86 87 { 87 //g_message("Line %d Error in'interface' deklaration %d", g_scanner_cur_line(gScanner),88 // g_scanner_peek_next_token(gScanner));89 //g_printf("%d: ", __LINE__);90 //printToken(curToken);91 /* Unknown token, skip it. */92 88 getNextToken(); 93 //exit(1); 89 g_scanner_unexp_token(gScanner, 90 G_TOKEN_IDENTIFIER, 91 NULL, 92 NULL, 93 NULL, 94 "Trying to parse interface body.", 95 TRUE); /* is_error */ 96 exit(1); 94 97 } 95 98 }while(g_scanner_peek_next_token(gScanner)!='}'); -
trunk/idl-compiler/parser_c/method_parser.c
r263 r264 36 36 37 37 #include <glib.h> 38 #include <glib/gprintf.h> 38 39 #include "parser.h" 39 40 … … 150 151 PMETHOD pMethod=createMethodStruct(); 151 152 PINTERFACE pif; 152 //g_printf("%d: ", __LINE__);153 //printToken(curToken);153 g_printf("%s %d: ", __FUNCTION__, __LINE__); 154 printToken(curToken); 154 155 155 156 /* Do type spec */ -
trunk/idl-compiler/parser_c/override_parser.c
r262 r264 73 73 GTokenValue value; 74 74 POVERMETHOD pOMethod=g_malloc0(sizeof(OVERMETHOD)); 75 PINTERFACE pif; 75 76 76 77 if(!matchNext('(')) … … 103 104 104 105 /* Now check if the method was introduced by some parent */ 105 if( !findInterfaceForMethod(pCurInterface, pOMethod->chrName))106 if((pif=findInterfaceForMethod(pCurInterface, pOMethod->chrName))==NULL) 106 107 { 108 107 109 g_message("%s:%d: Method '%s' was not introduced by some parent interface.", gScanner->input_name, 108 110 g_scanner_cur_line(gScanner), pOMethod->chrName); 109 111 exit(1); 110 112 } 113 pOMethod->chrIntroducingIFace=pif->chrName; /* No copy of string here. Nobody should free the 114 interface info under our feet. */ 111 115 112 116 if(!matchNext(')'))
Note:
See TracChangeset
for help on using the changeset viewer.