Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiangshan00001/oflex
it generate pure-c++ header file for lex parse. so that can run on any platform that has c++.
https://github.com/jiangshan00001/oflex
bison flex lex
Last synced: about 16 hours ago
JSON representation
it generate pure-c++ header file for lex parse. so that can run on any platform that has c++.
- Host: GitHub
- URL: https://github.com/jiangshan00001/oflex
- Owner: Jiangshan00001
- Created: 2015-08-10T14:28:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-28T11:03:01.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T04:47:37.258Z (over 1 year ago)
- Topics: bison, flex, lex
- Language: C++
- Homepage:
- Size: 2.81 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oflex
[![CMakematrix](https://github.com/Jiangshan00001/oflex/actions/workflows/cmake_matrix.yml/badge.svg?branch=master)](https://github.com/Jiangshan00001/oflex/actions/workflows/cmake_matrix.yml)
open flex.
parse lex file.output jump table/pure-cpp header file.
so that user can:
1. use it on any platform which support c++11.
2. use the jump table to add custom code.do what they want to do.
## how to use:
### download the exe from releases.
### run: oflex -i mylex.l -c my_lex_class -o my_output_header.h
to generate header filethen, in your c++ code:
```
#include "my_output_header.h"int main()
{
my_lex_class the_parse_class;
the_parse_class.set_file_name(file_to_parse);
auto tk = the_parse_class.yylex();
while(!tk.is_eof)
{
std::cout<<"got token: text="<