History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-638
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Chuck Esterbrook
Reporter: Doug H
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Boo

and operator precedence

Created: 09/Dec/05 10:00 AM   Updated: 14/Dec/05 12:22 PM
Component/s: Parser
Affects Version/s: 0.7.5
Fix Version/s: 0.7.6

Time Tracking:
Not Specified

File Attachments: 1. Text File BOO-683-Patch.txt (2 kb)



 Description  « Hide
http://groups.google.com/group/boolang/msg/0aa5b63a96906b5b

Just need to change a few things in boo.g and wsaboo.g,
then edit one line in the not-1.boo test case. These changes are mentioned
in the google note.

Also add a parser roundtrip test that these:
print true and true and true
print true or true or true

are printed out like so:
print (true and true) and true
print (true or true) or true

if there is not already such a test.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Chuck Esterbrook - 14/Dec/05 02:18 AM
I just want to highlight that both C# and Python are in agreement:

C# : false && true || true ==> true
Python : false and true or true ==> true
Python : 0 and 'yes' or 'no' ==> 'no'

Without this fix, boo says that "false and true or true" is false.


Chuck Esterbrook - 14/Dec/05 02:21 AM
Here's a "patch". I wasn't sure how to handle a new file in an anon svn workspace and I put the "svn info" up top. This was authored by Doug H plus I slapped in 2 more test cases.

Rodrigo B. de Oliveira - 14/Dec/05 12:22 PM
Patch applied. Thanks!