infinite loop in spice parser

Felix Salfelder <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
Hi Al, hi list.

playing with spicelib, i found the parser hanging at
gnucap-spice>C1 0 1 2;

while its not exceptionally clever to place that semicolon, it's still a
gnucap bug.

i fixed it with

     cmd >> node_name;
+    if(spots.back() == cmd.cursor()) {
+      throw Exception("what's this?");
+    }
     spots.push_back(cmd.cursor());

in count_ports. now i get
gnucap-spice>C1 0 1 2;
C1 0 1 2;
        ^ ? what's this?

regards
felix
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.