My Project was intended to develop a Visual Studio Code Snippets for syslog-ng configuration. For that purpose, grammar file that have yacc formatting were converted to xml files with bison. In the scope of project, graph database was created by using networkx library. Thanks to the Graph, a connection was established between each rule. I want to explain briefly, what I have done in each steps:
We found it appropriate to use graphs to find connections between rules. For the graph creation step, we first had to get the python object from the xml file. I used the "xml.etree.ElementTree" library for this process. We created a graph from the python object we created. In this process we used the networkx library. We have assigned each "lhs" value of the rules as a node. In addition, we have added the "symbol" values of each rule to graph as edge so we have established a link between the rules.