Add 'petitparser/' from commit '63b67d5446de646b12eb568bb089ad617d9613cb'
git-subtree-dir: petitparser git-subtree-mainline:77017cf5e0
git-subtree-split:63b67d5446
This commit is contained in:
commit
287169d73a
|
@ -0,0 +1 @@
|
|||
*.sw?
|
|
@ -0,0 +1,36 @@
|
|||
String extend [
|
||||
beginsWith: aString [
|
||||
<category: '*petitparser-core-converting-gst'>
|
||||
| res |
|
||||
|
||||
res := self indexOf: aString matchCase: false startingAt: 1.
|
||||
res ifNil: [^false].
|
||||
|
||||
^ res first = 1
|
||||
]
|
||||
|
||||
includesSubString: subString [
|
||||
<category: '*petitparser-core-converting-gst'>
|
||||
| res |
|
||||
|
||||
res := self indexOf: subString matchCase: false startingAt: 1.
|
||||
res ifNil: [^false].
|
||||
|
||||
^ res first >= 1
|
||||
]
|
||||
]
|
||||
|
||||
Symbol extend [
|
||||
value: anObject [
|
||||
<category: '*petitparser-core-converting-gst'>
|
||||
^anObject perform: self
|
||||
]
|
||||
]
|
||||
|
||||
Character extend [
|
||||
sameAs: aChar [
|
||||
<category: '*petitparser-core-converting-gst'>
|
||||
^self asLowercase = aChar asLowercase.
|
||||
]
|
||||
]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
As of now I consider this to be MIT licensed. I have contacted the author to
|
||||
get a clarification
|
||||
Holger (27.11.2011)
|
|
@ -0,0 +1,19 @@
|
|||
This is a port of PetitParser-lr.190.mcz and PetitTests-lr.8.mcz
|
||||
to the GNU Smalltalk System. This document holds the information
|
||||
of how it was converted.
|
||||
|
||||
0.) basic gst-convert to translate from Squeak to GST
|
||||
1.) Text does not exist, remove code related to it.
|
||||
2.) asString -> asSymbol for all codes.
|
||||
3.) maxVal -> largest
|
||||
4.) Symbol>>value added for compability
|
||||
5.) reversed -> reverse
|
||||
6.) 0.7 as subtraction result
|
||||
7.) Change ==> to => and >=> to ><
|
||||
8.) PositionableStream needs changes. The PetitParser attempts
|
||||
to access variables directly, the names are different from
|
||||
Pharo to here.
|
||||
|
||||
|
||||
Testing the port...
|
||||
gst-unit -f PetitParser.st -f PetitParserTests.st TestClasses...
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
|||
<package>
|
||||
<name>PetitParser</name>
|
||||
<namespace>PP</namespace>
|
||||
|
||||
<url>git://gitorious.org/gnu-smalltalk-ports/petitparser.git</url>
|
||||
<filein>Extension.st</filein>
|
||||
<filein>PetitParser.st</filein>
|
||||
|
||||
<test>
|
||||
<sunit>PP.PPComposedTest</sunit>
|
||||
<sunit>PP.PPExtensionTest</sunit>
|
||||
<sunit>PP.PPMappingTest</sunit>
|
||||
<sunit>PP.PPParserTest</sunit>
|
||||
<sunit>PP.PPPredicateTest</sunit>
|
||||
<sunit>PP.PPScriptingTest</sunit>
|
||||
<sunit>PP.PPTokenTest</sunit>
|
||||
<sunit>PP.PPCompositeParserTest</sunit>
|
||||
<sunit>PP.PPArithmeticParserTest</sunit>
|
||||
<sunit>PP.PPExpressionParserTest</sunit>
|
||||
<sunit>PP.PPLambdaParserTest</sunit>
|
||||
<filein>PetitParserTests.st</filein>
|
||||
</test>
|
||||
|
||||
<file>Extension.st</file>
|
||||
<file>PetitParser.st</file>
|
||||
<file>PetitParserTests.st</file>
|
||||
</package>
|
Reference in New Issue