Fix compile error
This commit is contained in:
parent
929adf4a1f
commit
4b4b78be49
@ -1 +1,2 @@
|
||||
#![recursion_limit = "128"]
|
||||
pub mod parser;
|
||||
|
@ -3,12 +3,18 @@ pub mod declarations;
|
||||
pub mod expressions;
|
||||
pub mod general;
|
||||
pub mod instantiations;
|
||||
pub mod primitive_instances;
|
||||
pub mod source_text;
|
||||
pub mod specify_section;
|
||||
pub mod udp_declaration_and_instantiation;
|
||||
pub mod utils;
|
||||
pub use behavioral_statements::*;
|
||||
pub use declarations::*;
|
||||
pub use expressions::*;
|
||||
pub use general::*;
|
||||
pub use instantiations::*;
|
||||
pub use primitive_instances::*;
|
||||
pub use source_text::*;
|
||||
pub use specify_section::*;
|
||||
pub use udp_declaration_and_instantiation::*;
|
||||
pub use utils::*;
|
||||
|
@ -3,7 +3,6 @@ use nom::branch::*;
|
||||
use nom::bytes::complete::*;
|
||||
use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::multi::*;
|
||||
use nom::sequence::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
|
2
src/parser/primitive_instances/mod.rs
Normal file
2
src/parser/primitive_instances/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod primitive_instantiation_and_instances;
|
||||
pub use primitive_instantiation_and_instances::*;
|
@ -0,0 +1,18 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GateInstantiation<'a> {
|
||||
pub nodes: (Identifier<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn gate_instantiation(s: &str) -> IResult<&str, GateInstantiation> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
@ -6,6 +6,7 @@ pub mod interface_items;
|
||||
pub mod library_source_text;
|
||||
pub mod module_items;
|
||||
pub mod module_parameters_and_ports;
|
||||
pub mod package_items;
|
||||
pub mod program_items;
|
||||
pub mod system_verilog_source_text;
|
||||
pub use checker_items::*;
|
||||
@ -16,5 +17,6 @@ pub use interface_items::*;
|
||||
pub use library_source_text::*;
|
||||
pub use module_items::*;
|
||||
pub use module_parameters_and_ports::*;
|
||||
pub use package_items::*;
|
||||
pub use program_items::*;
|
||||
pub use system_verilog_source_text::*;
|
||||
|
68
src/parser/source_text/package_items.rs
Normal file
68
src/parser/source_text/package_items.rs
Normal file
@ -0,0 +1,68 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum PackageItem<'a> {
|
||||
PackageOrGenerateItemDeclaration(PackageOrGenerateItemDeclaration<'a>),
|
||||
AnonymousProgram(AnonymousProgram<'a>),
|
||||
PackageExportDeclaration(PackageExportDeclaration<'a>),
|
||||
TimeunitsDeclaration(TimeunitsDeclaration<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum PackageOrGenerateItemDeclaration<'a> {
|
||||
NetDeclaration(NetDeclaration<'a>),
|
||||
DataDeclaration(DataDeclaration<'a>),
|
||||
TaskDeclaration(TaskDeclaration<'a>),
|
||||
FunctionDeclaration(FunctionDeclaration<'a>),
|
||||
CheckerDeclaration(CheckerDeclaration<'a>),
|
||||
DpiImportExport(DpiImportExport<'a>),
|
||||
ExternConstraintDeclaration(ExternConstraintDeclaration<'a>),
|
||||
ClassDeclaration(ClassDeclaration<'a>),
|
||||
ClassConstructorDeclaration(ClassConstructorDeclaration<'a>),
|
||||
LocalParameterDeclaration(LocalParameterDeclaration<'a>),
|
||||
ParameterDeclaration(ParameterDeclaration<'a>),
|
||||
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
||||
AssertionItemDeclaration(AssertionItemDeclaration<'a>),
|
||||
Empty,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct AnonymousProgram<'a> {
|
||||
pub nodes: (Vec<AnonymousProgramItem<'a>>,),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum AnonymousProgramItem<'a> {
|
||||
TaskDeclaration(TaskDeclaration<'a>),
|
||||
FunctionDeclaration(FunctionDeclaration<'a>),
|
||||
ClassDeclaration(ClassDeclaration<'a>),
|
||||
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
||||
ClassConstructorDeclaration(ClassConstructorDeclaration<'a>),
|
||||
Empty,
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn package_item(s: &str) -> IResult<&str, PackageItem> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn package_or_generate_item_declaration(
|
||||
s: &str,
|
||||
) -> IResult<&str, PackageOrGenerateItemDeclaration> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn anonymous_program(s: &str) -> IResult<&str, AnonymousProgram> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn anonymous_program_item(s: &str) -> IResult<&str, AnonymousProgramItem> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
4
src/parser/specify_section/mod.rs
Normal file
4
src/parser/specify_section/mod.rs
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod specify_block_declaration;
|
||||
pub mod specify_block_terminals;
|
||||
pub use specify_block_declaration::*;
|
||||
pub use specify_block_terminals::*;
|
18
src/parser/specify_section/specify_block_declaration.rs
Normal file
18
src/parser/specify_section/specify_block_declaration.rs
Normal file
@ -0,0 +1,18 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SpecifyBlock<'a> {
|
||||
pub nodes: (Identifier<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn specify_block(s: &str) -> IResult<&str, SpecifyBlock> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
61
src/parser/specify_section/specify_block_terminals.rs
Normal file
61
src/parser/specify_section/specify_block_terminals.rs
Normal file
@ -0,0 +1,61 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SpecifyInputTerminalDescriptor<'a> {
|
||||
pub nodes: (InputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SpecifyOutputTerminalDescriptor<'a> {
|
||||
pub nodes: (OutputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum InputIdentifier<'a> {
|
||||
InputPortIdentifier(InputPortIdentifier<'a>),
|
||||
InoutPortIdentifier(InoutPortIdentifier<'a>),
|
||||
Interface(InputIdentifierInterface<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct InputIdentifierInterface<'a> {
|
||||
pub nodes: (InterfaceIdentifier<'a>, PortIdentifier<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum OutputIdentifier<'a> {
|
||||
OutputPortIdentifier(OutputPortIdentifier<'a>),
|
||||
InoutPortIdentifier(InoutPortIdentifier<'a>),
|
||||
Interface(OutputIdentifierInterface<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct OutputIdentifierInterface<'a> {
|
||||
pub nodes: (InterfaceIdentifier<'a>, PortIdentifier<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn specify_input_terminal_descriptor(s: &str) -> IResult<&str, SpecifyInputTerminalDescriptor> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn specify_output_terminal_descriptor(
|
||||
s: &str,
|
||||
) -> IResult<&str, SpecifyOutputTerminalDescriptor> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn input_identifier(s: &str) -> IResult<&str, InputIdentifier> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
||||
|
||||
pub fn output_identifier(s: &str) -> IResult<&str, OutputIdentifier> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
4
src/parser/udp_declaration_and_instantiation/mod.rs
Normal file
4
src/parser/udp_declaration_and_instantiation/mod.rs
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod udp_declaration;
|
||||
pub mod udp_instantiation;
|
||||
pub use udp_declaration::*;
|
||||
pub use udp_instantiation::*;
|
@ -0,0 +1,18 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UdpDeclaration<'a> {
|
||||
pub nodes: (Identifier<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn udp_declaration(s: &str) -> IResult<&str, UdpDeclaration> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
use crate::parser::*;
|
||||
//use nom::branch::*;
|
||||
//use nom::combinator::*;
|
||||
use nom::error::*;
|
||||
use nom::{Err, IResult};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UdpInstantiation<'a> {
|
||||
pub nodes: (Identifier<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
pub fn udp_instantiation(s: &str) -> IResult<&str, UdpInstantiation> {
|
||||
Err(Err::Error(make_error(s, ErrorKind::Fix)))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user