Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
1 answer
75 views

I'm creating a toy language in Haskell, and using Text.Parsec to parse everything, So far it's worked great, but there's a certain feature that I don't know how to implement: What I want to implement: ...
0 votes
1 answer
61 views

I am having trouble getting the following code to work. I got it to work originally, then I changed it so all the Nonterminals also have positions. And I added the method parseLexeme that transforms ...
3 votes
1 answer
68 views

I have a parser that looks like this: module Parser2 where import Text.Parsec import Text.Parsec.String (Parser) import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Expr as Ex import ...
Tanse's user avatar
  • 97
1 vote
1 answer
115 views

This is my current code for multiplying the first and last numbers in a string type Parser = Parsec Void String parsefirst :: Parser Int parsefirst = do getnotdigits x <- some digitChar ...
2 votes
1 answer
108 views

In the project I'm currently working on, I construct the expression parser in parsec. The code is something like: opTable :: [[Operator Parser Expr]] opTable = [ -- ... [ InfixL $ ...
4 votes
1 answer
133 views

I'm trying to write a simple parser in Haskell using Parsec but my input "Hello World" is never correctly parsed. My code looks like this: parser = p1 <|> p2 p1 = string "Hello&...
Milzo's user avatar
  • 43
2 votes
1 answer
181 views

I've been experimenting with Parsec for the first time in my life and I found a task that turned out surprisingly difficult. I want to parse two lists of numbers separated by | character. Here's an ...
LA.27's user avatar
  • 2,310
0 votes
1 answer
45 views

WorkerGroup.h:88:5: error: looser throw specifier for 'virtual threads::WorkerGroup::~WorkerGroup() throw (threads::CondException, threads::MutexException)' 88 | ~WorkerGroup(); | ^ I ...
Raj's user avatar
  • 1
1 vote
1 answer
92 views

I'm trying to parse just comments from a String and I'm close but not quite there. import Text.ParserCombinators.Parsec parseSingleLineComment :: Parser String parseSingleLineComment = do string ...
red-swan's user avatar
  • 1,269
0 votes
0 answers
89 views

I am looking through the parsec github repository (currently at version 3.1.16.1) on the master branch. As of the time of writing this, the latest commit on master has commit id ...
0 votes
0 answers
116 views

TL;DR: Is there a simple way for me to get the input stream consumed by a parser? Perhaps there is a way using the getInput, getPosition, and parsecMap utilities provided by parsec? I have a lexer ...
1 vote
1 answer
99 views

I'm trying to parse a simple language defined as follows: import Data.Functor.Identity import Data.Text (Text) import qualified Data.Text as T import Text.Parsec import qualified Text.Parsec.Expr as ...
GlinesMome's user avatar
  • 1,649
0 votes
1 answer
103 views

I am trying to parse (using parsec) a string that represents some data type that I defined. Thus the string needs to be parsed to my data type. An example of the string would be, [(1,[(<,0),(%,4)]),...
2 votes
2 answers
149 views

I'm trying to update a parsec parser that uses buildExpressionParser from Text.Parsec.Expr. I'm trying (and possibly this is ill-advised, but it looks like it's supposed to be practical) to build part ...
1 vote
1 answer
240 views

I am using Parsec library to parse a string. The problem I have is that can't differentiate some tokens because they are words with the same prefix. Simplifying the whole grammar (in my case it's not ...
00M's user avatar
  • 89

15 30 50 per page
1
2 3 4 5
...
41

AltStyle によって変換されたページ (->オリジナル) /