robin has quit [Remote host closed the connection]
robin has joined #commonlisp
rgherdt_ has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.5]
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
rgherdt_ has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
zaemington has joined #commonlisp
zaemington has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
zaymington has quit [Quit: Sleep]
habamax has joined #commonlisp
PuercoPop has joined #commonlisp
jello_pudding has quit [Ping timeout: 260 seconds]
<doulos05>
I'm having a bit of a mental block on a string parsing problem. I have a data format that I'm taking from another program, so I can't change it.
<doulos05>
The format for each line which isn't a comment (marked by a #) is {chassis/exact} [model] [image filename]
<doulos05>
An example would be "exact \"Centurion CNT-1D\" \"fighter/centurion.png\""
<doulos05>
I have the string "Centurion CNT-1D" and I need to find the filepath immediately following it.
<doulos05>
Currenly, I'm reading the whole file in via `uiop:read-file-lines and then using `(car (member search-term file-stream :test #'search))` to pull out the line containing the match.
<doulos05>
Where I'm blanking is how to strip out all the quotation marks and just grab the filename from the end so I can use `merge-pathnames` to generate the full path to the image.
jello_pudding has joined #commonlisp
<mfiano>
The grammar is simple and it would help to build a syntax tree of objects that can be transformed in any way you need to, rather than working with character streams all the way down
<PuercoPop>
doulos05: you can strip the the quotation marks using STRING-TRIM iirc.
<mfiano>
Or strings, same difference
<doulos05>
mfiano: So create a struct with something like image-type image-unit and image-path, then match it
<doulos05>
Or just a list by splitting on the spaces and then STRING-TRIMming the quotation marks. Ok, I think it see it now
zaymington has joined #commonlisp
cosmeve has joined #commonlisp
wonko-the-sane has joined #commonlisp
randm has quit [Remote host closed the connection]
randm has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 252 seconds]
wonko-the-sane has joined #commonlisp
wonko-the-sane has quit [Client Quit]
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
wonko-the-sane has joined #commonlisp
dom2 has joined #commonlisp
shka has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon69 has quit [Ping timeout: 258 seconds]
wonko-the-sane has quit [Ping timeout: 252 seconds]
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
bilegeek has quit [Quit: Leaving]
wonko-the-sane has joined #commonlisp
dom2 has quit [Remote host closed the connection]
rtypo has quit [Ping timeout: 258 seconds]
Pirx has joined #commonlisp
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
overclucker has joined #commonlisp
seok66 has joined #commonlisp
igemnace has joined #commonlisp
<hayley>
Oops, now I have positive LOC contributed.
<hayley>
Wrong channel.
* hayley
too quick on the keyboard
agm has joined #commonlisp
cosmeve has quit [Read error: Connection reset by peer]
cosmeve has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
rgherdt has joined #commonlisp
ronald_ has quit [Ping timeout: 248 seconds]
ronald has quit [Ping timeout: 255 seconds]
ronald has joined #commonlisp
ronald_ has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]