sane import and export behaviors

This commit is contained in:
Yehowshua Immanuel 2022-10-26 01:16:39 -04:00
parent d343b6f5ff
commit 9f18b166a5
12 changed files with 62 additions and 62 deletions

View file

@ -2,7 +2,7 @@
// This program is distributed under both the GPLV3 license
// and the YEHOWSHUA license, both of which can be found at
// the root of the folder containing the sources for this program.
use super::reader::{next_word, WordReader};
use super::super::reader::{next_word, WordReader};
use super::types::ParseResult;
pub(super) fn digit(chr: u8) -> bool {

View file

@ -3,7 +3,14 @@
// and the YEHOWSHUA license, both of which can be found at
// the root of the folder containing the sources for this program.
use super::*;
use std::collections::HashMap;
use num::BigUint;
use super::super::utilities::{BinaryParserErrTypes, binary_str_to_vec_u8};
use super::super::signal::{SignalEnum, LsbIdxOfTmstmpValOnTmln};
use super::super::reader::{WordReader, Cursor, Line, Word, next_word};
use super::super::types::{SignalIdx, VCD};
pub(super) fn parse_events<'a>(
word_reader: &mut WordReader,

View file

@ -2,10 +2,14 @@
// This program is distributed under both the GPLV3 license
// and the YEHOWSHUA license, both of which can be found at
// the root of the folder containing the sources for this program.
use chrono::prelude::*;
use chrono::prelude::{DateTime, Utc, TimeZone};
use itertools::Itertools;
use super::*;
use super::super::reader::{Cursor, WordReader, next_word};
use super::super::types::{Timescale, Version, Metadata};
use super::combinator_atoms::{take_until, take_while, digit, tag};
use super::types::{ParseResult};
pub(super) fn parse_date(
word_and_ctx1: (&str, &Cursor),

View file

@ -5,7 +5,15 @@
/// part of the vcd parser that handles parsing the signal tree and
/// building the resulting signal tree
use super::*;
use std::collections::HashMap;
use super::super::reader::{WordReader, next_word, curr_word};
use super::super::types::{VCD, Scope, ScopeIdx, SignalIdx};
use super::super::signal::{SigType, SignalEnum};
use super::combinator_atoms::{tag, ident};
use super::types::{ParseResult};
pub(super) fn parse_var<'a>(
word_reader: &mut WordReader,
@ -322,7 +330,7 @@ pub(super) fn parse_scopes<'a>(
signal_map: &mut HashMap<String, SignalIdx>,
) -> Result<(), String> {
// get the current word
let (word, cursor) = curr_word!(word_reader)?;
let (word, _) = curr_word!(word_reader)?;
// we may have orphaned vars that occur before the first scope
if word == "$var" {