File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Assignment2/src/com/company Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public static List<Token> analyse(String sourceCode) throws LexicalException {
3737 String s = furtherSplitList .get (i );
3838 if (s .length () > 0 ) {
3939 try {
40+ System .out .println (s );
4041 if (i > 0 && furtherSplitList .get (i - 1 ).matches ("\" " )) {
4142 tokenList .add (tokenTypeStringLit (s ).get ());
4243 } else if (i > 0 && furtherSplitList .get (i - 1 ).matches ("'" )) {
@@ -55,7 +56,8 @@ public static List<Token> analyse(String sourceCode) throws LexicalException {
5556 } else {tokenList .add (tokenFromString (s ).get ()); }
5657 } catch (NoSuchElementException e ) {
5758 // tokenList.add(Optional.empty());
58- System .out .print ("Token not found: " + e + "\n " );
59+ // System.out.print("Token not found: " + e + "\n");
60+ throw new LexicalException ("Token not found: " + e );
5961 } catch (Exception e ) {
6062 System .out .print (e );
6163 }
You can’t perform that action at this time.
0 commit comments