parseWithWhitespace simpleExp-6ren">
gpt4 book ai didi

haskell - Jake Wheat 的 "Intro to Parsing with Parsec in Haskell"是否已过时?

转载 作者:行者123 更新时间:2023-12-01 12:07:06 26 4
gpt4 key购买 nike

我正在关注 an incredibly detailed Parsec tutorial .但是,一些示例无法按预期工作,例如,

ghci> parseWithWhitespace simpleExpr5 "(1+2)"
Left (line 1, column 3):
unexpected "+"
expecting digit or ")"

是不是因为教程是 outdated ?最近有人试过吗?

最佳答案

教程有错别字。 term5应该

term5 = term simpleExpr5

关于haskell - Jake Wheat 的 "Intro to Parsing with Parsec in Haskell"是否已过时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55541589/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com