From: Joshua Kwan Date: Sat, 31 Jan 2004 06:22:38 +0000 (+0000) Subject: C-comments are pretty superfluous, remove support for them X-Git-Tag: v1.6.1-roc-dev~502 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=8ef19f7eccb61f9ec7b4aa4ad3dafd39b9073a16;p=dgamelaunch C-comments are pretty superfluous, remove support for them git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@197 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/config.l b/config.l index 11146c4..83a6652 100644 --- a/config.l +++ b/config.l @@ -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; - } - } -}