comparison src/lex.l @ 2066:a75d2a5d6783

[project @ 1996-04-11 21:20:43 by jwe]
author jwe
date Thu, 11 Apr 1996 21:20:43 +0000
parents 31f4f775b8c6
children 5df627b1c5c5
comparison
equal deleted inserted replaced
2065:fdad1594039e 2066:a75d2a5d6783
569 lexer_flags.convert_spaces_to_comma = nesting_level.is_brace (); 569 lexer_flags.convert_spaces_to_comma = nesting_level.is_brace ();
570 do_comma_insert_check (); 570 do_comma_insert_check ();
571 return ')'; 571 return ')';
572 } 572 }
573 573
574 %{ 574 "." {
575 // We return everything else as single character tokens, which should 575 TOK_RETURN ('.');
576 // eventually result in a parse error. 576 }
577
578 %{
579 // Unrecognized input is a lexical error.
577 %} 580 %}
578 581
579 . { 582 . {
580 error ("invalid character `%s' on input", undo_string_escape (yytext[0])); 583 current_input_column++;
581 TOK_RETURN (yytext[0]); 584
582 } 585 error ("invalid character `%s' near line %d, column %d",
586 undo_string_escape (yytext[0]), input_line_number,
587 current_input_column);
588
589 return LEXICAL_ERROR;
590 }
583 591
584 %% 592 %%
585 593
586 // GAG. 594 // GAG.
587 // 595 //