Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.