use of priv.bajdcc.LL1.syntax.stringify.SyntaxToString in project jMiniLang by bajdcc.
the class Syntax method getSingleString.
/**
* 获得单一产生式描述
*
* @param name
* 非终结符名称
* @param exp
* 表达式树
* @param focused
* 焦点
* @param front
* 前向
* @return 原产生式描述
*/
public static String getSingleString(String name, ISyntaxComponent exp, ISyntaxComponent focused, boolean front) {
StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(" -> ");
SyntaxToString alg = new SyntaxToString(focused, front);
exp.visit(alg);
sb.append(alg.toString());
return sb.toString();
}
use of priv.bajdcc.LL1.syntax.stringify.SyntaxToString in project jMiniLang by bajdcc.
the class Syntax method getSingleString.
/**
* 获得单一产生式描述
*
* @param name
* 非终结符名称
* @param exp
* 表达式树
* @param focused
* 焦点
* @param front
* 前向
* @return 原产生式描述
*/
public static String getSingleString(String name, ISyntaxComponent exp, ISyntaxComponent focused, boolean front) {
StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(" -> ");
SyntaxToString alg = new SyntaxToString(focused, front);
exp.visit(alg);
sb.append(alg.toString());
return sb.toString();
}
use of priv.bajdcc.LL1.syntax.stringify.SyntaxToString in project jMiniLang by bajdcc.
the class Syntax method getSingleString.
/**
* 获得单一产生式描述
*
* @param name
* 非终结符名称
* @param exp
* 表达式树
* @return 原产生式描述
*/
public static String getSingleString(String name, ISyntaxComponent exp) {
StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(" -> ");
SyntaxToString alg = new SyntaxToString();
exp.visit(alg);
sb.append(alg.toString());
return sb.toString();
}
use of priv.bajdcc.LL1.syntax.stringify.SyntaxToString in project jMiniLang by bajdcc.
the class Syntax method getSingleString.
/**
* 获得单一产生式描述
*
* @param name
* 非终结符名称
* @param exp
* 表达式树
* @return 原产生式描述
*/
public static String getSingleString(String name, ISyntaxComponent exp) {
StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(" -> ");
SyntaxToString alg = new SyntaxToString();
exp.visit(alg);
sb.append(alg.toString());
return sb.toString();
}
Aggregations