From ea3538e30b2fcd67d29fa967e689cfe4bd5e791d Mon Sep 17 00:00:00 2001 From: Per Hedbor <ph@opera.com> Date: Wed, 9 Aug 2000 05:04:40 +0200 Subject: [PATCH] Added support for the tokens '..' and '@'. Also added support for $ and 127... in identifiers ($ for C on DEC, and 127-> for pike and java, but it really should test isprint(c)) Rev: lib/modules/Parser.pmod/C.pmod:1.14 --- lib/modules/Parser.pmod/C.pmod | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/modules/Parser.pmod/C.pmod b/lib/modules/Parser.pmod/C.pmod index 251839ab07..5150b3869d 100644 --- a/lib/modules/Parser.pmod/C.pmod +++ b/lib/modules/Parser.pmod/C.pmod @@ -30,15 +30,18 @@ array(string) split(string data) case 'a'..'z': case 'A'..'Z': + case 128..65536: // Lets simplify things for now... case '_': while(1) { switch(data[pos]) { - case 'a'..'z': - case 'A'..'Z': - case '0'..'9': - case '_': + case '$': // allowed in some C (notably digital) + case 'a'..'z': + case 'A'..'Z': + case '0'..'9': + case 128..65536: // Lets simplify things for now... + case '_': pos++; continue; } @@ -52,6 +55,11 @@ array(string) split(string data) pos+=3; break; } + if(data[start..start+1]=="..") + { + pos+=3; + break; + } case '0'..'9': if(data[pos]=='0' && (data[pos+1]=='x' || data[pos+1]=='X')) @@ -105,6 +113,7 @@ array(string) split(string data) case '&': case '|': case '^': case '!': case '~': case '=': + case '@': case '+': case '-': case '<': case '>': -- GitLab