nihei9 / vartan

An LALR parser generator for golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there anything I can do for vartan?

rebelice opened this issue · comments

Hello, I was pleasantly surprised when I found vartan!
I recently struggled with the compiler implementation of SQL in Golang.
I know that goyacc can do this, but IMHO, goyacc is too difficult to use, I need to embed Golang code in the grammar file. If I want to be compatible with the SQL syntax of different dialects, it will be a lot of work.
But vartan gets me a new choice.

On the other hand, I'm also happy to be a contributor. I have a lot of open source contribution experience. You can check at my GitHub homepage. So if you'd like to, you can share the development plan to me.

You also can contact me by yangrebelice@gmail.com. Looking forward to your reply.

@rebelice
Hi, thank you for your interest in vartan!

I know that goyacc can do this, but IMHO, goyacc is too difficult to use

First, please note that the essential difficulty between vartan and the Yacc-like tools is the same.
Since vartan generates an LR parser just like Yacc-like tools, we will face LR parser-specific problems such as shift/reduce and reduce/reduce conflicts with vartan as well.

Nevertheless, vartan has the following advantages:

  • The simplicity of the DSL makes it very easy to get started.
  • A grammar file doesn't contain code snippets, which improves the visibility of grammar definitions.
    • vartan does not support embedding code snippets in grammar files.
  • vartan provides features to assist in debugging your grammar.
    • vartan parse command allows you to perform parsing easily.
    • vartan test command is still poor but can run tests on your grammar.

On the other hand, vartan has fewer features than the Yacc-like tools and is less flexible.
Also, note that APIs is not yet stable.

So if you'd like to, you can share the development plan to me.

I have the following plans. Stars ⭐ mean high priority.

  • ⭐ Stabilizing APIs of a generated parser
  • ⭐ Improve the feature to build AST from CST (Concrete Syntax Tree)
  • Allow users to build their own syntax error messages
  • Enhance testing and debugging support features
  • Enhance regular expressions
  • Improve the DSL

Is there anything I can do for vartan?

vartan is still under development. I would be most happy to hear your feedback 😃

Thanks for your detailed introduction! I will keep watching vartan.