https://github.com/nir3x/markuplanguageparser.cpp
MarkupLanguageParser.cpp - Simple C++ Parser for Markup Language
https://github.com/nir3x/markuplanguageparser.cpp
c-plus-plus cpp markup-language parser parsing tree-structure unit-testing
Last synced: about 1 month ago
JSON representation
MarkupLanguageParser.cpp - Simple C++ Parser for Markup Language
- Host: GitHub
- URL: https://github.com/nir3x/markuplanguageparser.cpp
- Owner: NIR3X
- License: agpl-3.0
- Created: 2024-02-22T16:08:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T07:19:52.000Z (almost 2 years ago)
- Last Synced: 2025-03-01T06:32:15.489Z (10 months ago)
- Topics: c-plus-plus, cpp, markup-language, parser, parsing, tree-structure, unit-testing
- Language: C++
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MarkupLanguageParser.cpp - Simple C++ Parser for Markup Language
This repository contains a simple markup language parser implemented in C++. It provides functionality to parse markup language input and construct a tree-like structure representing the parsed elements.
## Features
* Parses markup language input into a tree-like structure.
* Supports parsing of tags, attributes, and text content.
* Provides an easy-to-use interface for parsing markup language.
## Installation
To use this package, you can clone the repository and compile it using a C++ compiler:
```bash
git clone https://github.com/NIR3X/MarkupLanguageParser.cpp
cd MarkupLanguageParser.cpp
make
```
## Usage
To use the markup language parser, include the `MarkupLanguageParser.h` header file in your C++ project. Then, call the `Parse` function, passing the markup language input as a string. This function will return a vector of shared pointers to `CElement` objects, representing the root elements of the parsed tree.
```cpp
#include "MarkupLanguageParser.h"
int main() {
std::string input = "John Doe30";
auto roots = NSMarkupLanguageParser::Parse(input);
// Process parsed elements...
return 0;
}
```
## License
[](https://www.gnu.org/licenses/agpl-3.0.html)
This program is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.