Skip to content

Commit

Permalink
tokenize/1 removed debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSLoburev committed Jan 3, 2024
1 parent 496429d commit e0a7941
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ handle_token(Token, Stack, Position) ->
tokenize(Expression) ->
Tokens = re:split(Expression, "\\s+"),
FilteredTokens = lists:filter(fun(X) -> (X =/= "") and not(lists:member(X, "\s\t\n")) end, Tokens),
io:fwrite("~p~n", [FilteredTokens]),
Positions = lists:flatmap(fun(Token) ->
case re:run(Expression, utils:re_escape(Token), [global]) of
nomatch -> [];
{match, Captured} ->
io:fwrite("~p:~p~n", [utils:re_escape(Token), Captured]),
lists:map(fun({Index, _Length}) -> {Token, Index + 1} end, lists:flatten(Captured))
{match, Captured} -> lists:map(fun({Index, _Length}) -> {Token, Index + 1} end, lists:flatten(Captured))
end
end, FilteredTokens),
Positions.
Expand Down

0 comments on commit e0a7941

Please sign in to comment.