Hi,
is there anything like ruby's String#split in Smalltalk? (split the string at string occurences or regexp matches)
I found SequenceableCollection#piecesCutWhere: or String#findTokens but I need to split at occurences of a substring. I must also admit my problem is with VW... I did try in the method finder in Squeak, but without much success.
Damien Pollet a écrit :
Hi,
is there anything like ruby's String#split in Smalltalk? (split the string at string occurences or regexp matches)
I found SequenceableCollection#piecesCutWhere: or String#findTokens but I need to split at occurences of a substring. I must also admit my problem is with VW... I did try in the method finder in Squeak, but without much success.
You can use #subString:
'About somthing' subStrings: ' ' -> #('About' 'somthing')
On 7/26/06, mathieu mathk.sue@gmail.com wrote:
You can use #subString:
Not really... my goal is to parse a bibtex author field, e.g. a list of particle Name, FirstName SecondName items separated by "and" keywords. I could use #findTokens to separate the words.
If this is in VW as you mentioned in a previous post, I have a full Bibtex parser you can use (made with SmaCC, a parser generator). We use it to generate webpages, filtered bibfiles, and other things from bibtex (http://decomp.ulb.ac.be/roelwuyts/publications/ is generated with the tool, for example).
If you're interested I can tell you where to find it.
On 26 Jul 2006, at 09:24, Damien Pollet wrote:
On 7/26/06, mathieu mathk.sue@gmail.com wrote:
You can use #subString:
Not really... my goal is to parse a bibtex author field, e.g. a list of particle Name, FirstName SecondName items separated by "and" keywords. I could use #findTokens to separate the words.
-- Damien Pollet type less, do more _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
On 7/26/06, Roel Wuyts Roel.Wuyts@ulb.ac.be wrote:
If this is in VW as you mentioned in a previous post, I have a full Bibtex parser you can use (made with SmaCC, a parser generator). We
Hehe, precisely (BibOuter ?)
Problem is I prefer to use the more robust Surname, Name scheme of naming authors but it seems the parser doesn't handle this. Maybe I should investigate extending the SmaCC parsers?
Investigating the SmaCC parsers would be useful, yes, if you're not afraid to do it. I don't have time to look at it currently, so any help is appreciated :-)
On 26 Jul 2006, at 17:41, Damien Pollet wrote:
On 7/26/06, Roel Wuyts Roel.Wuyts@ulb.ac.be wrote:
If this is in VW as you mentioned in a previous post, I have a full Bibtex parser you can use (made with SmaCC, a parser generator). We
Hehe, precisely (BibOuter ?)
Problem is I prefer to use the more robust Surname, Name scheme of naming authors but it seems the parser doesn't handle this. Maybe I should investigate extending the SmaCC parsers?
-- Damien Pollet type less, do more _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
2006/7/26, Roel Wuyts Roel.Wuyts@ulb.ac.be:
Investigating the SmaCC parsers would be useful, yes, if you're not afraid to do it. I don't have time to look at it currently, so any help is appreciated :-)
I think you have to write your own grammar (that is how it works with SmaCC) for parsing BibTeX. Load de SmaCCDev package from squeaksource.
Math
On 26 Jul 2006, at 17:41, Damien Pollet wrote:
On 7/26/06, Roel Wuyts Roel.Wuyts@ulb.ac.be wrote:
If this is in VW as you mentioned in a previous post, I have a full Bibtex parser you can use (made with SmaCC, a parser generator). We
Hehe, precisely (BibOuter ?)
Problem is I prefer to use the more robust Surname, Name scheme of naming authors but it seems the parser doesn't handle this. Maybe I should investigate extending the SmaCC parsers?
-- Damien Pollet type less, do more
On 26 juil. 06, at 17:41, Damien Pollet wrote:
On 7/26/06, Roel Wuyts Roel.Wuyts@ulb.ac.be wrote:
If this is in VW as you mentioned in a previous post, I have a full Bibtex parser you can use (made with SmaCC, a parser generator). We
Hehe, precisely (BibOuter ?)
Problem is I prefer to use the more robust Surname, Name scheme of naming authors but it seems the parser doesn't handle this. Maybe I should investigate extending the SmaCC parsers?
please do :)
-- Damien Pollet type less, do more _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
On 7/27/06, stéphane ducasse ducasse@iam.unibe.ch wrote:
please do :)
done :p
beginners@lists.squeakfoundation.org