kaby76 / Trash

Toolkit for grammars
MIT License
77 stars 5 forks source link

Likely bug in trxgrep #13

Closed kaby76 closed 2 years ago

kaby76 commented 3 years ago

Note, the xpath implementation doesn't have a way to create a tuple, so I can't do a count, and also return the node. That's a failure in xpath2 and I don't think it's available in xpath3.

This crashes in trxgrep. If I remove the function call "count()", it works.

kaby76 commented 3 years ago

Using the Arithmetic expression grammar, I can now print out the trees that have a certain depth:

trparse in.txt | trxgrep ' //SCIENTIFIC_NUMBER[count(ancestor::*) > 45]' | trtree

Basically, a problem in XSInteger parsing a string value. Fixed in the next release.

kaby76 commented 2 years ago

Fixed in v0.12.0