org.snapscript.parse.GrammarReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.parse;
import org.snapscript.common.io.PropertyReader;
public class GrammarReader extends PropertyReader {
public GrammarReader(String file) {
super(file);
}
@Override
protected boolean terminal(char value) {
return value == ';';
}
@Override
protected GrammarDefinition create(String name, char[] data, int off, int length, int line) {
String value = new String(data, off, length);
GrammarDefinition definition = new GrammarDefinition(name, value);
return definition;
}
}