Changeset [cfbf8e98479f1270f396db888adb9a01c8bc60dc] by Douglas Creager

March 2nd, 2009 @ 04:14 PM

Fixed column numbers when using Bison 2.3

Bison 2.3 numbers the columns in an input file from 0, whereas 2.4 numbers them from 1. We want to consistently use 1-based column numbers. This was causing a problem with test cases that would generate (expected) parse errors — if the correct test result was generated using Bison 2.4, then that test would fail when using 2.3, and vice versa.

I could not find an easy way to override the “column” field's default value, so instead, we add code in our Bison grammars to manually reset the column to 1 at the start of each file, and every time a new line is encountered.

Lighthouse: [#20 state:resolved] http://github.com/hst/hst/commit...

Committed by Douglas Creager

  • M src/parser/csp0.yy
  • M src/parser/eventmap.yy
  • M src/parser/intset.yy
  • M src/parser/intsetset.yy
  • M src/parser/lts.yy
  • M src/parser/scanner.cc
  • M tests/csp/CMakeLists.txt
  • M tests/csp/bugs-20-column-number-1.csp0
  • M tests/csp/bugs-20-column-number-1.f-normal-output
  • M tests/csp/bugs-20-column-number-1.f-prenormal-output
  • M tests/csp/bugs-20-column-number-1.output
  • M tests/csp/bugs-20-column-number-1.t-normal-output
  • M tests/csp/bugs-20-column-number-1.t-prenormal-output
  • M tests/csp/bugs-20-column-number-2.csp0
  • M tests/csp/bugs-20-column-number-2.f-normal-output
  • M tests/csp/bugs-20-column-number-2.f-prenormal-output
  • M tests/csp/bugs-20-column-number-2.output
  • M tests/csp/bugs-20-column-number-2.t-normal-output
  • M tests/csp/bugs-20-column-number-2.t-prenormal-output
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

An open-source refinement checker for the CSP process algebra.