Opened 15 years ago

Closed 12 years ago

#1763 closed Bugs (invalid)

wrong AST when parser_tag==0

Reported by: ka3a4ok <bismuth@…> Owned by: Joel de Guzman
Milestone: Boost 1.36.0 Component: spirit
Version: Boost 1.35.0 Severity: Problem
Keywords: parser_tag ruleId Cc:

Description

Simple way to reproduce bug:

  1. Change 1 to 0(zero) in line 43 of file \spirit\example\fundamental\tree_calc_grammar.hpp

static const int integerID = 1; => static const int integerID = 0;

  1. Build and run \spirit\example\fundamental\ast_calc.cpp example.
  1. Enter some expression. For example, 2+3.

There will be assert in line 68 of file ast_calc.cpp.

Change History (2)

comment:1 by Marshall Clow, 15 years ago

Component: Nonespirit
Owner: set to Joel de Guzman

comment:2 by Hartmut Kaiser, 12 years ago

Resolution: invalid
Status: newclosed

This ticket is invalid as the code change explicitly violates one of the invariants of the Spirit AST tree code: all node ids have to be non-zero. The assertion is in place to make sure this invariant is observed.

Note: See TracTickets for help on using tickets.