mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
tests: formatting changes
* tests/javapush.at: here.
This commit is contained in:
@@ -273,8 +273,7 @@ input:
|
|||||||
|
|
||||||
line:
|
line:
|
||||||
'\n'
|
'\n'
|
||||||
| exp '\n'
|
| exp '\n' { System.out.println("total = "+$[]1); }
|
||||||
{System.out.println("total = "+$[]1);}
|
|
||||||
| error '\n'
|
| error '\n'
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -349,8 +348,8 @@ AT_DATA([Calc.y],[[/* Infix notation calculator--calc */
|
|||||||
%define api.parser.class {Calc}
|
%define api.parser.class {Calc}
|
||||||
|
|
||||||
%code {
|
%code {
|
||||||
static class UserLexer implements Calc.Lexer
|
static class UserLexer implements Calc.Lexer
|
||||||
{
|
{
|
||||||
StreamTokenizer st;
|
StreamTokenizer st;
|
||||||
StringReader rdr;
|
StringReader rdr;
|
||||||
|
|
||||||
@@ -382,21 +381,19 @@ static class UserLexer implements Calc.Lexer
|
|||||||
default: return st.ttype;
|
default: return st.ttype;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%code {
|
%code {
|
||||||
public static void main (String[] argv)
|
public static void main (String[] argv)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
StringReader reader = getinput(argv[0]);
|
StringReader reader = getinput(argv[0]);
|
||||||
UserLexer lexer = new UserLexer(reader);
|
UserLexer lexer = new UserLexer(reader);
|
||||||
Calc calc = new Calc(lexer);
|
Calc calc = new Calc(lexer);
|
||||||
calc.setDebugLevel(1);
|
calc.setDebugLevel(1);
|
||||||
calc.parse();
|
calc.parse();
|
||||||
}//main
|
}//main
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
]AT_CALC_BODY[
|
]AT_CALC_BODY[
|
||||||
@@ -676,14 +673,14 @@ AT_DATA([Calc.y],[[/* Infix notation calculator--calc. */
|
|||||||
%code { ]AT_JAVA_POSITION_DEFINE[ }
|
%code { ]AT_JAVA_POSITION_DEFINE[ }
|
||||||
|
|
||||||
%code {
|
%code {
|
||||||
public static void main (String[] argv)
|
public static void main (String[] argv)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
StringReader reader = getinput(argv[0]);
|
StringReader reader = getinput(argv[0]);
|
||||||
Calc calc = new Calc(reader);
|
Calc calc = new Calc(reader);
|
||||||
calc.setDebugLevel(1);
|
calc.setDebugLevel(1);
|
||||||
calc.parse();
|
calc.parse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]AT_CALC_BODY[
|
]AT_CALC_BODY[
|
||||||
|
|||||||
Reference in New Issue
Block a user