diff options
author | Pierre Fenoll <[email protected]> | 2013-09-09 18:12:50 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-09-10 13:50:22 +0200 |
commit | 59c87f2df787beb5334c108da4c41e88245ad191 (patch) | |
tree | 164f604c817e29a5c148d4e0236146b14b0e43fb /lib/parsetools/src/leex.erl | |
parent | 8ee301f7d4a6e7b3254737e9e18250e266441ac6 (diff) | |
download | otp-59c87f2df787beb5334c108da4c41e88245ad191.tar.gz otp-59c87f2df787beb5334c108da4c41e88245ad191.tar.bz2 otp-59c87f2df787beb5334c108da4c41e88245ad191.zip |
Fix leex module`s inability to build unicode-aware lexers.
If you have declared your .xrl file as utf-8 encoded
and that some of your definitions contain unicode
characters, either leex wouldn`t be able to lex them
or compilation of the .xrl file would crash.
Diffstat (limited to 'lib/parsetools/src/leex.erl')
-rw-r--r-- | lib/parsetools/src/leex.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl index 7039aea1ae..4544b34a1e 100644 --- a/lib/parsetools/src/leex.erl +++ b/lib/parsetools/src/leex.erl @@ -436,7 +436,7 @@ parse_defs(_, {eof,L}, St) -> parse_defs(Ifile, {ok,Chars,L}=Line, Ms, St) -> %% This little beauty matches out a macro definition, RE's are so clear. MS = "^[ \t]*([A-Z_][A-Za-z0-9_]*)[ \t]*=[ \t]*([^ \t\r\n]*)[ \t\r\n]*\$", - case re:run(Chars, MS, [{capture,all_but_first,list}]) of + case re:run(Chars, MS, [{capture,all_but_first,list},unicode]) of {match,[Name,Def]} -> %%io:fwrite("~p = ~p\n", [Name,Def]), parse_defs(Ifile, nextline(Ifile, L, St), [{Name,Def}|Ms], St); |