summaryrefslogtreecommitdiff
path: root/lib/parsetools
diff options
context:
space:
mode:
authorPierre Fenoll <pierrefenoll@gmail.com>2013-09-09 18:12:50 +0100
committerFredrik Gustafsson <fredrik@erlang.org>2013-09-10 13:50:22 +0200
commit59c87f2df787beb5334c108da4c41e88245ad191 (patch)
tree164f604c817e29a5c148d4e0236146b14b0e43fb /lib/parsetools
parent8ee301f7d4a6e7b3254737e9e18250e266441ac6 (diff)
downloaderlang-59c87f2df787beb5334c108da4c41e88245ad191.tar.gz
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')
-rw-r--r--lib/parsetools/src/leex.erl2
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);