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

Examples about usage statements #5

Closed
sanliturk opened this issue Oct 13, 2018 · 6 comments
Closed

Examples about usage statements #5

sanliturk opened this issue Oct 13, 2018 · 6 comments

Comments

@sanliturk
Copy link

(1)

There is no examples of usage statements . By using trial and error , I could find the following statements :

[s@localhost kgt]$ Installed/bin/kgt -l bnf -e dot < examples/postal.bnf > postal.dot
[s@localhost kgt]$ Installed/bin/kgt -l bnf -e dot < examples/expr.bnf > expr.dot
[s@localhost kgt]$ Installed/bin/kgt -l abnf -e dot < examples/utf8.abnf > utf8.dot

The above statements are produced viewable .dot files .

[s@localhost kgt]$ Installed/bin/kgt -l iso-ebnf -e dot < examples/json.iso-ebnf > json.dot
25:33: Syntax error

Additional usage examples may be useful .

(2)

In README

pmake

is not available in every OS .

There is "bmake" to distinguish between GNU make and BSD make .

Mentioning bmake in README may be useful .

[s@localhost kgt]$ uname -a
Linux localhost.localdomain 4.18.11-200.fc28.x86_64 #1 SMP Sun Sep 30 15:31:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Fedora 28

(3)

In main.c :

in xusage :

Addition/modification of the following lines may be useful :

printf("usage: kgt [-nu] [-l <language>] [ -e <language> ]   <  input_file_name  >   output_file_name   \n");

printf(" -n : prettify
printf(" -u : allow undefined
printf(" -l : input language ( see io[]= in main.c for valid input names enclosed within ""
printf(" They are : bnf , wsn , abnf , iso-ebnf , rbnf
printf(" -e : output language ( see io[]= in main.c for valid input names enclosed within ""
printf(" They are : bnf , wsn , iso-ebnf , rbnf , sid , dot , rrdot , rrdump , rrparcon , rrta , rrtext
printf(" If there is a NULL in a column , do not use that name for -l or -e
printf(" h or ? : help
printf("

Explanation for "prettify" and "allow undefined" may be useful .
Links about wsn , rbnf , sid , dot , rrdot , rrdump , rrparcon , rrta , rrtext in README may be useful .

@katef
Copy link
Owner

katef commented Oct 23, 2018

All very true! Thank you for the observations. Would you like to submit a PR?

@sanliturk
Copy link
Author

sanliturk commented Oct 23, 2018 via email

@katef
Copy link
Owner

katef commented Oct 23, 2018

Hiya,

I meant you're most welcome to make changes to the code yourself, if you want to :)

I converted the README to markdown, and added a bit of guidance: https://github.com/katef/kgt/blob/master/README.md
(You can see bmake is mentioned there, too. I know the make situation is confusing.)

I don't think this is a replacement for proper documentation. Rather than stuffing that sort of thing into xuage(), I'd prefer to have manpages for the CLI tool and API. Those will take some time to write properly, though.

I'd also like to provide an informal overview of the phases during compilation, rather like for libfsm here:
https://github.com/katef/libfsm/blob/master/doc/tutorial/phases.md

@sanliturk
Copy link
Author

sanliturk commented Oct 23, 2018 via email

@katef
Copy link
Owner

katef commented Jan 1, 2019

I added a manpage - https://github.com/katef/kgt/blob/master/man/kgt.1/kgt.1.xml
That's docbook source - rendering will come later.

Eventually I expect I'll write a proper user guide, but I'm not ready for that yet.

I'm going to close out this ticket; I expect general quality for everything to gradual improve in all areas. There's still a lot of things I think need attention.

Meanwhile thank you for your thoughts, I very much appreciate the ideas!

Happy new year :)

@katef katef closed this as completed Jan 1, 2019
@sanliturk
Copy link
Author

sanliturk commented Jan 1, 2019 via email

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

No branches or pull requests

2 participants