Increase output?

Debugging grammars with Grammar::Tracer produces a fair amount of tree-like output which is truncated after 500 bytes.

If possible please increase this a tad as 18 lines of output can be insufficient, eg :

truncated-min

Merci !

See :

This is a requirement in the test runner specification so unfortunately I cannot make this call myself:

We can get ~50% saving by removing ANSI.

A Grammar::Tracer issue was raised a decade ago for an option to drop colour so we can’t do it that way round.

With a test regex of :

s:g/\x[1b]\[\d+[\;\d+]*<[mG]>//

It can render :

TOP
|  Codon
Phenylalanine
* MATCH "UUC"
|  * MATCH "UUC"
|  Codon
Phenylalanine
* MATCH "UUC"
|  * MATCH "UUC"
|  Codon
|  |  STOP
|  |  * MATCH "UAA"
|  * MATCH "UAA"
|  Codon
|  |  Tryptophan
|  |  * MATCH "UGG"
|  * MATCH "UGG"
|  Codon
|  * FAIL
* MATCH "UUCUUCUAAUGG"

What do you think @m-dango ?

I’ve created a pull request which counts the characters without ANSI. If the output exceeds 500 characters, ANSI is removed and the output is truncated, else the color is left in.

4 Likes