9 ID [a-zA-Z_][a-zA-Z_\.\-0-9]*
22 str_buf_ptr = str_buf;
29 if (yytext[0] == str_char) {
32 yylval.string = g_strdup(str_buf);
35 *str_buf_ptr++ = yytext[0];
39 /* can't have newlines in strings */
41 printf("Error: Unterminated string constant.\n");
45 /* handle \" and \' */
47 if (yytext[1] == str_char)
48 *str_buf_ptr++ = yytext[1];
50 *str_buf_ptr++ = yytext[0];
51 *str_buf_ptr++ = yytext[1];
55 /* eat valid string contents */
59 *str_buf_ptr++ = *yptr++;
65 yylval.num = atof(yytext);
71 yylval.num = atof(yytext);
75 /* identifiers -- names without spaces and other crap in them */
77 yylval.string = g_strdup(yytext);
83 /* skip other whitespace */
85 . { return yytext[0]; }