summaryrefslogtreecommitdiff
path: root/test/core/parser/stack/TokenStackTest.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-12 15:18:12 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:15 +0200
commitb7f89b4fa3dc15dbe0fa12a27b4d9167f41664f2 (patch)
treec9ccc6131c37c34a368009a9d3a8a1316333832d /test/core/parser/stack/TokenStackTest.cpp
parentae1b41524c89c29b47b189fd6741f3aeefeaeb50 (diff)
Add greedy flag to TokenDescriptor and SyntaxDescriptor and set it correctly. Shorten Stack "checkTokensAreUnambiguous" method
Diffstat (limited to 'test/core/parser/stack/TokenStackTest.cpp')
-rw-r--r--test/core/parser/stack/TokenStackTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/core/parser/stack/TokenStackTest.cpp b/test/core/parser/stack/TokenStackTest.cpp
index bca16ec..7393edc 100644
--- a/test/core/parser/stack/TokenStackTest.cpp
+++ b/test/core/parser/stack/TokenStackTest.cpp
@@ -30,18 +30,18 @@ static Rooted<Node> nd2{new Node(mgr)};
static Rooted<Node> nd3{new Node(mgr)};
static const std::vector<SyntaxDescriptor> ListA{
- SyntaxDescriptor(Tokens::Empty, 1, Tokens::Empty, nd1, 0),
- SyntaxDescriptor(2, Tokens::Empty, Tokens::Empty, nd2, 2),
- SyntaxDescriptor(3, Tokens::Empty, Tokens::Empty, nd3, 1)};
+ SyntaxDescriptor(Tokens::Empty, 1, Tokens::Empty, nd1, 0, true),
+ SyntaxDescriptor(2, Tokens::Empty, Tokens::Empty, nd2, 2, true),
+ SyntaxDescriptor(3, Tokens::Empty, Tokens::Empty, nd3, 1, true)};
static const std::vector<SyntaxDescriptor> ListB{
- SyntaxDescriptor(Tokens::Empty, 1, Tokens::Empty, nd1, -1),
- SyntaxDescriptor(2, Tokens::Empty, 3, nd3, 3),
+ SyntaxDescriptor(Tokens::Empty, 1, Tokens::Empty, nd1, -1, true),
+ SyntaxDescriptor(2, Tokens::Empty, 3, nd3, 3, true),
};
static const std::vector<SyntaxDescriptor> ListC{
- SyntaxDescriptor(Tokens::Empty, Tokens::Empty, 4, nd2, 5),
- SyntaxDescriptor(Tokens::Empty, Tokens::Empty, 3, nd3, 6),
+ SyntaxDescriptor(Tokens::Empty, Tokens::Empty, 4, nd2, 5, true),
+ SyntaxDescriptor(Tokens::Empty, Tokens::Empty, 3, nd3, 6, true),
};
TEST(TokenStack, tokens)