From 2debdb42d3acc1e6beacbba0809905f38ee06fcc Mon Sep 17 00:00:00 2001 From: fahim-oscad Date: Thu, 28 Apr 2016 16:46:32 +0530 Subject: Modified getunit function : Now it lower the case before taking value from Mapping.json --- src/ngspicetoModelica/Mapping.json | 4 +--- src/ngspicetoModelica/NgspicetoModelica.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ngspicetoModelica/Mapping.json b/src/ngspicetoModelica/Mapping.json index 3db10391..711a9724 100644 --- a/src/ngspicetoModelica/Mapping.json +++ b/src/ngspicetoModelica/Mapping.json @@ -163,9 +163,7 @@ "f":"e-15", "ma":"e-3", "v":"", - "V":"", - "i":"", - "I":"" + "a":"" } } diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index 058a2442..a8ef6048 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -229,6 +229,7 @@ class NgMoConverter: #regExp = re.compile("([0-9]+)([a-zA-Z]+)") #Remove '(' and ')' if any compValue = compValue.replace('(','').replace(')','') + compValue = compValue.lower() #regExp = re.compile("([-])?([0-9]+)\.?([0-9]+)?([a-zA-Z])?") regExp = re.compile("([-])?([0-9]+)\.?([0-9]+)?(\w+)?") matchString = regExp.match(str(compValue)) #separating number and string -- cgit