Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexandru Dura
SPPF Earley Parser
Commits
9ca28de4
Commit
9ca28de4
authored
Jan 27, 2020
by
Alexandru Dura
Browse files
Add another Java test
parent
c7d9dbf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/EarleyParserTest.java
View file @
9ca28de4
...
...
@@ -137,4 +137,26 @@ public class EarleyParserTest {
assertTrue
(
parser
.
recognize
(
str
,
Java14Grammar
.
n_statement
));
}
@Test
public
void
testJava2
()
{
Grammar
g
=
new
Grammar
();
Java14Grammar
.
addRules
(
g
);
EarleyParser
parser
=
new
EarleyParser
(
g
);
Category
str
[]
=
{
Java14Grammar
.
t_CLASS
,
Java14Grammar
.
t_IDENTIFIER
,
Java14Grammar
.
t_LBRACE
,
Java14Grammar
.
t_METAVARID
,
Java14Grammar
.
t_METAVARID
,
Java14Grammar
.
t_LPAREN
,
Java14Grammar
.
t_RPAREN
,
Java14Grammar
.
t_LBRACE
,
Java14Grammar
.
t_GAP
,
Java14Grammar
.
t_RBRACE
,
Java14Grammar
.
t_RBRACE
};
assertTrue
(
parser
.
recognize
(
str
,
Java14Grammar
.
n_class_declaration
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment