tools/JavaParserI.st
branchdevelopment
changeset 2697 d5110c6822c6
parent 2672 5e4a61287345
child 2711 a00302fe5083
equal deleted inserted replaced
2696:6b6791245acb 2697:d5110c6822c6
     6 		inputElement whiteSpace comment javaToken keyword literal
     6 		inputElement whiteSpace comment javaToken keyword literal
     7 		separator operator identifier traditionalComment endOfLineComment
     7 		separator operator identifier traditionalComment endOfLineComment
     8 		commentTail charactersInLine commentTailStar notStar
     8 		commentTail charactersInLine commentTailStar notStar
     9 		notStarNotSlash inputCharacter booleanLiteral nullLiteral
     9 		notStarNotSlash inputCharacter booleanLiteral nullLiteral
    10 		keywords floatingPointLiteral integerLiteral characterLiteral
    10 		keywords floatingPointLiteral integerLiteral characterLiteral
    11 		stringLiteral input operators separators block'
    11 		stringLiteral input operators separators block scanner'
    12 	classVariableNames:'Debugging'
    12 	classVariableNames:'Debugging'
    13 	poolDictionaries:''
    13 	poolDictionaries:''
    14 	category:'Languages-Java-Parser'
    14 	category:'Languages-Java-Parser'
    15 !
    15 !
    16 
    16 
    98 	^newArray
    98 	^newArray
    99 !
    99 !
   100 
   100 
   101 namesToIgnore
   101 namesToIgnore
   102 
   102 
   103 	^#('keywords' 'operators' 'separators')
   103     ^#('keywords' 'operators' 'separators' 'scanner')
       
   104 
       
   105     "Modified (format): / 30-08-2013 / 02:32:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   104 ! !
   106 ! !
   105 
   107 
   106 !JavaParserI methodsFor:'accessing'!
   108 !JavaParserI methodsFor:'accessing'!
   107 
   109 
   108 builder
   110 builder
   727 !JavaParserI methodsFor:'parsing'!
   729 !JavaParserI methodsFor:'parsing'!
   728 
   730 
   729 parse: anObject
   731 parse: anObject
   730     "Parse anObject with the receiving parser and answer the parse-result or an instance of PPFailure."
   732     "Parse anObject with the receiving parser and answer the parse-result or an instance of PPFailure."
   731 
   733 
   732     | scanner |
       
   733 
       
   734     (anObject isKindOf: JavaScanner) ifFalse:[
   734     (anObject isKindOf: JavaScanner) ifFalse:[
   735         scanner := JavaScanner for: anObject readStream.
   735         scanner := JavaScanner for: anObject readStream.
   736     ] ifTrue:[
   736     ] ifTrue:[
   737         scanner := anObject
   737         scanner := anObject
   738     ].
   738     ].
   739 
   739 
   740     ^super parse: scanner
   740     ^super parse: scanner
   741 
   741 
   742     "Created: / 15-03-2012 / 11:10:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   742     "Created: / 15-03-2012 / 11:10:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   743     "Modified (format): / 30-08-2013 / 02:32:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   743 ! !
   744 ! !
   744 
   745 
   745 !JavaParserI methodsFor:'private'!
   746 !JavaParserI methodsFor:'private'!
   746 
   747 
   747 tokenParserFor: aSymbol
   748 tokenParserFor: aSymbol