preprocessor/src/macro
Sébastien Villemot 67b8ef1a19
Macroprocessor: fix line counter inside @{} constructs
There were two bugs:
– with the LF convention, newlines were counted twice
– with the CR+LF convention, they were counted four times (because the CR was
  included in yyleng, alongside the LF)

The fix consists in implementing a location_increment() method similar to the
one used for the Dynare parser. This is the most robust solution.

By the way, mark the method DynareFlex::location_increment() method static.

(cherry picked from commit 1de3476546)
2021-11-22 10:23:57 +01:00
..
Directives.cc Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Directives.hh Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Driver.cc Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Driver.hh Macroprocessor: fix line counter inside @{} constructs 2021-11-22 10:23:57 +01:00
Environment.cc Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Environment.hh Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Expressions.cc Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Expressions.hh Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
ForwardDeclarationsAndEnums.hh Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Makefile.am Now that we require Bison ≥ 3.2, the stack.hh and position.hh files are no longer generated 2019-08-14 15:36:31 +02:00
Parser.yy Macroprocessor: fix newlines in output when under Windows and input uses CR+LF convention 2021-11-22 10:23:57 +01:00
Tokenizer.ll Macroprocessor: fix line counter inside @{} constructs 2021-11-22 10:23:57 +01:00