Crates.io | verilog-filelist-parser |
lib.rs | verilog-filelist-parser |
version | 0.1.2 |
source | src |
created_at | 2020-02-02 16:41:21.296987 |
updated_at | 2020-02-20 16:30:17.975559 |
description | A library to parse a Verilog Filelist and return a list of files, include directories and defines |
homepage | |
repository | https://github.com/Raamakrishnan/verilog-filelist-parser |
max_upload_size | |
id | 204247 |
size | 14,569 |
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.
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),
};
}