Re: [Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-26 Thread Christian Maeder
Am 26.10.2011 01:49, schrieb Tom Hawkins: Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Do you mean parsing something like 1 + 2 * 3 ? I don't think there's any real difference in using Polyparse vs Parsec for this, except for doing p

[Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Tom Hawkins
Hi, Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Thanks in advance. -Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Ivan Lazar Miljenovic
On 26 October 2011 06:37, Tom Hawkins tomahawk...@gmail.com wrote: Hi, Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Do you mean parsing something like 1 + 2 * 3 ? I don't think there's any real difference in using Polyparse vs Parsec for

Re: [Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Tom Hawkins
Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Do you mean parsing something like 1 + 2 * 3 ?  I don't think there's any real difference in using Polyparse vs Parsec for this, except for doing p `orElse` q rather than try p | q. Actually, I

Re: [Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Ivan Lazar Miljenovic
On 26 October 2011 10:49, Tom Hawkins tomahawk...@gmail.com wrote: Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Do you mean parsing something like 1 + 2 * 3 ?  I don't think there's any real difference in using Polyparse vs Parsec for this,

[Haskell-cafe] Operator precedence

2010-09-06 Thread michael rice
Is there a handy list of operators and their precedence somewhere? Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread Daniel Díaz
Take a look to the Haskell Report: http://www.haskell.org/onlinereport/haskell2010/haskellch9.html#x16-1710009 -- Daniel Díaz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread michael rice
, Daniel Díaz lazy.dd...@gmail.com wrote: From: Daniel Díaz lazy.dd...@gmail.com Subject: Re: [Haskell-cafe] Operator precedence To: michael rice nowg...@yahoo.com, haskell-cafe@haskell.org Date: Monday, September 6, 2010, 1:06 PM Take a look to the Haskell Report:   http://www.haskell.org

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread Daniel Díaz
Those are all operators in Prelude. See a concrete library for their operator precedences. -- Daniel Díaz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread michael rice
Subject: Re: [Haskell-cafe] Operator precedence To: michael rice nowg...@yahoo.com, haskell-cafe@haskell.org Date: Monday, September 6, 2010, 1:17 PM Those are all operators in Prelude. See a concrete library for their operator precedences. -- Daniel Díaz

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread Bulat Ziganshin
Hello michael, Monday, September 6, 2010, 9:00:32 PM, you wrote: Is there a handy list of operators and their precedence somewhere? unlike most languages, operators are user-definable in haskell. so there is no comprehensive list any function with two arguments van be used as operator: a

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread David Menendez
On Mon, Sep 6, 2010 at 1:37 PM, michael rice nowg...@yahoo.com wrote: A concrete library? I'm playing around with Data.Bits. It has .. and .|. which I assume are functions (rather than operators) because I don't see and infix statement for them. Correct? .|. and .. are operators because

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread michael rice
Hi David, You're right, I keep forgetting to look at the source code. And I wasn't aware of the info (:i) command. Should come in handy in the future. Michael --- On Mon, 9/6/10, David Menendez d...@zednenem.com wrote: From: David Menendez d...@zednenem.com Subject: Re: [Haskell-cafe

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread Daniel Díaz
El Lun, 6 de Septiembre de 2010, 7:50 pm, David Menendez escribió: Operators default to infixl 9 unless specified otherwise, so no infix declaration is needed. Why there is a default infix? Why it is 9? -- Daniel Díaz ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Operator precedence

2010-09-06 Thread David Menendez
On Mon, Sep 6, 2010 at 2:21 PM, Daniel Díaz danield...@asofilak.es wrote: El Lun, 6 de Septiembre de 2010, 7:50 pm, David Menendez escribió: Operators default to infixl 9 unless specified otherwise, so no infix declaration is needed. Why there is a default infix? Why it is 9? That's what

[Haskell-cafe] Operator precedence and associativity on happy grammars

2009-05-07 Thread j . romildo
Hello. I am learning how to use Happy (a LALR(1) parser generator) and I have a question on a grammar based on an example from the manual. The input file to Happy is attached to this message. The grammar is: Exp - let var = Exp in Exp Exp - Exp + Exp Exp - Exp - Exp Exp - Exp * Exp