diku-dk / alpacc

MIT License
6 stars 0 forks source link

Use a Hash Table for the parsers. #8

Closed WilliamDue closed 5 months ago

WilliamDue commented 8 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 5 months ago

Solved here.