You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to port the FStar lexer from Ulex to Sedlex (see FStarLang/FStar#2203) and the ppx hangs when trying to compile a rule that uses this token:
let op_token = [%sedlex.regexp?
"~"|"-"|"/\\"|"\\/"|"<:"|"<@"|"(|"|"|)"|"#"|"u#"|"&"|"()"|"("|")"|","|"~>"|"->"|"<--"|"<-"|"<==>"|"==>"|"."|"?."|"?"|".[|"|".["|".(|"|".("|"$"|"{:pattern"|":"|"::"|":="|";;"|";"|"="|"%["|"!{"|"[@@"|"[@"|"[|"|"{|"|"["|"|>"|"]"|"|]"|"|}"|"{"|"|"|"}"]
Surprisingly, splitting this token into 5 smaller parts and matching it as op_token_1 | ... | op_token_5 in the lexer rule compiles fine.
I managed to reproduce the issue with the following file:
Hi,
I've been trying to port the FStar lexer from Ulex to Sedlex (see FStarLang/FStar#2203) and the ppx hangs when trying to compile a rule that uses this token:
Surprisingly, splitting this token into 5 smaller parts and matching it as
op_token_1 | ... | op_token_5
in the lexer rule compiles fine.I managed to reproduce the issue with the following file:
I recorded some data from running
time dune build
that shows build time doubling for every string added:While the ppx is running, my CPU temperature goes up, so it's definitely doing something, but I'm not sure what that is.
Is this expected behavior?
The text was updated successfully, but these errors were encountered: