1 9 10 package org.netbeans.modules.languages.html; 11 12 13 import java.io.IOException ; 14 import java.io.InputStream ; 15 import java.util.List ; 16 import java.util.Map ; 17 import junit.framework.TestCase; 18 19 import org.netbeans.api.languages.ParseException; 20 import org.netbeans.api.languages.ParseException; 21 import org.netbeans.modules.languages.Language; 22 import org.netbeans.modules.languages.Language; 23 import org.netbeans.modules.languages.NBSLanguageReader; 24 import org.netbeans.modules.languages.NBSLanguageReader; 25 import org.netbeans.modules.languages.parser.AnalyserAnalyser; 26 import org.netbeans.modules.languages.parser.Petra; 27 28 29 33 public class NBSTest extends TestCase { 34 35 public NBSTest (String testName) { 36 super (testName); 37 } 38 39 public void testFirst () { 40 InputStream is = getClass ().getClassLoader ().getResourceAsStream ("org/netbeans/modules/languages/html/HTML.nbs"); 41 try { 42 Language l = NBSLanguageReader.readLanguage ("test", is, "test/html"); 43 List r = l.getAnalyser ().getRules (); 44 AnalyserAnalyser.printRules (r, null); 45 Map f = Petra.first2 (r); 46 AnalyserAnalyser.printF (f, null); 49 } catch (ParseException ex) { 50 ex.printStackTrace(); 51 } catch (IOException ex) { 52 ex.printStackTrace(); 53 } 54 } 55 } 56 | Popular Tags |