mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
java: lac: a stronger test for the exploratory stack
* tests/local.at (AT_YYLEX_DEFINE(java)): Fix overquoting issue. Style changes. * tests/regression.at (LAC: Exploratory stack): Run for lalr1.java too.
This commit is contained in:
@@ -1036,30 +1036,27 @@ m4_define([AT_YYLEX_DEFINE(java)],
|
||||
| yylex. |
|
||||
`--------*/
|
||||
|
||||
public String input = "]$1[";
|
||||
public String input = ]$1[;
|
||||
public int index = 0;
|
||||
public int yylex ()
|
||||
{
|
||||
if (index < input.length ())
|
||||
return input.charAt (index++);
|
||||
public int yylex() {
|
||||
if (index < input.length())
|
||||
return input.charAt(index++);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
public Object getLVal ()
|
||||
{
|
||||
]$2[;
|
||||
public Object getLVal() {
|
||||
]m4_ifval([$2], [$2], [return null])[;
|
||||
}
|
||||
]])
|
||||
|
||||
m4_define([AT_MAIN_DEFINE(java)],
|
||||
[[class input
|
||||
{
|
||||
public static void main (String[] args) throws IOException
|
||||
{
|
||||
]AT_API_prefix[Parser p = new ]AT_API_prefix[Parser ();
|
||||
boolean success = p.parse ();
|
||||
public static void main(String[] args) throws IOException {
|
||||
]AT_API_prefix[Parser p = new ]AT_API_prefix[Parser();
|
||||
boolean success = p.parse();
|
||||
if (!success)
|
||||
System.exit (1);
|
||||
System.exit(1);
|
||||
}
|
||||
}]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user