cknadler / marktab-c

Concise, machine readable guitar tabs
MIT License
36 stars 7 forks source link

Nested symbols failing #38

Closed cknadler closed 9 years ago

cknadler commented 11 years ago

This is a pretty weird edge case.

crd: (5,4,3,2,1:1)
seq: [crd]

seq

This fails with the error:

Undefined symbol: seq

I can think of two reasons this would happen. Either the parser is treating seqences and chords differently when it reads them as symbols (unlikely), or there is something wrong with my implementation of the hash table and this is some strange edge case that causes the seq key to be overwritten (more likely, but still...).

cknadler commented 11 years ago

This is definitely due to two bugs in particular. The first, dealing with reclaiming buckets in the hash table. The second (at this point, unresolved) is that the red black tree that is being used for collisions in the hash table can't reliably remove nodes.

cknadler commented 11 years ago

Reimplementing the hash table was necessary and totally awesome but didn't solve this problem at all. At this point, it has to be marktab implementation specific and not related to the hash table (as the newest hash table has sweet unit tests).