Rust library to parse SystemVerilog / Verilog filelists, used in https://github.com/dalance/svlint https://crates.io/crates/sv-filelist-parser
Go to file
2022-05-16 16:53:07 +01:00
.github/workflows Update package metadata. Add license. Fix github actions 2020-02-02 14:28:10 +05:30
src Migrate to new package name 2022-05-12 16:19:15 +00:00
testcase Add support for env vars without braces or parentheses 2022-05-12 16:03:27 +00:00
tests Migrate to new package name 2022-05-12 16:19:15 +00:00
.gitignore Added Cargo.lock to .gitignore 2022-02-20 23:20:56 +05:30
Cargo.toml Migrate to new package name 2022-05-12 16:19:15 +00:00
CHANGELOG.md Bump version to 0.1.2 2020-02-20 21:50:42 +05:30
LICENSE Update package metadata. Add license. Fix github actions 2020-02-02 14:28:10 +05:30
README.md Minor update of spelling/grammar in README. 2022-05-16 16:53:07 +01:00

SystemVerilog Filelist Parser

A Rust library to parse a SystemVerilog Filelist and return lists of files, include directories, and preprocessor macro definitions.

Environment variables, optionally enclosed in parenthesis or curly braces (e.g. $FOO, $(FOO) or ${FOO}), will be substituted.

Example

use sv_filelist_parser;
let filelist = sv_filelist_parser::parse_file("testcase/files.f")
    .expect("Cannot read filelist");
for file in filelist.files {
    println!("{:?}", file);
}
for incdir in filelist.incdirs {
    println!("{:?}", incdir);
}
for (d, t) in filelist.defines {
    match t {
        None => println!("{:?}", d),
        Some(te) => println!("{:?}={:?}", d, te),
    };
}