org.kotemaru.util.jsg
クラス JsgParser
java.lang.Object
org.kotemaru.util.jsg.ParserBase
org.kotemaru.util.jsg.JsgParser
public class JsgParser
- extends ParserBase
Main ::= [Properties] {Define}...;
Properties ::= "$PROPERTIES" JavaCode "$END";
Define ::=
"$DEFINE" "(" DefineName ["(" CallParam ["," CallParam]... ")"] ")"
[Statement]...
"$END";
DefineName ::= Identfier;
Identfier ::= // "[a-z][a-zA-Z0-9_]*"
Statement ::=
For | If | Switch | Value | Variable | Call | JavaCode | Commnet | Error;
For ::= "$FOR" "(" XPath ")" [Statement]... "$END";
If ::= "$IF" "(" XPath ")" [Statement]... [$ELSE [Statement]...] "$END";
Switch ::= "$SWITCH" "(" XPath ")" Case... [Default] "$END"
Case ::= "$CASE" "(" XPath ")" [Statement]... "$END"
Default ::= "$DEFAULT" [Statement]... "$END"
Value ::= "$(" XPath ")";
Variable ::= "$VAR" "(" CallParam ")";
Error ::= "$ERROR" "(" Identfier ")";
Call ::= "$" DefineName "(" CallParam ["," CallParam]... ")";
CallParam ::= Identfier "=" XPath;
Comment ::= /^#.*\r?\n/;
XPath ::= XPath文字列;
JavaCode :: javaコード文字列;
クラス org.kotemaru.util.jsg.ParserBase から継承されたメソッド |
getDebugString, isAlpha, isDebug, isNumber, next, pSpace, pToken, pToken, pToken, pToken, rollbackStr, setDebug |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsgParser
public JsgParser(Source src)
throws java.io.IOException
- 例外:
java.io.IOException
getString
public java.lang.String getString()
parse
public JsgParser.Result parse()
getLastRollback
public java.lang.Exception getLastRollback()
skipSpace
protected void skipSpace()
- オーバーライド:
- クラス
ParserBase
内の skipSpace
Copyright © 2009 kotemaru.