alex Questions

2

Solved

I'm making a parser for a DSL in Haskell using Alex + Happy. My DSL uses dice rolls as part of the possible expressions. Sometimes I have an expression that I want to parse that looks like: [some c...
Paquin asked 13/7, 2020 at 4:48

1

I can not figure out the correct RegEx to use for parsing a text file and identifying paragraphs. What I currently have: [\n\n]+ Sample Text: Das Pensionat Klinger war bereits etwas zusamm...
Acridine asked 3/5, 2018 at 2:46

1

Solved

I'm writing a toy language in haskell. I'm using Alex to generate a scanner. Every time I build my project with cabal, I get the following warnings: dist/build/optimiser/optimiser-tmp/Lexer.hs:465...
Protestantism asked 14/5, 2015 at 11:49

1

Solved

The source tree for happy contains AttrGrammarParser.ly and Parser.ly and the source tree for alex contains Scan.x. Yet, as far as I can tell in order to compile happy, we need to transform the .ly...
Neper asked 4/2, 2015 at 2:55

1

I'm learning to use Alex and Happy to write a small compiler. I want to maintain line and column information for my AST nodes so that I can provide meaningful error messages to the user. To illustr...
Decompound asked 15/12, 2013 at 1:39

1

Solved

When creating either a Lexer.x or a Parser.y parser using the Alex lexer generator or the Happy parser generator, compiling those into Haskell files, and compiling those into object files, by defau...
Kopp asked 5/8, 2013 at 13:57

1

Solved

In my current project I have a file Tokens.x that needs to be compiled to Tokens.hs by Alex. In my .cabal file I have listed Tokens in the other-modules section and cabal build happily creates the ...
Illbred asked 13/1, 2014 at 20:29

1

Solved

I'm trying to learn using Alex + Happy to build parser, in particular I'm interested in learning to use the monad wrapper of Alex. I have already looked at the documentation of Alex and Happy but I...
Holyhead asked 1/12, 2013 at 18:39

2

Solved

I'm writing a compiler for a class I'm taking. The class isn't specifically Haskell but I'm using Haskell to write my compiler and interpreter. I have a cabal package setup to hopefully make it eas...
Gravure asked 16/12, 2010 at 21:45

1

Solved

I'm working on a small Haskell project that needs to be able to lex a very small subset of strictly formed English in to tokens for semantic parsing. It's a very naïve natural language interface to...
Strength asked 7/2, 2013 at 21:1

1

Solved

I'm trying to understand Alex and lexers in general but I'm having trouble to run my lexer. I wrote lexers in "basic" and "posn" wrappers but I couldn't in "monad" wrapper. I think I have to use m...
Dissertation asked 9/5, 2012 at 10:32

2

Solved

Mixing the lexer and parsing phases in one phase sometimes makes Parsec parsers less readable but also slows them down. One solution is to use Alex as a tokenizer and then Parsec as a parser of the...
Jeffryjeffy asked 13/10, 2011 at 8:55
1

© 2022 - 2024 — McMap. All rights reserved.