1 package kawa.lang; 2 import java.io.*; 3 4 6 7 public class SyntaxRule extends SyntaxTemplate implements Externalizable 8 { 9 SyntaxPattern pattern; 10 11 public SyntaxRule () 12 { 13 } 14 15 public SyntaxRule (SyntaxPattern pattern, 16 String pattern_nesting, 17 String template_program, 18 Object [] literal_values, 19 int max_nesting) 20 { 21 super(pattern_nesting, template_program, literal_values, max_nesting); 22 this.pattern = pattern; 23 } 24 25 public SyntaxRule (SyntaxPattern pattern, 26 Object template, 27 SyntaxForm template_syntax, 28 Translator tr) 29 { 30 super(template, template_syntax, tr); 31 this.pattern = pattern; 32 } 33 34 public void writeExternal(ObjectOutput out) throws IOException 35 { 36 out.writeObject(pattern); 37 super.writeExternal(out); 38 } 39 40 public void readExternal(ObjectInput in) 41 throws IOException, ClassNotFoundException 42 { 43 pattern = (SyntaxPattern) in.readObject(); 44 super.readExternal(in); 45 } 46 } 47 | Popular Tags |