From: <geo...@st...> - 2007-03-02 16:46:07
|
Holaz This is one of my first postings to this ML. I'm georg and am currently working on my master thesis. I try to figure out if there is a convenient way to parse jape(CPSL) grammars, modify them "in memory" and write the results again to a textfile. Currently I'm trying to do this: [code] URL japeFile = getClass().getResource("/url.jape"); ParseCpsl cpslParser = Factory.newJapeParser(japeFile, "ISO-8859-1"); SinglePhaseTransducer transducer = cpslParser.SinglePhaseTransducer(); PrioritisedRuleList ruleList = transducer.getRules(); ... do something with the transducer/Rules/fsm .... transducer.finish(); ... write changes to textfile again ...??? [/code] Anyhow, I wonder if this is a good thing to do. I have to somehow modify the jape rules. Does anybody know if ... -> there is a convenient way to rewrite the "RuleObjects" again to textfiles? -> the grammar stays the same for future gate versions? Thanks for any help, Georg |