igordejanovic / rustemo

LR/GLR parser generator for Rust https://igordejanovic.github.io/rustemo/
Apache License 2.0
32 stars 3 forks source link

Disabling debug print on debug mode #4

Closed stevefan1999-personal closed 9 months ago

stevefan1999-personal commented 10 months ago

I don't want to garble up my stdout, and rather have those debug information on a separate file stream for better accessibility, because console buffer is line-limited.

igordejanovic commented 9 months ago

Added --notrace option for suppressing debug trace. In addition, debug trace is printed to std error so it can be redirected like:

rcomp mygrammar.rustemo 2>log.txt

Alternatively, --notrace can be controlled by env variable RUSTEMO_NOTRACE:

RUSTEMO_NOTRACE=1 rcomp mygrammar.rustemo