@@ -0,0 +1,1851 @@
+package com.github.fge.grappa.run;%0A%0Aimport com.github.fge.grappa.Grappa;%0Aimport com.github.fge.grappa.parsers.BaseParser;%0Aimport com.github.fge.grappa.rules.Rule;%0Aimport com.github.fge.grappa.stack.ValueStack;%0Aimport com.google.common.base.Supplier;%0Aimport org.testng.annotations.Test;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic final class ValueStackResetTest%0A%7B%0A    private static final Object VALUE1 = new Object();%0A    private static final Object VALUE2 = new Object();%0A%0A    private static final Supplier%3CObject%3E SUPPLIER = new Supplier%3CObject%3E()%0A    %7B%0A        private boolean firstConsumed = false;%0A%0A        @Override%0A        public Object get()%0A        %7B%0A            if (firstConsumed)%0A                return VALUE2;%0A%0A            firstConsumed = true;%0A            return VALUE1;%0A        %7D%0A    %7D;%0A%0A    @SuppressWarnings(%22AutoBoxing%22)%0A    static class TestParser%0A        extends BaseParser%3CObject%3E%0A    %7B%0A        public Rule rule()%0A        %7B%0A            return sequence(ANY, push(SUPPLIER.get()));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void stackIsClearedBetweenParsingRuns()%0A    %7B%0A        final TestParser parser = Grappa.createParser(TestParser.class);%0A%0A        final ParseRunner%3CObject%3E runner%0A            = new ListeningParseRunner%3C%3E(parser.rule());%0A%0A        ParsingResult%3CObject%3E result;%0A        ValueStack%3CObject%3E stack;%0A        Object actual;%0A        Object expected;%0A%0A        result = runner.run(%22a%22);%0A        stack = result.getValueStack();%0A%0A        assertThat(stack).hasSize(1);%0A%0A        expected = VALUE1;%0A        actual = stack.peek();%0A%0A        assertThat(actual).isSameAs(expected);%0A%0A        result = runner.run(%22a%22);%0A        stack = result.getValueStack();%0A%0A        assertThat(stack).hasSize(1);%0A%0A        expected = VALUE2;%0A        actual = stack.peek();%0A%0A        assertThat(actual).isSameAs(expected);%0A    %7D%0A%7D%0A

Write test to reproduce issue #24