1 /*******************************************************************************
\r
2 * Copyright (c) 2007- VTT Technical Research Centre of Finland.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.express;
\r
13 import java.io.File;
\r
14 import java.io.FileInputStream;
\r
15 import java.io.InputStream;
\r
17 import org.simantics.express.parser.ExpressParser;
\r
19 public class TestExpress {
\r
21 public static void parse(File file) {
\r
23 System.out.println("Parse " + file);
\r
25 InputStream stream = new FileInputStream(file);
\r
26 ExpressParser parser = new ExpressParser(stream);
\r
28 } catch(Exception e) {
\r
29 e.printStackTrace();
\r
33 public static void browse(File dir) {
\r
34 for(File f : dir.listFiles())
\r
37 else if(f.getName().endsWith(".exp"))
\r
41 public static void main(String[] args) {
\r
43 browse(new File("c:\\Documents and Settings\\Hannu\\My Documents\\express"));
\r
44 } catch (Exception e) {
\r
45 // TODO Auto-generated catch block
\r
46 e.printStackTrace();
\r