mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/lalr1.java: Capture the declarations as m4 macros to avoid duplication. When push parsing, the declarations occur at the class instance level rather than within the parse() function. Change the way that the parser state is initialized. For push-parsing, the parse state declarations are moved to "push_parse_initialize()", which is called on the first invocation of "push_parse()". The %initial-action code is also inserted after the invocation of "push_parse_initialize()". The body of the parse loop is modified to return values at appropriate points when doing push parsing. In order to make push parsing work, it is necessary to divide YYNEWSTATE into two states: YYNEWSTATE and YYGETTOKEN. On the first call to push_parse(), the state is YYNEWSTATE. On all later entries, the state is set to YYGETTOKEN. The YYNEWSTATE switch arm falls through into YYGETTOKEN. YYGETTOKEN indicates that a new token is potentially needed. Normally, with a pull parser, this new token would be obtained by calling "yylex()". In the push parser, the value YYMORE is returned to the caller. On the next call to push_parse(), the parser will return to the YYGETTOKEN state and continue operation. * tests/javapush.at: New test file for java push parsing. * tests/testsuite.at: Use it. * tests/local.mk: Adjust. * doc/bison.texi (Java Push Parser Interface): New. Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
81 lines
2.0 KiB
Plaintext
81 lines
2.0 KiB
Plaintext
# Test suite for GNU Bison. -*- Autotest -*-
|
|
|
|
# Copyright (C) 2000-2004, 2006-2007, 2009-2013 Free Software
|
|
# Foundation, Inc.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
# Testing resistance to user bugs.
|
|
m4_include([input.at])
|
|
|
|
# Testing named references.
|
|
m4_include([named-refs.at])
|
|
|
|
# Testing output file names.
|
|
m4_include([output.at])
|
|
|
|
# Testing skeleton support.
|
|
m4_include([skeletons.at])
|
|
|
|
# Testing the part of the engine that computes FOLLOW etc.
|
|
m4_include([sets.at])
|
|
|
|
# Testing grammar reduction.
|
|
m4_include([reduce.at])
|
|
|
|
# Testing conflicts detection and resolution.
|
|
m4_include([conflicts.at])
|
|
|
|
# Testing that #lines are correct.
|
|
m4_include([synclines.at])
|
|
|
|
# Testing that headers are sane.
|
|
m4_include([headers.at])
|
|
|
|
# Testing that user actions are properly performed.
|
|
m4_include([actions.at])
|
|
|
|
# Testing semantic types support.
|
|
m4_include([types.at])
|
|
|
|
# Fulling testing (compilation and execution of the parser) on calc.
|
|
m4_include([calc.at])
|
|
|
|
# Huge artificial grammars.
|
|
# Torturing the stack expansion at runtime.
|
|
m4_include([torture.at])
|
|
|
|
# Checking big, real world grammars.
|
|
m4_include([existing.at])
|
|
|
|
# Some old bugs.
|
|
m4_include([regression.at])
|
|
|
|
# Push parsing specific tests.
|
|
m4_include([push.at])
|
|
|
|
# Some C++ specific tests.
|
|
m4_include([c++.at])
|
|
|
|
# And some Java specific tests.
|
|
m4_include([java.at])
|
|
m4_include([javapush.at])
|
|
|
|
# GLR tests:
|
|
# C++ types, simplified
|
|
m4_include([cxx-type.at])
|
|
# Regression tests
|
|
m4_include([glr-regression.at])
|