style: comment and formatting changes, and fixes

* examples/c/lexcalc/parse.y: Fix option handling.
* src/gram.h: Clarify comments.
* src/ielr.c: Fix indentation.
* src/print.c, src/state.h: More comments.
This commit is contained in:
Akim Demaille
2020-10-04 14:28:39 +02:00
parent 0328cbad64
commit 4b0cd01fb7
5 changed files with 20 additions and 15 deletions

View File

@@ -132,11 +132,11 @@ int main (int argc, const char *argv[])
int nerrs = 0;
// Enable parse traces on option -p.
for (int i = 0; i < argc; ++i)
if (1 < argc && strcmp (argv[1], "-p") == 0)
yydebug = 1;
else if (strcmp (argv[i], "-e") == 0)
for (int i = 1; i < argc; ++i)
if (strcmp (argv[i], "-e") == 0)
parse_expression_p = 1;
else if (strcmp (argv[i], "-p") == 0)
yydebug = 1;
if (parse_expression_p)
{