A bunch of cleanup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@126 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6eb92d5348
commit
ba0f57158f
10 changed files with 839 additions and 536 deletions
|
|
@ -83,6 +83,8 @@ static int remap[SWIG_MAXTOKENS];
|
|||
static int cscan_init = 0;
|
||||
static int cplusplus_mode = 0;
|
||||
static int objc_mode = 0;
|
||||
static int strict_type = 1;
|
||||
|
||||
static SwigScanner *cscanner = 0;
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
@ -125,6 +127,10 @@ void LParse_set_location(DOH *file, int line) {
|
|||
SwigScanner_set_location(cscanner,file,line);
|
||||
}
|
||||
|
||||
void LParse_strict_type(int i) {
|
||||
strict_type = i;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* LParse_cplusplus(int i) - Enable C++ scanning
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
|
@ -371,7 +377,7 @@ yylex1(void) {
|
|||
/* Have an unknown identifier, as a last step, we'll */
|
||||
/* do a typedef lookup on it. */
|
||||
yylval.tok.text = NewString(yytext);
|
||||
if (LParse_typedef_check(yylval.tok.text)) {
|
||||
if (strict_type && LParse_typedef_check(yylval.tok.text)) {
|
||||
return TYPE_TYPEDEF;
|
||||
}
|
||||
return(ID);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#define yynerrs lparse_yynerrs
|
||||
|
||||
extern int lparse_yylex();
|
||||
extern void LParse_strict_type(int);
|
||||
|
||||
void yyerror (char *s);
|
||||
|
||||
#include "lparse.h"
|
||||
|
|
|
|||
|
|
@ -150,7 +150,6 @@ LParseTypeStr(DOH *to) {
|
|||
int i;
|
||||
LParseType *t = (LParseType *) to;
|
||||
s = NewString("");
|
||||
Printf(s,"(%d) - ", t->type);
|
||||
if (t->qualifier)
|
||||
Printf(s,"%s ",t->qualifier);
|
||||
Printf(s,"%s ",t->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue