Created
March 15, 2015 02:28
-
-
Save fge/edf7727405a4319e179a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected Iterator<Object[]> parsingData() | |
| { | |
| final List<Object[]> list = new ArrayList<>(); | |
| String input; | |
| List<TokenType> tokens; | |
| input = "\"\""; | |
| tokens = Collections.<TokenType>singletonList(Strings.LITERAL); | |
| list.add(new Object[] { input, tokens }); | |
| input = "\"you have \" _ 4 _ \" horses\""; | |
| tokens = Arrays.<TokenType>asList(Strings.LITERAL, BinaryOps.STR_CONCAT, | |
| Numbers.LITERAL, BinaryOps.STR_CONCAT, Strings.LITERAL); | |
| list.add(new Object[] { input, tokens }); | |
| input = "32.00 _ (-+1E4_$CHAR(44))"; | |
| tokens = Arrays.<TokenType>asList(Numbers.LITERAL, BinaryOps.STR_CONCAT, | |
| Symbols.LPAREN, UnaryOps.MINUS, UnaryOps.PLUS, Numbers.LITERAL, | |
| BinaryOps.STR_CONCAT, Strings.LITERAL, Symbols.RPAREN); | |
| list.add(new Object[] { input, tokens }); | |
| return list.iterator(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment