antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
16.99k stars 3.26k forks source link

No shell language target #4166

Open hanbaoqing-byte opened 1 year ago

hanbaoqing-byte commented 1 year ago

There is no Shell language target. Hope to support shell target.

jimidle commented 1 year ago

I am not sure what you mean. You mean something like zsh script?

It is unlikely that any more targets will be added to ANTLR4 as each target then complicates the whole maintenance and release cycle for not a lot of benefit. If you need a new target, it is better to add it yourself.

However, targeting shell script is likely not possible because of the structure of the runtime.

hanbaoqing-byte commented 1 year ago

I mean there is no shell.g4 file which can parse shell language.

ericvergnaud commented 1 year ago

That would be a feature request in the grammars-v4 repo. Feel free to contribute one.

hanbaoqing-byte commented 1 year ago

Did somebody contribute shell.g4 file before? If it exists, please share it to me.

ericvergnaud commented 1 year ago

Please move this to the grammars-v4 repo

hanbaoqing-byte commented 1 year ago

Ok, thank you. New issue link in grammars-v4 repo is https://github.com/antlr/grammars-v4/issues/3244.