Spaces:
Running
Running
File size: 2,539 Bytes
194c064 bb5b277 194c064 bb5b277 194c064 bb5b277 194c064 bb5b277 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
---
title: C-Cpp-Inspector
emoji: 🔍️©️/©️++💻
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.7.1
app_file: app.py
pinned: false
license: mit
---
# C/C++ Syntax and Features Inspector
This project analyzes C/C++ code to extract insights about syntax elements, memory management, and C++ specific features. The tool identifies primitive types, pointers, structs, control structures, memory operations, and C++ features like classes and templates, helping developers understand and improve their C/C++ code.
## Developer
Developed by Ramon Mayor Martins (2025)
- Email: [email protected]
- Homepage: https://rmayormartins.github.io/
- Twitter: @rmayormartins
- GitHub: https://github.com/rmayormartins
- Space: https://huggingface.co/rmayormartins
## Key Features
### Basic Analysis
- **Syntax Elements**:
- Detects primitive types and constants
- Identifies variable declarations
- Analyzes control structures (if/else, switch/case, loops)
- Tracks operators (arithmetic, logical, bitwise)
### C-Specific Features
- **Memory Management**:
- Tracks malloc/calloc/realloc usage
- Monitors memory freeing operations
- Analyzes memory operations (memcpy, memmove, etc.)
- **Data Structures**:
- Identifies pointers and multiple pointers
- Detects structs, unions, and enums
- Analyzes arrays and typedefs
### C++ Features
- **OOP Analysis**:
- Classes and objects
- Templates and namespaces
- Inheritance and polymorphism
- Member access specifiers
- **Modern C++**:
- STL usage detection
- Modern C++ features (auto, nullptr, etc.)
- References and operator overloading
## Interface Features
- Upload multiple ©️/©️++ files (.c, .cpp, .h, .hpp)
- Results organized in categorized tabs:
- File Information
- Basic Elements
- Pointers and Structures
- Control Flow
- Operators
- Input/Output
- Memory Management
- C++ Features
## How to Use
1. Open the application interface
2. Upload one or more C/C++ files
3. Click "Analisar Arquivos" (Analyze Files)
4. View detailed analysis in each category tab
## Installation
### Requirements
- Python 3.7+
- libclang
- gradio
### Local Development
To run locally:
```bash
# Install libclang (Ubuntu/Debian)
sudo apt-get install libclang-dev
# Install Python dependencies
pip install -r requirements.txt
# Run the application
python app.py
```
### Google Colab
To run in Google Colab:
```python
!apt-get update
!apt-get install -y libclang-dev
!pip install libclang gradio
```
## License
MIT License |