Rust library to parse SystemVerilog / Verilog filelists, used in https://github.com/dalance/svlint https://crates.io/crates/sv-filelist-parser
Go to file
2020-02-02 13:42:24 +05:30
src Update Readme and cargo docs 2020-02-02 13:42:24 +05:30
testcase Add support for defines w/o args, i.e. without "=" 2020-01-30 21:44:45 +05:30
tests Change package name to verilog filelist parser and remove main.rs 2020-02-02 12:57:35 +05:30
.gitignore Basic crate structure 2020-01-20 22:13:01 +05:30
Cargo.lock Change package name to verilog filelist parser and remove main.rs 2020-02-02 12:57:35 +05:30
Cargo.toml Change package name to verilog filelist parser and remove main.rs 2020-02-02 12:57:35 +05:30
README.md Update Readme and cargo docs 2020-02-02 13:42:24 +05:30

Verilog Filelist Parser

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

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),
    };
}