Did you see expression parser in parsec
packagehttp://hackage.haskell.org/packages/archive/parsec/3.1.3/doc/html/Text-Parsec-Expr.html?
Is it not enough?
2013/2/20 Martin Drautzburg martin.drautzb...@web.de
Hello all,
this was previously asked on haskell-beginners, but only partially
Hi,
Martin Drautzburg wrote:
As an exercise I am writing a parser roughly following the expamples in Graham
Hutton's book. The language contains things like:
data Exp = Lit Int -- literal integer
| Plus Exp Exp
So the grammar is:
Exp ::= Int
| Exp + Exp
My naive parser
Thanks that is exactly what I was looking for, one further question I might
ask is how I might allow for either a integer or a string to be parsed. As
it is now I get a complaint if I try and parse either a String or an
Integer without creating a data declaration for say Express containing:
data
* Tillmann Rendel ren...@informatik.uni-marburg.de [2013-02-20 09:59:47+0100]
One way to fix this problem is to refactor the grammar in order to
avoid left recursion. So let's distinguish expressions that can
start with expressions and expressions that cannot start with
expressions:
[...]
Hi,
Roman Cheplyaka wrote:
Another workaround is to use memoization of some sort — see e.g. GLL
(Generalized LL) parsing.
Is there a GLL parser combinator library for Haskell? I know about the
gll-combinators for Scala, but havn't seen anything for Haskell.
Bonus points for providing the
* Tillmann Rendel ren...@informatik.uni-marburg.de [2013-02-20 12:39:35+0100]
Hi,
Roman Cheplyaka wrote:
Another workaround is to use memoization of some sort — see e.g. GLL
(Generalized LL) parsing.
Is there a GLL parser combinator library for Haskell? I know about
the gll-combinators
All,
Many (but not all) of the parsing algorithms that support left
recursion cannot be implemented in Haskell using the standard
representation of recursion in parser combinators. The problem
can be avoided in Scala because it has imperative features like
referential identity and/or mutable
It is indeed true that a grammar with left-recursion can be
transformed to an equivalent grammar without left recursion --
equivalent in terms of the language recognized -- but _not_ in the
parse trees. Linguists in particular care about parses. Therefore, it was
linguists who developed the
On 20/02/13 08:13, Jan Stolarek wrote:
Dnia wtorek, 19 lutego 2013, Gwern Branwen napisał:
On Tue, Feb 19, 2013 at 5:36 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
- remove unlambda, brainfuck and show from the repo. They are on hackage,
no need to keep them here - these packages aren't
On Feb 19, 2013, at 9:54 PM, Jason Dagit dag...@gmail.com wrote:
Random thought, feel free to ignore it: Would it make sense to split
lambdabot up into core and contrib like is done with xmonad? Contrib could
contain the sillier things like bf, unlambda, show, etc and would have a
lower
Any opinion about whether it's better to put them
in the same or separate actual repos?
The general rule in git is that a repo should contain a single project. There
are some projects
that violate this rule - e.g. cabal stores both Cabal and cabal-install in the
same repository -
but with
Since smallcheck-1.0 contains API changes -
Could the maintainers of show
http://hackage.haskell.org/package/show-0.4.1.2
please add some version bound ( 1 or similar)
for the smallcheck dependency?
Thanks - J.W.
___
Haskell-Cafe mailing list
More primitively, Parsec and its predecessor Hutton-Meijer provide the
chainl/chainr combinators, these automatically remove left recursion
within the parser - i.e. you don't have to rewrite the grammar.
On 20 February 2013 08:19, Dmitry Olshansky olshansk...@gmail.com wrote:
Did you see
Are you suggesting that the source code of these packages is moved out to
their own darcs repositories?
Exactly. This allows to use and develop these packages independently of
lambdabot and I consider
that a Good Thing. I'm also much in favor of using git, because github allows
easy
I've catalogued a list of issues on github:
https://github.com/mokus0/lambdabot/issues
Let me know if you have objections against any of them. If no then I will try
to fix them
gradually. Right now a major problem for me are exceptions in Data.Binary, but
I don't think I
will be able to fix
On Wed, Feb 20, 2013 at 12:59 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
Exactly. This allows to use and develop these packages independently of
lambdabot and I consider
that a Good Thing. I'm also much in favor of using git, because github allows
easy collaboration
between community
goodness may be outweighed by the costs of switching:
Could you specify what are those cost of switching?
Turns out the
reason for people not submitting patches had more to do with things
besides not being hosted on Github.
Of course. I don't clain this is the reason for people not
My 2 cents:
Switching to github: +0.1
Splitting into core contrib: +1
Okay I suppose that is more like 1.1 cents.
I would love to help maintain lambdabot and help brush off the bitrot, but
am personally quite overextended so I can't really promise any amount of
dedication for at least the next
On Wed, Feb 20, 2013 at 1:35 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
Gwern, and what do you think about James' fork of lambdabot? It seems that
there was a lot of work
put into it and that this is indeed a good starting point to continue
development.
I haven't looked at the diffs; if
I've been working with open source rc aircraft transmitter software,
and in looking at the shortcomings of one of them, started thinking
about embedding a language. There are a number of options that can
work here, like FORTH or a basic. But then I realized that Haskell -
or similar functional
Thank you very much.
To clarify: I am not in need of a parser, I just wanted to understand why left
recursion is an issue (that was easy) and what techniques help to circumvent
the problem. So your answer was spot-on (though I haven't implemented it yet)
On Wednesday, 20. February 2013
Hey!
GHC warns me about unused definitions in a module. However, is it
possible to warn me about unused definitions in a package?
For example, suppose that module A exports function f and that module
B uses A.f (everything on a single package). However, after some time
B stops using A.f. Is
Another option would be to use Atom. I have successfully used it to
target the arduino platform before. Running the entire OS on the
embedded system seems dubious. Assuming you are using something the 9x
family of transmitters -- they are slow and have very little internal
memory. Plus trying to
On Wed, Feb 20, 2013 at 4:01 PM, Jeremy Shaw jer...@n-heptane.com wrote:
Another option would be to use Atom. I have successfully used it to
target the arduino platform before. Running the entire OS on the
embedded system seems dubious. Assuming you are using something the 9x
family of
On 21 February 2013 08:56, Felipe Almeida Lessa felipe.le...@gmail.com wrote:
Hey!
GHC warns me about unused definitions in a module. However, is it
possible to warn me about unused definitions in a package?
For example, suppose that module A exports function f and that module
B uses A.f
Ah, nice. Building Haskell applications on the Raspberry Pi which is a
32-bit 700 Mhz CPU with 512MB of RAM is still pretty painful. So, I
think that running GHC on something even less powerful is probably not
going to work well. But, handling a subset of Haskell for onsite
programming could work.
Welcome to issue 259 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of February 10 to 16, 2013.
Quotes of the Week
* frerich: i thought endo is where the ewoks live
* edwardk: on the other hand i also write
in addition to atom http://hackage.haskell.org/package/atom/
theres also copilot http://hackage.haskell.org/package/copilot
point being: theres lots of great tools you can use to target embedded
systems that leverage haskell in cool ways!
(eg: hArduino on the more hobbyist side, which I need to
28 matches
Mail list logo