# Tree-sitter PL/SQL IFS
🚀 **High-performance parser for IFS Cloud PL/SQL variant**
**Status**: ✅ **100% success rate** on entire IFS Cloud codebase (9,748 files)
## Quick Start
```bash
# 1. Clone and setup
git clone <repository>
cd ifs-parser/grammars/ifs-cloud-parser
# 2. Generate grammar
npm run generate
# 3. Run tests
npm test
npm run full-codebase-test
# 4. Package for your language
npm run package python # Creates Python wheel
npm run package node # Creates Node.js package
npm run package csharp # Creates C# package
npm run package all # Creates all packages
```
That's it! 🎉
## What You Get
### Python Package (`npm run package python`)
```
dist/
├── ifs_cloud_parser-0.1.0-py3-none-any.whl # Ready to install
└── python/ # Source package
├── setup.py # Build config
├── pyproject.toml # Modern Python config
├── binding.cc # C++ binding
├── src/parser.c # Generated parser
├── src/tree_sitter/parser.h # Headers
└── README.md # Usage instructions
```
**Install anywhere:**
```bash
pip install ifs_cloud_parser-0.1.0-py3-none-any.whl
```
**Use immediately:**
```python
import ifs_cloud_parser
from tree_sitter import Language, Parser
# Create language and parser (tree-sitter 0.25.0)
language = Language(ifs_cloud_parser.language())
parser = Parser(language)
# Parse IFS Cloud PL/SQL code
code = b"PROCEDURE Test___ IS BEGIN NULL; END;"
tree = parser.parse(code)
# Explore the syntax tree
print(tree.root_node.sexp())
print(f"Root node type: {tree.root_node.type}")
print(f"Child count: {tree.root_node.child_count}")
```
## Features
- ✅ **100% compatibility** with IFS Cloud codebase
- 🚀 **Ultra-fast** parsing with Tree-sitter
- 📦 **Simple packaging** - one command creates distributable packages
- 🔧 **Auto-dependency handling** - installs required build tools
- 🎯 **Clean output** - flat directory structure, ready to use
- 🔄 **Multiple languages** - Python, Node.js, C# support
## Architecture
The parser supports:
- Complete IFS Cloud PL/SQL variant syntax
- IFS-specific annotations and pragmas
- Advanced expression handling
- EXTRACT function and built-ins
- Comprehensive error recovery
## Development
```bash
# Generate grammar from grammar.js
npm run generate
# Run grammar tests
npm test
# Test against full IFS codebase
npm run full-codebase-test
# Clean build artifacts
npm run clean
```
## Package Structure
Each language package includes:
- **Generated parser** (`src/parser.c`) - The core Tree-sitter parser
- **Headers** (`src/tree_sitter/parser.h`) - Tree-sitter interface
- **Metadata** (`grammar.json`, `node-types.json`) - Grammar definitions
- **Language bindings** - Native interface for target language
- **Build configuration** - Ready-to-build package structure
- **Usage examples** - Complete documentation
## Requirements
- **Node.js** 16+ (for grammar generation and packaging)
- **Python** 3.8+ (for Python packages)
- **C++ compiler** (for building native extensions)
The packaging script automatically installs language-specific build dependencies.
---
**Built for IFS Cloud development** - This parser has been tested and validated on the complete IFS Cloud codebase, ensuring maximum compatibility and reliability.
Raw data
{
"_id": null,
"home_page": null,
"name": "ifs-cloud-parser",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "incremental, parsing, tree-sitter, ifs-cloud-parser",
"author": null,
"author_email": "Sindre van der Linden <sindre@apply.no>",
"download_url": "https://files.pythonhosted.org/packages/76/c1/c27bbd0b619d373e9aeae03bbbc223c0a18dc50b4482306311f9401a9eff/ifs_cloud_parser-0.3.0.tar.gz",
"platform": null,
"description": "# Tree-sitter PL/SQL IFS\n\n\ud83d\ude80 **High-performance parser for IFS Cloud PL/SQL variant**\n\n**Status**: \u2705 **100% success rate** on entire IFS Cloud codebase (9,748 files)\n\n## Quick Start\n\n```bash\n# 1. Clone and setup\ngit clone <repository>\ncd ifs-parser/grammars/ifs-cloud-parser\n\n# 2. Generate grammar\nnpm run generate\n\n# 3. Run tests\nnpm test\nnpm run full-codebase-test\n\n# 4. Package for your language\nnpm run package python # Creates Python wheel\nnpm run package node # Creates Node.js package\nnpm run package csharp # Creates C# package\nnpm run package all # Creates all packages\n```\n\nThat's it! \ud83c\udf89\n\n## What You Get\n\n### Python Package (`npm run package python`)\n\n```\ndist/\n\u251c\u2500\u2500 ifs_cloud_parser-0.1.0-py3-none-any.whl # Ready to install\n\u2514\u2500\u2500 python/ # Source package\n \u251c\u2500\u2500 setup.py # Build config\n \u251c\u2500\u2500 pyproject.toml # Modern Python config\n \u251c\u2500\u2500 binding.cc # C++ binding\n \u251c\u2500\u2500 src/parser.c # Generated parser\n \u251c\u2500\u2500 src/tree_sitter/parser.h # Headers\n \u2514\u2500\u2500 README.md # Usage instructions\n```\n\n**Install anywhere:**\n\n```bash\npip install ifs_cloud_parser-0.1.0-py3-none-any.whl\n```\n\n**Use immediately:**\n\n```python\nimport ifs_cloud_parser\nfrom tree_sitter import Language, Parser\n\n# Create language and parser (tree-sitter 0.25.0)\nlanguage = Language(ifs_cloud_parser.language())\nparser = Parser(language)\n\n# Parse IFS Cloud PL/SQL code\ncode = b\"PROCEDURE Test___ IS BEGIN NULL; END;\"\ntree = parser.parse(code)\n\n# Explore the syntax tree\nprint(tree.root_node.sexp())\nprint(f\"Root node type: {tree.root_node.type}\")\nprint(f\"Child count: {tree.root_node.child_count}\")\n```\n\n## Features\n\n- \u2705 **100% compatibility** with IFS Cloud codebase\n- \ud83d\ude80 **Ultra-fast** parsing with Tree-sitter\n- \ud83d\udce6 **Simple packaging** - one command creates distributable packages\n- \ud83d\udd27 **Auto-dependency handling** - installs required build tools\n- \ud83c\udfaf **Clean output** - flat directory structure, ready to use\n- \ud83d\udd04 **Multiple languages** - Python, Node.js, C# support\n\n## Architecture\n\nThe parser supports:\n\n- Complete IFS Cloud PL/SQL variant syntax\n- IFS-specific annotations and pragmas\n- Advanced expression handling\n- EXTRACT function and built-ins\n- Comprehensive error recovery\n\n## Development\n\n```bash\n# Generate grammar from grammar.js\nnpm run generate\n\n# Run grammar tests\nnpm test\n\n# Test against full IFS codebase\nnpm run full-codebase-test\n\n# Clean build artifacts\nnpm run clean\n```\n\n## Package Structure\n\nEach language package includes:\n\n- **Generated parser** (`src/parser.c`) - The core Tree-sitter parser\n- **Headers** (`src/tree_sitter/parser.h`) - Tree-sitter interface\n- **Metadata** (`grammar.json`, `node-types.json`) - Grammar definitions\n- **Language bindings** - Native interface for target language\n- **Build configuration** - Ready-to-build package structure\n- **Usage examples** - Complete documentation\n\n## Requirements\n\n- **Node.js** 16+ (for grammar generation and packaging)\n- **Python** 3.8+ (for Python packages)\n- **C++ compiler** (for building native extensions)\n\nThe packaging script automatically installs language-specific build dependencies.\n\n---\n\n**Built for IFS Cloud development** - This parser has been tested and validated on the complete IFS Cloud codebase, ensuring maximum compatibility and reliability.\n",
"bugtrack_url": null,
"license": null,
"summary": "Parses the IFS Cloud source code, including nested SQL support.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/graknol/ifs-parser"
},
"split_keywords": [
"incremental",
" parsing",
" tree-sitter",
" ifs-cloud-parser"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "76c1c27bbd0b619d373e9aeae03bbbc223c0a18dc50b4482306311f9401a9eff",
"md5": "05c1142d24d66d82c4f596c0884a7923",
"sha256": "7d8f3f3519c99fe600d77465fce800af7b10a40e43d91bf54a16eb9b5a1812bb"
},
"downloads": -1,
"filename": "ifs_cloud_parser-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "05c1142d24d66d82c4f596c0884a7923",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 143135,
"upload_time": "2025-08-24T19:09:16",
"upload_time_iso_8601": "2025-08-24T19:09:16.408427Z",
"url": "https://files.pythonhosted.org/packages/76/c1/c27bbd0b619d373e9aeae03bbbc223c0a18dc50b4482306311f9401a9eff/ifs_cloud_parser-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-24 19:09:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "graknol",
"github_project": "ifs-parser",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ifs-cloud-parser"
}