TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What is the simplest way for users to write custom parsers?

2 点作者 isaac21259超过 3 年前
I'm currently working on some software targeted at mathematicians. Part of this requires that the user can write parsers to parse custom notation. I would expect most mathematicians interested in this project to know at least some basic programming but I also think it would be too difficult to expect them to write a full recursive descent parser or similar for their own notation. My current plan is to expose a simple parser combinator library alternatively I was thinking of a parser generator instead. But I was wondering if there is an option which is even simpler for users. What is the simplest way to allow users to write custom parsers?

2 条评论

skydhash超过 3 年前
A visual editor can be a nice tool to do that. In one side, the notation with placeholder describing the expected input, In the other side, how the notation can be evaluated with the existing ones using the same input. You can add things like loops.
Nokinside超过 3 年前
What is the target language?<p>Are you parsing only expression grammars?