convert SKILL list to string

E

Erik Wanta

Guest
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik
 
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik
 
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik

Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik
 
Erik,

According to my understanding you just want to remove the "(" and ")"
from the file. Is this correct ? If yes, then you could use perl/sed to
remove the "(" and ')" character from the file before reading to skill
and read the file in skill and continue.

May be i am missing something..................

Regards,
Mohan R

Erik Wanta wrote:
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik

Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik
 
If I understood you right,

This is what you have
aList = list("((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3")
=> ("((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3")

And this is what you want
buildString( parseString( car( aList ) "()" ) "" )
=> "x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3"

Bernd

Erik Wanta wrote:
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik

Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik
 
So, you have

list(list(list("x:xl5") "M4_p") "nsmm_dela_dl_nmos_10w_bsim3v3)

and you want to convert it into

"x:xl5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3"

Is that correct?

On Dec 19, 3:20 pm, "Erik Wanta" <erikwa...@starband.net> wrote:
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik



Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik- Hide quoted text -- Show quoted text -
 
Poojan:
small world

I have a Russian matryoshka doll situation. I want to collapse the
shells into one string. The elements in the list are either other
lists or symbols.

\i aList
\t (((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
\p >
\i type(aList)
\t list
\p >
\i nth(0 aList)
\t range
\p >
\i nth(1 aList)
\t ((x:xI5):M4_p)
\p >
\i nth(2 aList)
\t nsmm_dela_dl_nmos_10w_bsim3v3
\p >
\i nth(3 aList)
\t nil
\p >
\a hiResizeWindow(window(1) list(0:15 897:531))
\r t
\i type(nth(2 aList))
\t symbol
\p >
\a hiResizeWindow(window(1) list(0:15 897:531))
\r t
\i type(nth(1 aList))
\t list
\p >
---
Erik

Poojan Wagh wrote:
So, you have

list(list(list("x:xl5") "M4_p") "nsmm_dela_dl_nmos_10w_bsim3v3)

and you want to convert it into

"x:xl5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3"

Is that correct?

On Dec 19, 3:20 pm, "Erik Wanta" <erikwa...@starband.net> wrote:
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik



Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik- Hide quoted text -- Show quoted text -
 
I wrote a recursive function to obtain the desired string. I suspect
there is a slick one line SKILL command using mapcar to do the same.
---
Erik


Erik Wanta wrote:
Poojan:
small world

I have a Russian matryoshka doll situation. I want to collapse the
shells into one string. The elements in the list are either other
lists or symbols.

\i aList
\t (((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
\p
\i type(aList)
\t list
\p
\i nth(0 aList)
\t range
\p
\i nth(1 aList)
\t ((x:xI5):M4_p)
\p
\i nth(2 aList)
\t nsmm_dela_dl_nmos_10w_bsim3v3
\p
\i nth(3 aList)
\t nil
\p
\a hiResizeWindow(window(1) list(0:15 897:531))
\r t
\i type(nth(2 aList))
\t symbol
\p
\a hiResizeWindow(window(1) list(0:15 897:531))
\r t
\i type(nth(1 aList))
\t list
\p
---
Erik

Poojan Wagh wrote:
So, you have

list(list(list("x:xl5") "M4_p") "nsmm_dela_dl_nmos_10w_bsim3v3)

and you want to convert it into

"x:xl5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3"

Is that correct?

On Dec 19, 3:20 pm, "Erik Wanta" <erikwa...@starband.net> wrote:
Bernd:
I have a file with really long line length. I am using lineread
instead of gets to read lines from the file. The example below is one
of the elements in a list of elements in the output of lineread.
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3) is a list and everything
in it is a string. I want to generate a string without all the
parenthesis.
---
Erik



Bernd Fischer wrote:
Where do you get it from?
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)

Are x x15 etc. strings or symbols?

Bernd

Erik Wanta wrote:
I have a list that I want to convert to a string. I want to convert
the following
from:
(((x:xI5):M4_p):nsmm_dela_dl_nmos_10w_bsim3v3)
to:
x:xI5:M4_p:nsmm_dela_dl_nmos_10w_bsim3v3
---
Erik- Hide quoted text -- Show quoted text -
 
On 20 Dec 2006 11:18:55 -0800, "Erik Wanta" <erikwanta@starband.net> wrote:

I wrote a recursive function to obtain the desired string. I suspect
there is a slick one line SKILL command using mapcar to do the same.
---
Erik
Erik,

I think you need that recursive function to flatten the list - although the :
operators end up being (range l r).

I used

(defun abFlattenList (a)
(if (listp a) (foreach mapcar elem a (abFlattenList elem)) (list a))
)

to flatten it - but I don't think that's quite what you want. Since you already
have a solution, I didn't experiment further, because I probably would need more
knowledge of what you're really trying to do...

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top