happy Questions

5

Solved

I'm using happyJS and use the regex underneath for phone validation phone: function (val) { return /^(?:[0-9]+$)/.test(val); } However this ONLY allows numbers. I want the user to be able to e...
Genniegennifer asked 5/11, 2012 at 10:14

0

I have a grammar that, depending on the order of productions, happy reports 3 reduce/reduce conflicts or none. The minimal example I can find is: %tokentype {Token} %token int { Int } '-' { Neg ...
Haversine asked 5/3, 2018 at 22:33

2

Solved

I am attempting to build GHC from source following this page. When installing dependencies, I had to install happy and alex: $ cabal install alex happy Resolving dependencies... Configuring alex-3...
Gal asked 5/7, 2017 at 19:39

1

Solved

I have two snippets of Happy code here, one that uses normal precedence rules, and one that uses context-dependent precedence rules (both of which are described here). Normal: %left '+' %left '*'...
Chromous asked 24/1, 2017 at 19:14

1

Solved

As part of my compiler, I need alex and happy to run as part of my build process. How does Stack support this scenario? Bonus: how can I register alex and happy as compile-time dependencies?
Islek asked 2/10, 2015 at 0:58

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

I've been trying to get happy to install correctly for the past couple days, and while I found it challenging to get cabal install happy to not just error (by installing happy-1.19 with apt-get and...
Chellean asked 17/4, 2014 at 16:42

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

1

Solved

I've trying to do cabal install hoogle but there is a hickup with the haskell-src-exts-1.13.5 dependency: Configuring haskell-src-exts-1.13.5... setup: The program happy version >=1.17 is requi...
Trews asked 14/5, 2013 at 4:49

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

I am going to write a parser of verilog (or vhdl) language and will do a lot of manipulations (sort of transformations) of the parsed data. I intend to parse really big files (full Verilog designs,...
Legra asked 8/2, 2013 at 13:17

5

Solved

To learn how to write and parse a context-free grammar I want to choose a tool. For Haskell, there are two big options: Happy, which generates a parser from a grammar description and *Parsec, which...
Hostler asked 1/9, 2011 at 10:27

1

Solved

I am using Happy to generate a parser. I have found that when I give it tokens which match part of the grammar at a lower level than the top level (such as giving it an expression on it's own, tha...
Hydrometallurgy asked 14/12, 2011 at 13:31

2

Solved

So I am trying to implement a pretty simple grammar for one-line statements: # Grammar c : Character c [a-z0-9-] (v) : Vowel (= [a,e,u,i,o]) (c) : Consonant (?) : Any character (incl. number)...
Undercoating asked 27/6, 2011 at 22:13
1

© 2022 - 2024 — McMap. All rights reserved.