Skip to content

Instantly share code, notes, and snippets.

@lascar-pacagi
Created January 8, 2020 09:49
Embed
What would you like to do?
rule clean = parse
| '\t'
{
print_string " ";
clean lexbuf
}
| (' ' | '\t')* '\n'
{
print_newline ();
clean lexbuf
}
| _ as c
{
print_char c;
clean lexbuf
}
| eof
{
()
}
{
let () = clean (Lexing.from_channel stdin)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment