Package: bisonc++
Version: 2.2.0-1
Severity: normal

In some grammars semantic values associated with tokens returned by a lexical
scanner may be lost during the parsing process. This happens in states in
which both a shift and a reduce may be possible. If a reduce is executed the
already received token value is saved for a subsequent shift, but (currently)
its associated semantic value is not saved. The repair is easily implemented:

In /usr/share/bisonc++:

    1. In bisonc++base.h change the lines below

class [EMAIL PROTECTED]

    from:
        STYPE__     d_val__;
$insert LTYPEdata

    into:
        STYPE__     d_val__;
        STYPE__     d_nextVal__;
$insert LTYPEdata


    2. In bisonc++.cc add one line to the function void [EMAIL 
PROTECTED]::popToken__()
as follows:

void [EMAIL PROTECTED]::popToken__()
{
    d_token__ = d_nextToken__;
    d_val__ = d_nextVal__;              // this line is added

    d_nextToken__ = _UNDETERMINED_;
}

    3. In bisonc++.cc modify the function void \@::executeAction(int
production) from:

void \@::executeAction(int production)
{
$insert 4 debug "executeAction(): of rule " << production << " ..."

    switch (production)

into:


void \@::executeAction(int production)
{
$insert 4 debug "executeAction(): of rule " << production << " ..."

    d_nextVal__ = d_val__;          // Save the semantic value that may
                                    // already have been retrieved by the next
                                    // token (which does not permit a
                                    // transition in a REQ_DEF state)
    switch (production)


This bug was brought to my attention by Dallas Clement.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.1 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages bisonc++ depends on:
ii  libbobcat1                    1.17.1-1   run-time (shared) Bobcat library
ii  libc6                         2.6.1-1+b1 GNU C Library: Shared libraries
ii  libgcc1                       1:4.2.1-4  GCC support library
ii  libstdc++6                    4.2.1-4    The GNU Standard C++ Library v3

bisonc++ recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to