static PTElement ai_parseBottomUpToTree(S input) { final new AI_BottomUpParser1 parser; parser.parse(s); AI_BottomUpParser1.Word w = parser.fullGroup(); if (w == null) null; final L productions = ai_buParser_parseWeightedProductions(); ChooseCategory root = new(w, withoutQuoted(w.classes)); ai_parseTree_makeWeights(parser, productions, root); ai_parseTree_makeTotalWeights(root, 1); ret root; }