Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你如何让 instaparse 跳过标记之间的空格?
(我当然可以将空格本身定义为一个标记,并将其插入到每条规则右侧的所有元素之间,但我正在处理一个有超过 300 条规则的语法,并希望有一种方法说一次而不是说三百次。)
您可以传递一个可选参数来打开自动空白:
(doc insta/parser) ------------------------- instaparse.core/parser ([grammar-specification & {:as options}]) :auto-whitespace (:standard or :comma) or :auto-whitespace custom-whitespace-parser