haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

Is this long columns of ints expected behaviour on the example? #161

Closed step21 closed 2 years ago

step21 commented 4 years ago

I am just playing around with haskell and alex. When running the example from the docs, the resulting .hs file has superfluous whitespace like a snowy mountain and long columns of integers, why? Is it some kind of test? In the closest comment it says 'GScan wrapper', whatever that means. Maybe I just do not know enough haskell, but any insight would be great. Google and docs didn't help so far.

andreasabel commented 3 years ago

has superfluous whitespace like a snowy mountain

I suppose no one cared to make the output look nice, since it is only for consumption by the Haskell compiler.

long columns of integers

If I am not mistaken, these integers represent the transition table of the generated automaton.

step21 commented 3 years ago

Thanks for clarifying, that makes sense. However I thought that as it is supposed to be usable for lexer/parser generation, I actually need to know what it is doing.

andreasabel commented 2 years ago

Content of this issue duplicates #84 and #105.