From: Jomi H. <jom...@gm...> - 2023-06-19 13:25:51
|
Hi Burak, the parser we use is JacaCC. I do not remember if the syntactic tree is available (I worked on it long time ago :-). You find the grammar at src/main/javacc but it is quite easy to use the current parser and then inspect the result. import jason.asSyntax.parser.* ... as2j parser = new as2j(<some input stream>); // creates the parser for some source Agent ag = new Agent() parser.agent(ag); it parsers the source and place everything at Agent (initial beliefs, goals and plans) You can then inspect the plan library of ‘ag’ to get the plans. HTH, Jomi > On 18 Jun 2023, at 16:59, Burak Karaduman <bbu...@gm...> wrote: > > Dear all, > > Is it possible to access ANTLR compiler tree of the Jason? I need to parse the .asl file syntax and re-use the result. > > Thank you so much. > > Best regards. > > -- > Burak KARADUMAN, > Ph.D. Student at the University of Antwerp & Flanders Make, Modeling Intelligent Complex Software & Systems (MICSS-Lab), > G236, Department of Computer Science, Faculty of Science, Campus Middelheim, > Middelheimlaan 1, 2020 Antwerp, Belgium > > _______________________________________________ > Jason-users mailing list > Jas...@li... > https://lists.sourceforge.net/lists/listinfo/jason-users |