C-comments are pretty superfluous, remove support for them

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@197 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-01-31 06:22:38 +00:00
parent 8bdb57a194
commit 8ef19f7ecc
1 changed files with 0 additions and 42 deletions

View File

@ -11,8 +11,6 @@
unsigned int line = 1, col = 0;
unsigned int comment_begin_line, comment_begin_col;
static void ccomment(void);
#define YY_USER_ACTION col += yyleng;
%}
@ -22,7 +20,6 @@ VALUE \".*\"
MALSTRING \"[^\"\n]*\n
WHITE [\t ]*
COMMENT ^#.*
LONGCOMMENT "/*"
%%
@ -40,11 +37,6 @@ LONGCOMMENT "/*"
{WHITE} { }
{COMMENT} { }
{LONGCOMMENT} {
comment_begin_line = line;
comment_begin_col = col - 1;
ccomment();
}
"=" { return '='; }
"shed_user" { return TYPE_SUSER; }
@ -69,37 +61,3 @@ LONGCOMMENT "/*"
}
%%
/* Ripped from ircd-hybrid/src/ircd_lexer.l */
void ccomment(void)
{
int c;
while (1)
{
while ((c = input()) != '*' && c != EOF)
{
if (c == '\n')
{
col = 0;
++line;
}
else
++col;
}
if (c == '*')
{
++col;
while ((c = input()) == '*') ++col;
if (c == '/') { ++col; break; }
}
if (c == EOF)
{
fprintf(stderr, "%s: encountered end-of-file in comment starting on line %d, column %d\n", config, col, comment_begin_col);
exit(1);
break;
}
}
}