1 package org.simantics.scl.compiler.tests;
4 import java.io.StringReader;
7 import org.simantics.scl.compiler.internal.parsing.parser.SCLParser;
8 import org.simantics.scl.compiler.internal.parsing.parser.SCLParserImpl;
10 public class TestCommandParsing {
12 public void testCommandParsing() throws Exception {
13 Reader reader = new StringReader("import \"asdasd\";a = 1\nb = 2");
14 SCLParser parser = new SCLParserImpl(reader) {
16 protected Object reduceStatementCommand() {
17 System.out.println("statement " + get(0));
22 protected Object reduceImport() {
23 System.out.println("import " + get(0));
27 parser.parseCommands();