Skip to content
Permalink
Browse files
A couple endline fixes in the lexer.
  • Loading branch information
icculus committed Feb 13, 2009
1 parent 5c14fc6 commit 340a5220118654fc0daa2f5dbd875c460776cc7d
Showing with 3 additions and 3 deletions.
  1. +3 −3 mojoshader_lexer.re
@@ -62,7 +62,7 @@ scanner_loop:
IS = [uUlL]*;
ESC = [\\] ([abfnrtv?'"\\] | "x" H+ | O+);
PP = "#" [ \t]*;
NEWLINE = "\r\n" | "\r" | "\n";
NEWLINE = ("\r\n" | "\r" | "\n");
WHITESPACE = [ \t\v\f]+;
*/

@@ -73,13 +73,13 @@ scanner_loop:
L (L|D)* { RET(TOKEN_IDENTIFIER); }
("0" [xX] H+ IS?) | ("0" D+ IS?) | (D+ IS?) |
(['] (ESC|any\[\n\\'])* ['])
(['] (ESC|any\[\r\n\\'])* ['])
{ RET(TOKEN_INT_LITERAL); }
(D+ E FS?) | (D* "." D+ E? FS?) | (D+ "." D* E? FS?)
{ RET(TOKEN_FLOAT_LITERAL); }
(["] (ESC|any\[\n\\"])* ["])
(["] (ESC|any\[\r\n\\"])* ["])
{ RET(TOKEN_STRING_LITERAL); }
">>=" { RET(TOKEN_RSHIFTASSIGN); }

0 comments on commit 340a522

Please sign in to comment.