Skip to content
Snippets Groups Projects
Commit ea3538e3 authored by Per Hedbor's avatar Per Hedbor
Browse files

Added support for the tokens '..' and '@'. Also added support for $ and...

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
parent 5fe432f4
No related branches found
No related tags found
No related merge requests found
......@@ -30,14 +30,17 @@ 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 '$': // 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 '>':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment