public GrammarRootAST parseGrammarFromString(String grammar) {
		return parse("<string>", new ANTLRStringStream(grammar));
	}
Try current dir then dir of g then lib dir
@param g
@param nameNode The node associated with the imported grammar name.
tool/src/org/antlr/v4/Tool.java