#216 element GVCCS1 being mangled

closed-fixed
parser (22)
5
2012-10-13
2012-10-06
Anonymous
No

If I have an element with a name of:

GVCCS1 4 0 5 0 1.25

Then the parser, in the course of trying to do string substitution on VCCS (later on the line), inadvertantly also replaces the "VCCS" that is part of the element name. i.e. the above line gets turned into this:

G 1 4 0 5 0 1.25

and then subsequent steps get confused by the extra number.

Thank you for your efforts and support,

Scott Nelson
nelson18@llnl.gov

Discussion

  • Robert Larice

    Robert Larice - 2012-10-06

    Hello,
    Thank You for the report.
    Robert

    This, and some similar issues is due to
    src/frontend/inpcom.c line 4459
    > } else if (*curr_line == 'g') {
    > /* Gxxx n1 n2 VCCS n3 n4 tr --> Gxxx n1 n2 n3 n4 tr
    > remove vccs */
    > if ((str_ptr = strstr(curr_line, "vccs")) != NULL) {

     
  • Dietmar Warning

    Dietmar Warning - 2012-10-07
    • labels: --> parser
     
  • Dietmar Warning

    Dietmar Warning - 2012-10-07

    Hello,
    this is the syntax of another simulator and should only be skipped if it is the separate fourth token in the line. Same for the other three elements as I checked the corresponding manual.
    Dietmar

     
  • Holger Vogt

    Holger Vogt - 2012-10-07
    • assigned_to: nobody --> h_vogt
    • status: open --> open-accepted
     
  • Holger Vogt

    Holger Vogt - 2012-10-07
    • status: open-accepted --> open-fixed
     
  • Holger Vogt

    Holger Vogt - 2012-10-07

    I have made an update to inpcom.c in git. The following test cases are o.k. now (I hope I've got them all):

    * bug 3575099

    .param vcvs=0.5

    v1 5 0 1
    R4 4 0 1
    R6 6 0 1
    R7 7 0 1
    R8 VCCS4 0 1
    GVCCS1 4 0 5 0 1.25
    E1 6 0 VCVS 5 0 1.25
    Espec 7 0 vol = 'v(4)*v(6)*vcvs'
    GVCCS8 VCCS4 0 5 0 1.25
    .control
    op
    print all
    .endc

    .end

    Holger

     
  • Holger Vogt

    Holger Vogt - 2012-10-13
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks