Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar generation from example strings #14

Open
blenderskool opened this issue Aug 8, 2022 · 3 comments · May be fixed by #25
Open

Grammar generation from example strings #14

blenderskool opened this issue Aug 8, 2022 · 3 comments · May be fixed by #25

Comments

@blenderskool
Copy link
Owner

blenderskool commented Aug 8, 2022

Defining example strings that are a part of your language is easier than writing the grammar directly.

There can be a feature in Vyaakaran that allows the user to enter strings that are a part of the language and Vyaakaran generates the grammar code directly from that.
Not sure about feasibility and complexity of this, but it should possibly be explored in following order:

  • Regular grammar (maybe something to do with prefix grouping might work?)
  • CFG
  • TM
@Arjun-A-I
Copy link

Description:
To add LLM integration to generate grammar from natural language

Proposed solution :

  • We propose a solution using a Generative AI-based grammar generation tool. By using a Large Language Model, we can create a CLI command that allows users to input a string with a simple command, such as generate <grammar_type> . This command will automatically generate the corresponding grammar code in the editor or open a new editor tab where the generated grammar will be present.
  • Example usage :
  • grammar_types = rg , cfg , tm
  • command = generate rg Create a regular grammar which accepts strings that contains 0

@Arjun-A-I
Copy link

Arjun-A-I commented Jul 27, 2024

Just wanna give a try...what do you think @blenderskool

@blenderskool
Copy link
Owner Author

@Arjun-A-I Sure do give it a go! I can't say with surety if this will get merged or not because of the costs associated with using LLM APIs and the quality of the results it may produce in context of Vyaakaran.

@riya461 riya461 linked a pull request Jul 28, 2024 that will close this issue
@blenderskool blenderskool linked a pull request Aug 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants