glr2.cc: turn some pointers into references

* data/skeletons/glr2.cc: Prefer references to pointers.
Add a few more const.
This commit is contained in:
Akim Demaille
2020-12-06 07:30:51 +01:00
parent 4f24f5f304
commit e72eda7aee
2 changed files with 97 additions and 91 deletions

6
TODO
View File

@@ -187,6 +187,12 @@ And use YYCDEBUG rather than YY_DEBUG_STREAM.
*** Avoid pointers
There are many places where pointers should be replaced with references.
Some occurrences were fixed, but now some have improper names:
-yygetToken (int *yycharp, ]b4_namespace_ref[::]b4_parser_class[& yyparser][]b4_pure_if([, glr_stack* yystackp])[]b4_user_formals[)
+yygetToken (int& yycharp, ]b4_namespace_ref[::]b4_parser_class[& yyparser][]b4_pure_if([, glr_stack* yystackp])[]b4_user_formals[)
yycharp is no longer a Pointer. And yystackp should probably also be a reference.
*** Use proper type names
Don't use YYSTYPE and YYLTYPE but parser::semantic_type and