stx_goodies_petitparser.st
author sr
Thu, 05 Jul 2018 09:23:35 +0200
changeset 629 53bdfd1dc986
parent 622 e2a05b463760
child 632 9b86bc3001da
permissions -rw-r--r--
order

"{ Encoding: utf8 }"

"{ Package: 'stx:goodies/petitparser' }"

"{ NameSpace: Smalltalk }"

LibraryDefinition subclass:#stx_goodies_petitparser
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'* Projects & Packages *'
!

!stx_goodies_petitparser class methodsFor:'documentation'!

documentation
"
    Package documentation:

    A framework for PEG based parsers.
    Allows for very easy definition and use of parsers for any kind of documents,
    but of course also to create parsers for programming language source code.
"
! !

!stx_goodies_petitparser class methodsFor:'accessing'!

monticelloPackageName
    "hook for packages which have been loaded from monticello"

    ^ 'PetitParser'

    "Created: / 17-12-2010 / 19:44:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_goodies_petitparser class methodsFor:'description'!

excludedFromPreRequisites
    "list all packages which should be ignored in the automatic
     preRequisites scan. See #preRequisites for more."

    ^ #(
    )
!

mandatoryPreRequisites
    "list all required mandatory packages.
     Packages are mandatory, if they contain superclasses of the package's classes
     or classes which are extended by this package.
     This list can be maintained manually or (better) generated and
     updated by scanning the superclass hierarchies
     (the browser has a menu function for that)"

    ^ #(
        #'stx:libbasic'    "ArrayedCollection - extended "
        #'stx:libbasic2'    "Text - extended "
    )

    "Modified: / 04-07-2018 / 15:38:25 / sr"
!

referencedPreRequisites
    "list packages which are a prerequisite, because they contain
     classes which are referenced by my classes.
     These packages are NOT needed as a prerequisite for compiling or loading,
     however, a class from it may be referenced during execution and having it
     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
     includes explicit checks for the package being present.
     This method is generated automatically,
     by searching all classes (and their packages) which are referenced by my classes.
     Please also take a look at the #mandatoryPreRequisites method"

    ^ #(
    )
!

stcOptimizationOptions
    "do not inline the not operation here - it is overwritten"

    ^ '+optspace3 -inlinenot'

    "Created: / 23-08-2006 / 01:27:22 / cg"
!

subProjects
    "list packages which are known as subprojects.
     The generated makefile will enter those and make there as well.
     However: they are not forced to be loaded when a package is loaded;
     for those, redefine requiredPrerequisites"

    ^ #(
        #'stx:goodies/petitparser/analyzer'
        "sr: do not compile test classes... 
         will also fail because sunit (which does inclide superclass of PPAbstractParserTest)
         has not yet build (when calling bmake in stx)"
"/        #'stx:goodies/petitparser/tests'
    )

    "Modified (comment): / 04-07-2018 / 15:43:01 / sr"
! !

!stx_goodies_petitparser class methodsFor:'description - actions'!

postLoadAction

    "/self classes do: [:cls|cls isLoaded ifFalse:[cls autoload]]

    "Created: / 17-12-2010 / 19:55:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_goodies_petitparser class methodsFor:'description - contents'!

classNamesAndAttributes
    "lists the classes which are to be included in the project.
     Each entry in the list may be: a single class-name (symbol),
     or an array-literal consisting of class name and attributes.
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."

    ^ #(
        "<className> or (<className> attributes...) in load order"
        PPCharSetPredicate
        PPFailure
        PPMemento
        PPParser
        PPStream
        PPToken
        #'stx_goodies_petitparser'
        PPDelegateParser
        PPEpsilonParser
        PPFailingParser
        PPListParser
        PPLiteralParser
        PPPluggableParser
        PPPredicateParser
        PPUnresolvedParser
        PPActionParser
        PPAndParser
        PPChoiceParser
        PPCompositeParser
        PPEndOfInputParser
        PPExpressionParser
        PPFlattenParser
        PPLiteralObjectParser
        PPLiteralSequenceParser
        PPMemoizedParser
        PPNotParser
        PPOptionalParser
        PPPredicateObjectParser
        PPPredicateSequenceParser
        PPRepeatingParser
        PPSequenceParser
        PPTrimmingParser
        PPArithmeticParser
        PPLambdaParser
        PPLimitedRepeatingParser
        PPPossessiveRepeatingParser
        PPTokenParser
        PPWrappingParser
        PPGreedyRepeatingParser
        PPLazyRepeatingParser
    )
!

extensionMethodNames
    "lists the extension methods which are to be included in the project.
     Entries are 2-element array literals, consisting of class-name and selector.
     A correponding method with real names must be present in my concrete subclasses
     if it has extensions."

    ^ #(
        Block asParser
        BlockContext asParser
        Character asParser
        Character ppMinus:
        Collection asChoiceParser
        Collection asSequenceParser
        Interval asParser
        Object asParser
        Object isPetitFailure
        Object isPetitParser
        PositionableStream asPetitStream
        SequenceableCollection asParser
        SequenceableCollection asPetitStream
        Set asParser
        Stream asPetitStream
        String asParser
        Symbol asParser
        Symbol value:
        Text asPetitStream
        UndefinedObject asParser
    )
! !

!stx_goodies_petitparser class methodsFor:'description - monticello'!

monticelloTimestamps

    ^#(
    )
! !

!stx_goodies_petitparser class methodsFor:'description - project information'!

applicationIconFileName
    "Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file"

    ^ nil
    "/ ^ self applicationName
!

companyName
    "Return a companyname which will appear in <lib>.rc"

    ^ 'Lukas Renggli & SWING Research Group'

    "Modified: / 17-12-2010 / 19:43:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

description
    "Return a description string which will appear in vc.def / bc.def"

    ^ 'Smalltalk/X Scannerless Parser & Parser Combinator Library'

    "Modified: / 17-12-2010 / 19:43:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

legalCopyright
    "Return a copyright string which will appear in <lib>.rc"

    ^ '(C) Lukas Renggli'

    "Modified: / 17-12-2010 / 19:43:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

productInstallDirBaseName
    "Returns a default installDir which will appear in <app>.nsi.
     This is usually not the one you want to keep"

    ^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last
!

productName
    "Return a product name which will appear in <lib>.rc"

    ^ 'Petit Parser'

    "Modified: / 17-12-2010 / 19:43:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_goodies_petitparser class methodsFor:'description - svn'!

svnRepositoryUrlString
    "Return a SVN repository URL of myself.
     (Generated since 2011-04-08)
    "

    ^ '$URL: https://vranyj1@swing.fit.cvut.cz/svn/squeak/petitparser/trunk/squeak_petitparser.st $'
!

svnRevisionNr
    "Return a SVN revision number of myself.
     This number is updated after a commit"

    ^ "$SVN-Revision:"'11              '"$"
! !

!stx_goodies_petitparser class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
!

version_MC
    ^ '$PetitParser-lr.231 a18ceb3c-e6d2-4b74-91c9-33f05d2e0514 2013-03-16T21:51:30 lr$'
!

version_SVN
    ^ '$Id$'
! !