added more tokens and libc headers

svn path=/trunk/; revision=6646
This commit is contained in:
Royce Mitchell III 2003-11-14 19:51:59 +00:00
parent 1c3867a641
commit 99d650fdb4
2 changed files with 54 additions and 1 deletions

View file

@ -60,8 +60,10 @@ const char* libc_includes[] =
"except.h",
"limits.h",
"stdarg.h",
"stddef.h",
"stdlib.h",
"string.h"
"string.h",
"types.h"
};
bool is_libc_include ( const string& inc )

View file

@ -165,6 +165,57 @@ void tokenize ( const string& text, vector<string>& tokens )
break;
}
break;
case '<':
switch ( p[1] )
{
case '<':
if ( p[2] == '=' )
tokens.push_back ( string ( p, 3 ) ), p += 3;
else
tokens.push_back ( string ( p, 2 ) ), p += 2;
break;
case '=':
tokens.push_back ( string ( p, 2 ) );
p += 2;
break;
default:
tokens.push_back ( "<" );
p++;
break;
}
break;
case '>':
switch ( p[1] )
{
case '>':
if ( p[2] == '=' )
tokens.push_back ( string ( p, 3 ) ), p += 3;
else
tokens.push_back ( string ( p, 2 ) ), p += 2;
break;
case '=':
tokens.push_back ( string ( p, 2 ) );
p += 2;
break;
default:
tokens.push_back ( ">" );
p++;
break;
}
break;
case '!':
switch ( p[1] )
{
case '=':
tokens.push_back ( string ( p, 2 ) );
p += 2;
break;
default:
tokens.push_back ( "!" );
p++;
break;
}
break;
case '=':
switch ( p[1] )
{