Major reworking
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@252 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
32c8fdf0c5
commit
8957904f03
4 changed files with 355 additions and 1334 deletions
|
|
@ -12,8 +12,8 @@ YACC = @YACC@
|
||||||
|
|
||||||
INCLUDE = -I. -I../Swig -I../DOH/Include -I../Preprocessor
|
INCLUDE = -I. -I../Swig -I../DOH/Include -I../Preprocessor
|
||||||
|
|
||||||
SRCS = cscanner.c type.c
|
SRCS = cscanner.c
|
||||||
OBJS = parser.o cscanner.o type.o
|
OBJS = parser.o cscanner.o
|
||||||
TARGET = liblparse.a
|
TARGET = liblparse.a
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ yylex1(void) {
|
||||||
if (strcmp(yytext,"public") == 0) return(PUBLIC);
|
if (strcmp(yytext,"public") == 0) return(PUBLIC);
|
||||||
if (strcmp(yytext,"protected") == 0) return(PROTECTED);
|
if (strcmp(yytext,"protected") == 0) return(PROTECTED);
|
||||||
if (strcmp(yytext,"friend") == 0) return(FRIEND);
|
if (strcmp(yytext,"friend") == 0) return(FRIEND);
|
||||||
if (strcmp(yytext,"virtual") == 0) return(VIRTUAL);
|
if (strcmp(yytext,"virtual") == 0) return(lparse_yylex());
|
||||||
if (strcmp(yytext,"operator") == 0) return(OPERATOR);
|
if (strcmp(yytext,"operator") == 0) return(OPERATOR);
|
||||||
if (strcmp(yytext,"throw") == 0) return(THROW);
|
if (strcmp(yytext,"throw") == 0) return(THROW);
|
||||||
if (strcmp(yytext,"inline") == 0) return(lparse_yylex());
|
if (strcmp(yytext,"inline") == 0) return(lparse_yylex());
|
||||||
|
|
@ -431,9 +431,9 @@ yylex1(void) {
|
||||||
/* Have an unknown identifier, as a last step, we'll */
|
/* Have an unknown identifier, as a last step, we'll */
|
||||||
/* do a typedef lookup on it. */
|
/* do a typedef lookup on it. */
|
||||||
yylval.tok.text = NewString(yytext);
|
yylval.tok.text = NewString(yytext);
|
||||||
if (strict_type && LParse_typedef_check(yylval.tok.text)) {
|
/* if (strict_type && LParse_typedef_check(yylval.tok.text)) {
|
||||||
return TYPE_TYPEDEF;
|
return TYPE_TYPEDEF;
|
||||||
}
|
}*/
|
||||||
return(ID);
|
return(ID);
|
||||||
}
|
}
|
||||||
return(l1);
|
return(l1);
|
||||||
|
|
|
||||||
|
|
@ -54,35 +54,6 @@ extern int LParse_objc(int i);
|
||||||
#define LPARSE_T_SYMBOL 98
|
#define LPARSE_T_SYMBOL 98
|
||||||
#define LPARSE_T_ERROR 99
|
#define LPARSE_T_ERROR 99
|
||||||
|
|
||||||
/* This is the semi-bogus type structure from SWIG1.1. It will be replaced someday */
|
|
||||||
|
|
||||||
#define LPARSE_MAX_NAME 96
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
DOHXCOMMON;
|
|
||||||
int type;
|
|
||||||
char *name;
|
|
||||||
char is_pointer;
|
|
||||||
char implicit_ptr;
|
|
||||||
char is_reference;
|
|
||||||
char status;
|
|
||||||
char *qualifier;
|
|
||||||
char *arraystr;
|
|
||||||
} LParseType;
|
|
||||||
|
|
||||||
extern LParseType *NewLParseType(int t);
|
|
||||||
extern void DelLParseType(DOH *t);
|
|
||||||
extern DOH *CopyLParseType(DOH *t);
|
|
||||||
extern int LParseType_check(DOH *t);
|
|
||||||
extern void LParse_typedef_add(LParseType *t, DOH *tname);
|
|
||||||
extern void LParse_typedef_resolve(LParseType *t, int level);
|
|
||||||
extern void LParse_typedef_replace(LParseType *t);
|
|
||||||
extern int LParse_typedef_check(DOH *tname);
|
|
||||||
extern void LParse_typedef_updatestatus(LParseType *t, int newstatus);
|
|
||||||
extern void LParse_merge_scope(DOH *h);
|
|
||||||
extern void LParse_new_scope(DOH *);
|
|
||||||
extern DOH *LParse_collapse_scope(DOH *prefix);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue