if (!eof)
return -1;
goto number;
- };
+ }
if (input[ofs] == '.')
{
+ if (ofs + 1 >= n)
+ {
+ if (!eof)
+ return -1;
+ goto number;
+ }
+
ofs = skip_digits (input, n, eof, ofs + 1);
if (ofs < 0)
return -1;
+ else if (ofs >= n)
+ goto number;
}
- if (ofs >= n)
- {
- if (!eof)
- return -1;
- goto number;
- }
if (input[ofs] == 'e' || input[ofs] == 'E')
{
ofs++;
}
/* fall through */
+ case SEG_MACRO_ID:
case SEG_NUMBER:
case SEG_QUOTED_STRING:
case SEG_HEX_STRING:
ofs--;
}
- if (is_reserved_word (input, ofs))
- *type = SEG_RESERVED_WORD;
- else
- *type = SEG_IDENTIFIER;
+ *type = (is_reserved_word (input, ofs) ? SEG_RESERVED_WORD
+ : input[0] == '!' ? SEG_MACRO_ID
+ : SEG_IDENTIFIER);
if (s->substate & SS_START_OF_COMMAND)
{
return segmenter_parse_string__ (SEG_QUOTED_STRING, 0,
s, input, n, eof, type);
+ case '!':
+ return segmenter_parse_id__ (s, input, n, eof, type);
+
default:
if (lex_uc_is_space (uc))
{