mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-12-22 21:35:49 +00:00
Migrate to new package name
This commit is contained in:
parent
8ee39041ee
commit
3d13767002
11
Cargo.toml
11
Cargo.toml
|
@ -1,11 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "verilog-filelist-parser"
|
name = "sv-filelist-parser"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
authors = ["Raamakrishnan <raamakrishnan1997@gmail.com>"]
|
edition = "2021"
|
||||||
edition = "2018"
|
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "A library to parse a Verilog Filelist and return a list of files, include directories and defines"
|
description = "A library to parse a SystemVerilog Filelist and return a list of files, include directories and defines"
|
||||||
repository = "https://github.com/Raamakrishnan/verilog-filelist-parser"
|
repository = "https://github.com/supleed2/sv-filelist-parser"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
categories = ["parser-implementations", "parsing", "development-tools"]
|
categories = ["parser-implementations", "parsing", "development-tools"]
|
||||||
keywords = ["verilog", "systemverilog", "filelist"]
|
keywords = ["verilog", "systemverilog", "filelist"]
|
||||||
|
|
15
README.md
15
README.md
|
@ -1,16 +1,17 @@
|
||||||
# Verilog Filelist Parser
|
# SystemVerilog Filelist Parser
|
||||||
|
|
||||||
A library in Rust to parse a Verilog Filelist and return
|
A library in Rust to parse a SystemVerilog Filelist and return
|
||||||
a list of files, include directories and defines.
|
a list of files, include directories and defines.
|
||||||
|
|
||||||
Environment variables represented with paranthesis or
|
Environment variables optionally enclosed in paranthesis or
|
||||||
curly braces (i.e. `$()` or `${}`) will be automatically
|
curly braces (i.e. `$`, `$()` or `${}`) will be automatically
|
||||||
substituted.
|
substituted.
|
||||||
|
|
||||||
# Example
|
## Example
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use verilog_filelist_parser;
|
use sv_filelist_parser;
|
||||||
let filelist = verilog_filelist_parser::parse_file("testcase/files.f")
|
let filelist = sv_filelist_parser::parse_file("testcase/files.f")
|
||||||
.expect("Cannot read filelist");
|
.expect("Cannot read filelist");
|
||||||
for file in filelist.files {
|
for file in filelist.files {
|
||||||
println!("{:?}", file);
|
println!("{:?}", file);
|
||||||
|
|
17
src/lib.rs
17
src/lib.rs
|
@ -1,16 +1,17 @@
|
||||||
//! # Verilog Filelist Parser
|
//! # SystemVerilog Filelist Parser
|
||||||
//!
|
//!
|
||||||
//! A library to parse a Verilog Filelist and return
|
//! A library in Rust to parse a SystemVerilog Filelist and return
|
||||||
//! a list of files, include directories and defines.
|
//! a list of files, include directories and defines.
|
||||||
//!
|
//!
|
||||||
//! Environment variables represented with paranthesis or
|
//! Environment variables optionally enclosed in paranthesis or
|
||||||
//! curly braces (i.e. `$()` or `${}`) will be automatically
|
//! curly braces (i.e. `$`, `$()` or `${}`) will be automatically
|
||||||
//! substituted.
|
//! substituted.
|
||||||
//!
|
//!
|
||||||
//! # Example
|
//! ## Example
|
||||||
//! ```
|
//!
|
||||||
//! use verilog_filelist_parser;
|
//! ```rust
|
||||||
//! let filelist = verilog_filelist_parser::parse_file("testcase/files.f")
|
//! use sv_filelist_parser;
|
||||||
|
//! let filelist = sv_filelist_parser::parse_file("testcase/files.f")
|
||||||
//! .expect("Cannot read filelist");
|
//! .expect("Cannot read filelist");
|
||||||
//! for file in filelist.files {
|
//! for file in filelist.files {
|
||||||
//! println!("{:?}", file);
|
//! println!("{:?}", file);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use verilog_filelist_parser;
|
use sv_filelist_parser;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn simple_test() {
|
fn simple_test() {
|
||||||
|
@ -13,7 +13,7 @@ fn simple_test() {
|
||||||
defines.insert("ENV_VAR3".to_string(), Some("var3".to_string()));
|
defines.insert("ENV_VAR3".to_string(), Some("var3".to_string()));
|
||||||
defines.insert("RTL".to_string(), None);
|
defines.insert("RTL".to_string(), None);
|
||||||
|
|
||||||
let filelist_exp = verilog_filelist_parser::Filelist {
|
let filelist_exp = sv_filelist_parser::Filelist {
|
||||||
files: vec![
|
files: vec![
|
||||||
PathBuf::from("testcase/file1.sv"),
|
PathBuf::from("testcase/file1.sv"),
|
||||||
PathBuf::from("testcase/file2.sv"),
|
PathBuf::from("testcase/file2.sv"),
|
||||||
|
@ -31,6 +31,6 @@ fn simple_test() {
|
||||||
std::env::set_var("VAR2", "ENV_VAR2");
|
std::env::set_var("VAR2", "ENV_VAR2");
|
||||||
std::env::set_var("VAR3", "ENV_VAR3");
|
std::env::set_var("VAR3", "ENV_VAR3");
|
||||||
|
|
||||||
let filelist = verilog_filelist_parser::parse_file("testcase/files.f").expect("Error parsing");
|
let filelist = sv_filelist_parser::parse_file("testcase/files.f").expect("Error parsing");
|
||||||
assert_eq!(filelist_exp, filelist);
|
assert_eq!(filelist_exp, filelist);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue