Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cant figure out this error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Greg Bowyer  
View profile  
 More options Nov 11 2011, 12:57 am
From: Greg Bowyer <gbow...@fastmail.co.uk>
Date: Thu, 10 Nov 2011 21:57:58 -0800 (PST)
Local: Fri, Nov 11 2011 12:57 am
Subject: Cant figure out this error
Hi all

My parser is as follows

_bool   = (Literal('true') | Literal('false')) >> bool
_float  = Real() >> float
_int    = Integer() >> int
_string = (AnyBut(Whitespace()))[...] >> unquote_plus

value  = (_float | _int | _bool | _string) & Eos()
pair   = Word() & Drop('=') & value     > tuple

d = Drop('{') & pair & Drop('}') > dict

I cant figure out why d.parse('{test1=test2}') fails what am I
missing ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew cooke  
View profile  
 More options Nov 11 2011, 5:44 am
From: andrew cooke <and...@acooke.org>
Date: Fri, 11 Nov 2011 07:44:59 -0300
Local: Fri, Nov 11 2011 5:44 am
Subject: Re: [LEPL] Cant figure out this error

just looking at your code, you have an Eos() at the end of value.  that means
that the input must end after the value, while you have a "}".

there may be other problems, but that certainly won't help.

using TraceVariables is a good way to debug -
http://acooke.org/lepl/debugging.html#index-3 - it will show you how far you
matche, etc.

andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »