1. 19 Nov, 2021 3 commits
    • Sébastien Villemot's avatar
      Macroprocessor: make the removal of “@#line” directives consistent across LF and CR+LF conventions · 0ac544d8
      Sébastien Villemot authored
      Simplify the algorithm using only regexps, and add comments.
      0ac544d8
    • Sébastien Villemot's avatar
      Macroprocessor: fix line counter inside @{} constructs · 1de34765
      Sébastien Villemot authored
      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.
      1de34765
    • Sébastien Villemot's avatar
      Macroprocessor: fix newlines in output when under Windows and input uses CR+LF convention · 487c3729
      Sébastien Villemot authored
      If the input .mod file uses CR+LF convention, and if the user is under Windows,
      then the output of the macroprocessor (as given by the “savemacro” option) had
      incorrect end of lines: those would be CR+CR+LF.
      
      The reason is that some TextNode(s) internally created by the macroprocessor
      would themselves contain CR+LF sequences, which would then be transformed into
      CR+CR+LF in the output (because MinGW transforms LF into CR+LF in output
      streams).
      
      The fix consists in changing the nature of the EOL token: the parsed text is no
      longer attached to it, so that the Bison file now systematically turns it into
      a LF inside TextNode(s).
      
      Closes: #80
      487c3729
  2. 09 Nov, 2021 1 commit
  3. 29 Oct, 2021 6 commits
  4. 26 Oct, 2021 1 commit
  5. 25 Oct, 2021 1 commit
  6. 08 Oct, 2021 3 commits
  7. 06 Oct, 2021 2 commits
  8. 24 Sep, 2021 2 commits
  9. 22 Sep, 2021 1 commit
  10. 21 Sep, 2021 3 commits
  11. 13 Sep, 2021 1 commit
  12. 08 Sep, 2021 3 commits
  13. 31 Aug, 2021 2 commits
  14. 30 Aug, 2021 2 commits
  15. 18 Aug, 2021 1 commit
  16. 16 Aug, 2021 1 commit
  17. 15 Aug, 2021 1 commit
  18. 10 Aug, 2021 1 commit
  19. 23 Jul, 2021 2 commits
  20. 22 Jul, 2021 3 commits