Skip to content

Commit

Permalink
Equality operator parse fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Mar 13, 2013
1 parent e793e25 commit 96528e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Lens.Parser/Grammar.fs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ line_expr_2Ref := pipe2
<| line_expr_3
<| many (sign_2 .>>.? line_expr_3)
<| Node.operatorChain
sign_2Ref := token "==" <|> token "<>" <|> token "<" <|> token ">" <|> token "<=" <|> token ">="
sign_2Ref := choice [attempt <| token "=="
attempt <| token "<>"
attempt <| token "<="
attempt <| token ">="
attempt <| token "<"
attempt <| token ">"]
line_expr_3Ref := pipe2
<| opt (keyword "not" <|> token "-")
<| (pipe2
Expand Down
2 changes: 1 addition & 1 deletion Lens/Grammar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ line_expr_0 = line_expr_1 [ ( "as" | "is" ) type ]
line_expr_1 = line_expr_2 { sign_1 line_expr_2 }
sign_1 = "&&" | "||" | "^^"
line_expr_2 = line_expr_3 { sign_2 line_expr_3 }
sign_2 = "==" | "<>" | "<" | ">" | "<=" | ">="
sign_2 = "==" | "<>" | "<=" | ">=" | "<" | ">"
line_expr_3 = [ "not" | "-" ] line_expr_4 { sign_3 line_expr_4 }
sign_3 = "+" | "-"
line_expr_4 = line_expr_5 { sign_4 line_expr_5 }
Expand Down

0 comments on commit 96528e0

Please sign in to comment.