1 : //==============================================================================
2 : // File <$/src/cpp/dev/idlc/compiler.cpp>
3 : // This file is part of YaOrb : Yet Another Object Request Broker,
4 : // Copyright (c) 2000-2003, Marc Alff.
5 : //
6 : // This program is free software; you can redistribute it and/or
7 : // modify it under the terms of the GNU General Public License
8 : // as published by the Free Software Foundation; either version 2
9 : // of the License, or (at your option) any later version.
10 : //
11 : // This program is distributed in the hope that it will be useful,
12 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 : // GNU General Public License for more details.
15 : //
16 : // You should have received a copy of the GNU General Public License
17 : // along with this program; if not, write to the Free Software
18 : // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 : //
20 : //==============================================================================
21 :
22 : #include "src/cpp/prod/tool/Assert.h"
23 : #include "src/cpp/prod/tool/String.h"
24 :
25 : #include "src/cpp/dev/idlc/sym_tab.h"
26 : #include "src/cpp/dev/idlc/yyutils.h"
27 :
28 : SymbolTable * CompileIDL(const String& idlFileName,
29 : const StringList& includeDirs,
30 : int & nbError,
31 : int & nbWarning,
32 48 : bool echoStdout)
33 : {
34 48 : SymbolTable *result = new SymbolTable() ;
35 :
36 48 : g_symTabPtr = result ;
37 :
38 48 : LexInit(idlFileName, includeDirs, echoStdout) ;
39 48 : yyparse() ;
40 :
41 48 : nbError = g_nbIDLError ;
42 48 : nbWarning = g_nbIDLWarning ;
43 :
44 48 : g_symTabPtr = NULL ;
45 :
46 48 : LexExit() ;
47 :
48 : return result ;
49 48 : }
50 48 :
|