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-12 15:53:18 +00:00
.github/workflows Update package metadata. Add license. Fix github actions 2020-02-02 14:28:10 +05:30
src Parse lines starting with # as comments 2022-05-12 15:53:18 +00:00
testcase Parse lines starting with # as comments 2022-05-12 15:53:18 +00:00
tests Change package name to verilog filelist parser and remove main.rs 2020-02-02 12:57:35 +05:30
.gitignore Added Cargo.lock to .gitignore 2022-02-20 23:20:56 +05:30
Cargo.toml Bump version to 0.1.2 2020-02-20 21:50:42 +05:30
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 better support Path and str in parse_file args 2020-02-07 21:35:09 +05:30

Verilog Filelist Parser

A library in Rust to parse a Verilog Filelist and return a list of files, include directories and defines.

Environment variables represented with paranthesis or curly braces (i.e. $() or ${}) will be automatically substituted.

Example

use verilog_filelist_parser;
let filelist = verilog_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),
    };
}