vickenty/lang-c
소개
Lightweight C parser for Rust
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +3
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalLang-C
Ligtweight parser of C language for Rust users. Almost full support for C11 revision of the language. Several GCC and Clang extensions are also supported as an option.
extern crate lang_c;
use lang_c::driver::{Config, parse};
fn main() {
let config = Config::default();
println!("{:?}", parse(&config, "example.c"));
}
Bugs
Just open an issue, bug reports and patches are most welcome.
License
Dual-licenced under Apache 2.0 or MIT licenses (see LICENSE-APACHE and LICENSE-MIT for legal terms).
Development
A number of external tools are used during development:
- GNU make
- rustfmt
- rust-peg 0.5.4
Parser (src/parser.rs) is built from a PEG grammar in grammar.rustpeg. It is updated manually and then
committed, not generated on every build, thus no rust-peg in the list of dependencies.
For debugging purposes, it is handy to have a version rust-peg built with tracing enabled.
A makefile is used to script the development process:
makeupdate parser, build the library and run the tests;make tracerebuilds parser usingrust-peg-trace, which is expected to be a version ofrust-pegcommand withtracefeature enabledmake checkcan be used as pre-commit git hook to make sure parser is up to date
관련 프로젝트 살펴보기
불러오는 중…