This commit is contained in:
daniel 2017-04-24 23:06:27 -04:00
commit 21084a033e
2 changed files with 9 additions and 10 deletions

View File

@ -1,7 +1,6 @@
# RADEC
# TODO
* implement printing
* debug: circuit parsing
* debug: vector parsing
* debug: simulation

View File

@ -19,10 +19,10 @@ bool Simulation::parseCircuit(string fileName)
// get rid of first line
getline(in, tmpString);
while (!in.eof()) {
in >> tmpType;
in >> tmpString;
in >> tmp1;
while (true) {
if (!(in >> tmpType)) break;
if (!(in >> tmpString)) break;
if (!(in >> tmp1)) break;
if (tmpType == "INPUT" || tmpType == "OUTPUT") {
tmpWire = findWire(tmp1);
@ -117,11 +117,11 @@ bool Simulation::parseVector(string fileName) {
// get rid of first line
getline(in, tmpString);
while(!in.eof()) {
in >> tmpString;
in >> tmpString;
in >> timeInt;
in >> valInt;
while(true) {
if (!(in >> tmpString)) break;
if (!(in >> tmpString)) break;
if (!(in >> tmpInt)) break;
if (!(in >> valInt)) break;
for(auto i = wires.begin(); i != wires.end(); ++i) {
if((**i).getName() == tmpString) {