inline comment delimiter

View: New views
4 Messages — Rating Filter:   Alert me  

inline comment delimiter

by asomers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm having a little trouble getting inline comments to work.
According to the manual, "Anything on any line following a quote is
ignored.".  But the manual doesn't say whether to use single or double
quotes.  From experiment, it seems that single quotes work on most
lines, but double quotes work on a .SUBCKT line.  Here is a test
script:

*Comment test
*On a .SUBCKT line, it seems that " is a comment delimiter
*But elsewhere it seems that ' is a comment delimiter
.SUBCKT Foo 1 2 "(IN
*This next line will not work if you uncomment it
*.SUBCKT Bar 1 2 '(IN
.ENDS Foo
R  1 2 1000
D1 2 0 DIODE1 ' a comment
V1 1 0 dc 1 ac 0
.MODEL DIODE1 D(IS=8.2592e-16 RS=10) ' a comment
.op

Can someone clear me up here?  I'm working on a tool to automatically
convert LTSpice models into Gnucap models, so 'just change it by hand'
isn't a viable solution.  I need to be able to choose the right
delimiter in all cases.

-Alan Somers


_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Re: inline comment delimiter

by al davis-13 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 10 September 2009, asomers@... wrote:
> I'm having a little trouble getting inline comments to work.
> According to the manual, "Anything on any line following a
>  quote is ignored.".  But the manual doesn't say whether to
>  use single or double quotes.

Where does it say that?  It's wrong.

Quoting in the middle of a line can't be a comment, because
quotes can enclose expressions.  Some versions of spice use it
that way, so gnucap must accept it that way.

There really isn't a general here-to-the-end-of-line comment.  
There should be.  What it is would depend on what format you are
using ..(spice, spectre, verilog, ...)

> Can someone clear me up here?  I'm working on a tool to
>  automatically convert LTSpice models into Gnucap models, so
>  'just change it by hand' isn't a viable solution.  I need to
>  be able to choose the right delimiter in all cases.

Gnucap should be able to read LTspice netlists and models as is,
but I haven't looked at it to know if it really does.


_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Re: inline comment delimiter

by asomers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It says that in section 1.4: Command Structure.  On my system, it's at:
file:///usr/share/doc/gnucap/html/gnucap-man006.html#htoc5

So I guess I what you're saying is that I should just delete those
comments.  That will work, although it's sad to lose information.
Gnucap can definitely not read LTSpice models as is.  There are many
changes I have to make.

-Alan

On Thu, Sep 10, 2009 at 8:11 PM, al davis <ad211@...> wrote:

> On Thursday 10 September 2009, asomers@... wrote:
>> I'm having a little trouble getting inline comments to work.
>> According to the manual, "Anything on any line following a
>>  quote is ignored.".  But the manual doesn't say whether to
>>  use single or double quotes.
>
> Where does it say that?  It's wrong.
>
> Quoting in the middle of a line can't be a comment, because
> quotes can enclose expressions.  Some versions of spice use it
> that way, so gnucap must accept it that way.
>
> There really isn't a general here-to-the-end-of-line comment.
> There should be.  What it is would depend on what format you are
> using ..(spice, spectre, verilog, ...)
>
>> Can someone clear me up here?  I'm working on a tool to
>>  automatically convert LTSpice models into Gnucap models, so
>>  'just change it by hand' isn't a viable solution.  I need to
>>  be able to choose the right delimiter in all cases.
>
> Gnucap should be able to read LTspice netlists and models as is,
> but I haven't looked at it to know if it really does.
>
>
> _______________________________________________
> Help-gnucap mailing list
> Help-gnucap@...
> http://lists.gnu.org/mailman/listinfo/help-gnucap
>


_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Re: inline comment delimiter

by al davis-13 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 11 September 2009, asomers@... wrote:
> It says that in section 1.4: Command Structure.  On my
>  system, it's at:
>  file:///usr/share/doc/gnucap/html/gnucap-man006.html#htoc5

That's the old manual, for the old stable version.   (0.35??)  
There are a lot of changes in the development version, which is
getting close to ready for release as a stable version.

> So I guess I what you're saying is that I should just delete
>  those comments.  That will work, although it's sad to lose
>  information. Gnucap can definitely not read LTSpice models
>  as is.  There are many changes I have to make.

The best approach is to move over to the developer list
(gnucap-devel@...) and point out the problems there,
specifically so they can be addressed directly.


_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap