You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not able to generate a custom failure message in the parser combinator library. For a rule like ..
defbuy_sell:Parser[BuySell] ="to"~>"buy"^^^BUY|"to"~>"sell"^^^SELL|
failure("buy or sell expected")
If the input has something (say "bought") other than "buy" or "sell", then the message that gets printed is the default one ..
``sell_ expected but identifier bought found
The main parse call is like the following :-
valstr=//.. the string to parsevaltokens=new lexical.Scanner(str)
phrase(order)(tokens) match {
caseSuccess(order, _) =>
println(order)
caseFailure(msg, _) => println("Failure: "+ msg)
caseError(msg, _) => println("Error: "+ msg)
}
I posted this to scala-user and Martin Odersky responded here - [http://thread.gmane.org/gmane.comp.lang.scala.user/24426/focus=24510] and asked to file a ticket.
The text was updated successfully, but these errors were encountered:
@SethTisue said:
The parser combinators library is now community-maintained. Issues with it are now tracked at scala/scala-parser-combinators#61 instead of here in the Scala JIRA.
Interested community members: if you consider this issue significant, feel free to open a new issue for it on GitHub, with links in both directions.
Not able to generate a custom failure message in the parser combinator library. For a rule like ..
If the input has something (say "bought") other than "buy" or "sell", then the message that gets printed is the default one ..
``sell_ expected but identifier bought found
The main parse call is like the following :-
I posted this to scala-user and Martin Odersky responded here - [http://thread.gmane.org/gmane.comp.lang.scala.user/24426/focus=24510] and asked to file a ticket.
The text was updated successfully, but these errors were encountered: