summaryrefslogtreecommitdiff
path: root/src/print-graph.c
Commit message (Collapse)AuthorAgeFilesLines
* package: bump copyrights to 2022Paul Eggert2022-01-151-1/+1
| | | | Run "make update-copyright".
* Update URLs to prefer https: to http:Paul Eggert2021-01-291-1/+1
| | | | Also, fix a few http: URLs that were no longer working.
* package: bump copyrights to 2021Akim Demaille2021-01-161-1/+1
| | | | Run 'make update-copyright'.
* style: s/lookahead_tokens/lookaheads/gAkim Demaille2020-07-141-3/+3
| | | | | | | | | | Currently we use both names. Let's stick to the short one. * src/AnnotationList.c, src/conflicts.c, src/counterexample.c, * src/getargs.c, src/getargs.h, src/graphviz.c, src/ielr.c, * src/lalr.c, src/print-graph.c, src/print-xml.c, src/print.c, * src/state-item.c, src/state.c, src/state.h, src/tables.c: s/lookahead_token/lookahead/gi.
* dot: also use a dot in the outputAkim Demaille2020-07-031-1/+1
| | | | | | | | * src/print-graph.c (print_core): Use a dot instead of a point. * doc/figs/example-reduce.gv, doc/figs/example-reduce.txt, * doc/figs/example-shift.gv, doc/figs/example-shift.txt, * doc/figs/example.gv: Update. * tests/output.at, tests/report.at: Adjust.
* reports: don't escape the labelsAkim Demaille2020-06-131-5/+14
| | | | | | | | | | | | | | | | | | | | | | | Currently we use "quotearg" to escape the strings output in Dot. As a result, if the user's locale is C for instance, all the non-ASCII are escaped. Unfortunately graphviz does not interpret this style of escaping. For instance: 5 -> 2 [style=solid label="\"\303\221\303\271\341\271\203\303\251\342\204\235\303\264\""] was displayed as a sequence of numbers. We now output: 5 -> 2 [style=solid label="\"Ñùṃéℝô\""] independently of the user's locale. * src/system.h (obstack_backslash): New. * src/graphviz.h, src/graphviz.c (escape): Remove, use obstack_backslash instead. * src/print-graph.c: Likewise. * tests/report.at: Adjust.
* style: decouple different uses of item_numberVincent Imbimbo2020-05-251-1/+1
| | | | | | | | | | | item_number is used for elements of ritem as well as indices into ritem which is fairly confusing. Introduce item_index to represent indices into ritem. * src/gram.h (item_index): Introduce it for ritem indices. * src/closure.h, src/closure.c, src/ielr.c, src/lr0.c, * src/print-graph.c, src/state.h, src/state.h: Replace uses of item_number with item_index where appropriate.
* package: bump copyrights to 2020Akim Demaille2020-01-051-1/+1
| | | | Run 'make update-copyright'.
* style: use item_ruleAkim Demaille2019-01-301-9/+5
| | | | * src/print-graph.c, src/print-xml.c: here.
* closure: initialize it once for allAkim Demaille2019-01-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | The memory allocated by 'closure' (and some data such as 'fderives') is used to computed a state's full itemset from its core. This is needed during the construction of the LR(0) automaton, and the memory is reclaimed immediately afterwards. Unfortunately the reports (graph, text, xml) also need this information when describing the states with their full itemsets. As a consequence the memory was allocated again, fderives computed again too, and more --trace reports are generated which only duplicate what was already reported. Stop that. It does mean that we release the memory later (hence the peak memory usage is higher now), but I don't think that's a problem today. * src/lr0.c (generate_states): Don't call closure_free. * src/state.c (states_free): Do it here. (for symmetry with closure_new which is called in generate_states). * src/print-graph.c, src/print-xml.c, src/print.c: You can now expect the closure module to be functional.
* style: rename closure_* functions as closure_*Akim Demaille2019-01-281-2/+2
| | | | | | | | This is more consistent with the other files. * closure.h, closure.c (new_closure, free_closure): Rename as... (closure_new, closure_free): this. Adjust dependencies.
* style: rename LR0.* as lr0.*Akim Demaille2019-01-261-1/+1
| | | | | | | Let's stick to lower case for file names. * src/LR0.h, src/LR0.c: Rename as... * src/lr0.h, src/lr0.c: these.
* style: rename print_graph.* as print-graph.*Akim Demaille2019-01-261-0/+194
These are the only files with _. * src/print_graph.h, src/print_graph.c: Rename as... * src/print-graph.h, src/print-graph.c: these.