diku-dk / alpacc

MIT License
5 stars 0 forks source link

Use a Hash Table for the parsers. #8

Closed WilliamDue closed 3 months ago

WilliamDue commented 6 months ago

The parsers generated from futhark/parser.fut and src/Alpacc/Generator/Parser.hs currently uses pattern matching for LLP tables. As far as I understand, futhark compiles these to if statements so it would be much better if they were static hash tables. Static hash tables could also be used for the associative table in futhark/lexer.fut and src/Alpacc/Generator/Lexer.hs since it is probably a very sparse table since most combinations would result in a dead endofunction/endomorphism.

WilliamDue commented 3 months ago

Solved here.