kaby76 / Trash

Toolkit for grammars
MIT License
72 stars 5 forks source link

Getting Started - TRGEN #479

Open johnholliday opened 3 weeks ago

johnholliday commented 3 weeks ago

Followed the installation instructions, but getting this...

TRGEN-2024-08-22_18-57-40
kaby76 commented 2 weeks ago

Grammars have to follow a few rules, otherwise the tool can't figure out what to do.

Given that, what .g4's do you have? What are they named?

johnholliday commented 2 weeks ago

@kaby76 There is no .g4 in this case. I'm following the documentation for trgen:

"If the current directory is empty, trgen will create a parser for the Arithmetic.g4 grammar."

md test
cd test
trgen

This should create a parser, correct?

kaby76 commented 2 weeks ago

Sorry. The doc is off slightly here. I changed this code. Instead of trgen, it should be trgen --arithmetic -t *target*. It will then create an arithmetic example.

kaby76 commented 2 weeks ago

BTW, I think the reason I changed this is because I would type trgen just to see the help message (to check what options are available), and end up getting a ton of files spewed in the directory that I was working in.

johnholliday commented 2 weeks ago

Hi Ken,

Thanks for responding. I’ll play around with it. BTW – I like the approach you’ve taken here. Please let me know how I can assist you.

Best, John

John F. Holliday President and CEO +1 (404) 542-4637 Holliday & Associates www.holliday.associateshttps://www.holliday.associates/ Book time with John @.***?anonymous&ep=pcard>

From: Ken Domino @.> Sent: Friday, August 23, 2024 7:01 AM To: kaby76/Trash @.> Cc: John Holliday @.>; Author @.> Subject: Re: [kaby76/Trash] Getting Started - TRGEN (Issue #479)

BTW, I think the reason I changed this is because I would type trgen just to see the help message (to check what options are available), and end up getting a ton of files spewed in the directory that I was working in.

— Reply to this email directly, view it on GitHubhttps://github.com/kaby76/Trash/issues/479#issuecomment-2306845871, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIMPXEQQ5GF4SNHSXWO2T3ZS4I6JAVCNFSM6AAAAABM7CFFJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWHA2DKOBXGE. You are receiving this because you authored the thread.Message ID: @.**@.>>