SkillAgentSearch skills...

CodeParser

Parse code using antlr.

Install / Use

/learn @victor-wiki/CodeParser
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

CodeParser

Parse code using antlr.

  • The lexer and parser classes in CodeParser are generated by Antlr grammar file.
  • The CodeParser.Test demonstrates how to parse source code file to extract class and interface with their properties and methods.
  • The CodeParser.Viewer is a visual tool to analyse the parser rules.

Example

Python

  • source code
#!/usr/bin/python3
 
class HelloWorld():   
    owner = ""
    target = ""
    def sayHello(self, word):
        print(word)

x = HelloWorld() 

x.sayHello("Hello")
  • parser test output
Class:HelloWorld
{
Field:owner
Field:target
Method:sayHello
}

Viewer

CodePaser Viewer

CodePaser Viewer

Use Case

The library SqlAnalyser.Core of DatabaseManager project uses the TSqlParser, MySqlParser, PlSqlParser and PostgreSqlParser to parse and translate view, function, procedure and table trigger between SqlServer, MySql, Oracle and Postgres.

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated8mo ago
Forks6

Languages

C#

Security Score

72/100

Audited on Jul 12, 2025

No findings