kaby76 / Antlr4BuildTasks

Third-party build tool for 'Official' Antlr4 tool and runtime parsers using .Net. Drop-in replacement for 'Antlr4cs' Antlr4 tool and build rules.
MIT License
75 stars 10 forks source link

Small suggestions re. my StackOverflow post #3

Open SimonSntPeter opened 4 years ago

SimonSntPeter commented 4 years ago

Hi, from https://stackoverflow.com/questions/63191238/antlr4-runtime-problem-in-visual-studio-2019, trivial stuff but still.

  1. I didn't know what the "dotnet new -i ..." was intended to do so I didn't know if it needed admin privileges (it doesn't).
  2. It needs a working connection (some installs don't because they are shipped with components disabled but that's not what happens here).
  3. It installs templates not immediately-executable code -- again, I didn't know this. It's why it doesn't need admin privs. These are small points but simple clarification would be helpful.
  4. And when it actually ran, I got errors. Looking at the code that was deliberate, but it was yet another moment of "Oh no, what now" (it had been a long day). Simply adding in a print() statement above saying something like "the following are deliberate parsing errors, see the code" would be very nice indeed.
SimonSntPeter commented 4 years ago

Converting this proj to my grammar, this really threw me in Program.cs where it failed var tree = parser.file(); Because file has no obvious link to parsing expressions I got lost until I checked the antlr book, so it turns out it really is the grammar file : expression (SEMI expression)* EOF; If this was called expressions instead of file I'd have found it immediately. A dumb mistake on my part but FYI.

kaby76 commented 4 years ago

Thanks for the suggestions. I'll incorporate what I can to clarify the doc and template code.