SystemOrganization addCategory: #'LanguageBoxes-Core'! SystemOrganization addCategory: #'LanguageBoxes-Helvetia'! SystemOrganization addCategory: #'LanguageBoxes-OmniBrowser'! SystemOrganization addCategory: #'LanguageBoxes-Grammar-Smalltalk'! SystemOrganization addCategory: #'LanguageBoxes-Grammar-Java'! SystemOrganization addCategory: #'LanguageBoxes-Grammar-SQL'! SystemOrganization addCategory: #'LanguageBoxes-Tests'! SystemOrganization addCategory: #'LanguageBoxes-Tests-Java'! SystemOrganization addCategory: #'LanguageBoxes-Tests-SQL'! TestResource subclass: #LBGrammarResource instanceVariableNames: 'parsers' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests'! !LBGrammarResource methodsFor: 'accessing' stamp: 'lr 5/7/2009 13:57'! parserAt: aClass ^ parsers at: aClass name ifAbsentPut: [ aClass new ]! ! !LBGrammarResource methodsFor: 'running' stamp: 'lr 3/26/2009 15:37'! setUp super setUp. parsers := Dictionary new! ! OBCommand subclass: #LBCmdProvider instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! LBCmdProvider subclass: #LBCmdActivate instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdActivate methodsFor: 'execution' stamp: 'lr 6/23/2009 11:31'! execute self languageBox active: self languageBox isActive not! ! !LBCmdActivate methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:08'! label ^ (ORChangesBrowser displayDiffs ifTrue: [ '' ] ifFalse: [ '']) , 'Active'! ! LBCmdProvider subclass: #LBCmdInspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdInspect methodsFor: 'execution' stamp: 'lr 6/23/2009 11:32'! execute self languageBox explore! ! !LBCmdInspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:36'! icon ^ #inspectItIcon! ! !LBCmdInspect methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! label ^ 'Inspect'! ! !LBCmdProvider methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! cluster ^ #'Language Boxes'! ! !LBCmdProvider methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:30'! group ^ #provider! ! !LBCmdProvider methodsFor: 'testing' stamp: 'lr 6/23/2009 11:23'! isActive ^ (requestor isSelected: target) and: [ (target isKindOf: OBClassAwareNode) and: [ target theNonMetaClass includesBehavior: LBLanguageBox ] ]! ! !LBCmdProvider methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:31'! languageBox ^ target theNonMetaClass default! ! LBCmdProvider subclass: #LBCmdRecompile instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdRecompile methodsFor: 'execution' stamp: 'lr 6/23/2009 11:48'! execute | environemnt | environemnt := self languageBox recompile. environemnt isEmpty ifFalse: [ environemnt open ]! ! !LBCmdRecompile methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! label ^ 'Recompile'! ! LBCmdProvider subclass: #LBCmdScope instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdScope methodsFor: 'execution' stamp: 'lr 6/23/2009 11:33'! execute self languageBox environment open! ! !LBCmdScope methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! label ^ 'Scope'! ! OBCommand subclass: #LBCmdUser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! LBCmdUser subclass: #LBCmdAdd instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdAdd methodsFor: 'execution' stamp: 'lr 6/23/2009 11:38'! execute | environment box | environment := target browserEnvironment. box := self chooseLanguageBox: 'Add Language Box' select: [ :each | (each environment & environment) isEmpty ]. box isNil ifTrue: [ ^ self ]. box add: environment! ! !LBCmdAdd methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:11'! group ^ #scope! ! !LBCmdAdd methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! label ^ 'Add...'! ! LBCmdUser subclass: #LBCmdBrowse instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdBrowse methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:36'! environment | environment | environment := self languageBoxes inject: ClassEnvironment new into: [ :result :box | (target withinBrowserEnvironment: box environment) ifTrue: [ result addClass: box class ]. result ]. ^ environment label: 'Language Boxes for ' , target name! ! !LBCmdBrowse methodsFor: 'execution' stamp: 'lr 6/23/2009 11:46'! execute | boxes | boxes := self languageBoxes select: [ :each | target withinBrowserEnvironment: each environment ]. boxes isEmpty ifTrue: [ ^ self ]. boxes size = 1 ifTrue: [ ^ requestor browser jumpTo: boxes anyOne class asNode ]. self environment browserInstance open! ! !LBCmdBrowse methodsFor: 'testing' stamp: 'lr 10/30/2008 13:52'! isEnabled ^ self environment isEmpty not! ! !LBCmdBrowse methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:07'! label ^ 'Browse'! ! LBCmdUser subclass: #LBCmdRemove instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBCmdRemove methodsFor: 'execution' stamp: 'lr 6/23/2009 11:38'! execute | environment box | environment := target browserEnvironment. box := self chooseLanguageBox: 'Remove Language Box' select: [ :each | (each environment & environment) isEmpty not ]. box isNil ifTrue: [ ^ self ]. box environments do: [ :each | (each & environment) isEmpty ifFalse: [ box remove: each ] ]! ! !LBCmdRemove methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:11'! group ^ #scope! ! !LBCmdRemove methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:07'! label ^ 'Remove...'! ! !LBCmdUser methodsFor: 'utilities' stamp: 'lr 6/23/2009 11:33'! chooseLanguageBox: aString ^ self chooseLanguageBox: aString select: [ :each | true ]! ! !LBCmdUser methodsFor: 'utilities' stamp: 'lr 6/23/2009 11:38'! chooseLanguageBox: aString select: aBlock | boxes labels | boxes := self languageBoxes asArray select: aBlock. boxes isEmpty ifTrue: [ ^ nil ]. boxes sort: [ :a :b | a name < b name ]. labels := boxes collect: [ :each | each name ]. ^ OBChoiceRequest prompt: aString labels: labels values: boxes! ! !LBCmdUser methodsFor: 'accessing' stamp: 'lr 9/2/2010 12:06'! cluster ^ #'Language Boxes'! ! !LBCmdUser methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:30'! group ^ #user! ! !LBCmdUser methodsFor: 'testing' stamp: 'lr 10/30/2008 13:43'! isActive ^ (requestor isSelected: target) and: [ target isKindOf: OBClassAwareNode ]! ! !LBCmdUser methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:33'! languageBoxes ^ LBLanguageBox all! ! CUCompositeParser subclass: #LBJavaCommentGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Grammar-Java'! !LBJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 14:58'! comment '/*' , ('*/' not , #any) star , '*/'! ! !LBJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 14:58'! javadoc '/**' , ('*/' not , #any) star , '*/'! ! !LBJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 15:04'! line '//' , ((#cr / #lf) not , #any) star! ! !LBJavaCommentGrammar methodsFor: 'parsing' stamp: 'lr 9/11/2010 11:32'! parseOn: aStream | start element stop | start := aStream position. element := super parseOn: aStream. element isPetitFailure ifTrue: [ ^ element ]. stop := aStream position. ^ PPToken on: aStream collection start: start + 1 stop: stop! ! !LBJavaCommentGrammar methodsFor: 'accessing' stamp: 'lr 5/7/2009 11:05'! start ^ (whitespace plus / javadoc / comment / line) star! ! !LBJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/7/2009 11:05'! whitespace #space! ! CUCompositeParser subclass: #LBJavaGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Grammar-Java'! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! ABSTRACT 'abstract' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! AMP '&' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! AMPAMP '&&' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! AMPEQ '&=' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! ASSERT 'assert' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! BANG '!!' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! BANGEQ '!!=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! BAR '|' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! BARBAR '||' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! BAREQ '|=' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! BOOLEAN 'boolean' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! BREAK 'break' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! BYTE 'byte' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! CARET '^' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! CARETEQ '^=' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CASE 'case' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CATCH 'catch' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CHAR 'char' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! CHARLITERAL ($' , (EscapeSequence / (($" / $\ / '\r' / '\n') not , #any)) , $') javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CLASS 'class' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! COLON ':' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! COMMA ',' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CONST 'const' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! CONTINUE 'continue' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! DEFAULT 'default' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! DO 'do' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! DOT '.' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! DOUBLE 'double' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! DOUBLELITERAL (NonIntegerNumber , DoubleSuffix optional) javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:41'! DoubleSuffix $d / $D! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! ELLIPSIS '...' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! ELSE 'else' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! ENUM 'enum' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! EQ '=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! EQEQ '==' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! EXTENDS 'extends' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:13'! EscapeSequence $\ , ($b / $t / $n / $f / $r / $" / $' / $\ / (($0 / $1 / $2 / $3) , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7) , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7)) / (($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7) , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7)) / ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7))! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:14'! Exponent ($e / $E) , ($+ / $-) optional , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! FALSE 'false' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! FINAL 'final' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! FINALLY 'finally' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! FLOAT 'float' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! FLOATLITERAL (NonIntegerNumber , FloatSuffix) javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! FOR 'for' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:41'! FloatSuffix $f / $F! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! GOTO 'goto' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GT '>' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GTEQ '>=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GTGT '>>' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GTGTEQ '>>=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GTGTGT '>>>' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! GTGTGTEQ '>>>=' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:16'! HexDigit ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) / ($a / $b / $c / $d / $e / $f) / ($A / $B / $C / $D / $E / $F)! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:36'! HexPrefix '0x' / '0X'! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! IDENTIFIER (IdentifierStart , IdentifierPart star) javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! IF 'if' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! IMPLEMENTS 'implements' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! IMPORT 'import' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! INSTANCEOF 'instanceof' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! INT 'int' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! INTERFACE 'interface' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! INTLITERAL IntegerNumber javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:59'! IdentifierPart #word "'\u0000'..'\u0008' / '\u000e'..'\u001b' / '\u0024' / '\u0030'..'\u0039' / '\u0041'..'\u005a' / '\u005f' / '\u0061'..'\u007a' / '\u007f'..'\u009f' / '\u00a2'..'\u00a5' / '\u00aa' / '\u00ad' / '\u00b5' / '\u00ba' / '\u00c0'..'\u00d6' / '\u00d8'..'\u00f6' / '\u00f8'..'\u0236' / '\u0250'..'\u02c1' / '\u02c6'..'\u02d1' / '\u02e0'..'\u02e4' / '\u02ee' / '\u0300'..'\u0357' / '\u035d'..'\u036f' / '\u037a' / '\u0386' / '\u0388'..'\u038a' / '\u038c' / '\u038e'..'\u03a1' / '\u03a3'..'\u03ce' / '\u03d0'..'\u03f5' / '\u03f7'..'\u03fb' / '\u0400'..'\u0481' / '\u0483'..'\u0486' / '\u048a'..'\u04ce' / '\u04d0'..'\u04f5' / '\u04f8'..'\u04f9' / '\u0500'..'\u050f' / '\u0531'..'\u0556' / '\u0559' / '\u0561'..'\u0587' / '\u0591'..'\u05a1' / '\u05a3'..'\u05b9' / '\u05bb'..'\u05bd' / '\u05bf' / '\u05c1'..'\u05c2' / '\u05c4' / '\u05d0'..'\u05ea' / '\u05f0'..'\u05f2' / '\u0600'..'\u0603' / '\u0610'..'\u0615' / '\u0621'..'\u063a' / '\u0640'..'\u0658' / '\u0660'..'\u0669' / '\u066e'..'\u06d3' / '\u06d5'..'\u06dd' / '\u06df'..'\u06e8' / '\u06ea'..'\u06fc' / '\u06ff' / '\u070f'..'\u074a' / '\u074d'..'\u074f' / '\u0780'..'\u07b1' / '\u0901'..'\u0939' / '\u093c'..'\u094d' / '\u0950'..'\u0954' / '\u0958'..'\u0963' / '\u0966'..'\u096f' / '\u0981'..'\u0983' / '\u0985'..'\u098c' / '\u098f'..'\u0990' / '\u0993'..'\u09a8' / '\u09aa'..'\u09b0' / '\u09b2' / '\u09b6'..'\u09b9' / '\u09bc'..'\u09c4' / '\u09c7'..'\u09c8' / '\u09cb'..'\u09cd' / '\u09d7' / '\u09dc'..'\u09dd' / '\u09df'..'\u09e3' / '\u09e6'..'\u09f3' / '\u0a01'..'\u0a03' / '\u0a05'..'\u0a0a' / '\u0a0f'..'\u0a10' / '\u0a13'..'\u0a28' / '\u0a2a'..'\u0a30' / '\u0a32'..'\u0a33' / '\u0a35'..'\u0a36' / '\u0a38'..'\u0a39' / '\u0a3c' / '\u0a3e'..'\u0a42' / '\u0a47'..'\u0a48' / '\u0a4b'..'\u0a4d' / '\u0a59'..'\u0a5c' / '\u0a5e' / '\u0a66'..'\u0a74' / '\u0a81'..'\u0a83' / '\u0a85'..'\u0a8d' / '\u0a8f'..'\u0a91' / '\u0a93'..'\u0aa8' / '\u0aaa'..'\u0ab0' / '\u0ab2'..'\u0ab3' / '\u0ab5'..'\u0ab9' / '\u0abc'..'\u0ac5' / '\u0ac7'..'\u0ac9' / '\u0acb'..'\u0acd' / '\u0ad0' / '\u0ae0'..'\u0ae3' / '\u0ae6'..'\u0aef' / '\u0af1' / '\u0b01'..'\u0b03' / '\u0b05'..'\u0b0c' / '\u0b0f'..'\u0b10' / '\u0b13'..'\u0b28' / '\u0b2a'..'\u0b30' / '\u0b32'..'\u0b33' / '\u0b35'..'\u0b39' / '\u0b3c'..'\u0b43' / '\u0b47'..'\u0b48' / '\u0b4b'..'\u0b4d' / '\u0b56'..'\u0b57' / '\u0b5c'..'\u0b5d' / '\u0b5f'..'\u0b61' / '\u0b66'..'\u0b6f' / '\u0b71' / '\u0b82'..'\u0b83' / '\u0b85'..'\u0b8a' / '\u0b8e'..'\u0b90' / '\u0b92'..'\u0b95' / '\u0b99'..'\u0b9a' / '\u0b9c' / '\u0b9e'..'\u0b9f' / '\u0ba3'..'\u0ba4' / '\u0ba8'..'\u0baa' / '\u0bae'..'\u0bb5' / '\u0bb7'..'\u0bb9' / '\u0bbe'..'\u0bc2' / '\u0bc6'..'\u0bc8' / '\u0bca'..'\u0bcd' / '\u0bd7' / '\u0be7'..'\u0bef' / '\u0bf9' / '\u0c01'..'\u0c03' / '\u0c05'..'\u0c0c' / '\u0c0e'..'\u0c10' / '\u0c12'..'\u0c28' / '\u0c2a'..'\u0c33' / '\u0c35'..'\u0c39' / '\u0c3e'..'\u0c44' / '\u0c46'..'\u0c48' / '\u0c4a'..'\u0c4d' / '\u0c55'..'\u0c56' / '\u0c60'..'\u0c61' / '\u0c66'..'\u0c6f' / '\u0c82'..'\u0c83' / '\u0c85'..'\u0c8c' / '\u0c8e'..'\u0c90' / '\u0c92'..'\u0ca8' / '\u0caa'..'\u0cb3' / '\u0cb5'..'\u0cb9' / '\u0cbc'..'\u0cc4' / '\u0cc6'..'\u0cc8' / '\u0cca'..'\u0ccd' / '\u0cd5'..'\u0cd6' / '\u0cde' / '\u0ce0'..'\u0ce1' / '\u0ce6'..'\u0cef' / '\u0d02'..'\u0d03' / '\u0d05'..'\u0d0c' / '\u0d0e'..'\u0d10' / '\u0d12'..'\u0d28' / '\u0d2a'..'\u0d39' / '\u0d3e'..'\u0d43' / '\u0d46'..'\u0d48' / '\u0d4a'..'\u0d4d' / '\u0d57' / '\u0d60'..'\u0d61' / '\u0d66'..'\u0d6f' / '\u0d82'..'\u0d83' / '\u0d85'..'\u0d96' / '\u0d9a'..'\u0db1' / '\u0db3'..'\u0dbb' / '\u0dbd' / '\u0dc0'..'\u0dc6' / '\u0dca' / '\u0dcf'..'\u0dd4' / '\u0dd6' / '\u0dd8'..'\u0ddf' / '\u0df2'..'\u0df3' / '\u0e01'..'\u0e3a' / '\u0e3f'..'\u0e4e' / '\u0e50'..'\u0e59' / '\u0e81'..'\u0e82' / '\u0e84' / '\u0e87'..'\u0e88' / '\u0e8a' / '\u0e8d' / '\u0e94'..'\u0e97' / '\u0e99'..'\u0e9f' / '\u0ea1'..'\u0ea3' / '\u0ea5' / '\u0ea7' / '\u0eaa'..'\u0eab' / '\u0ead'..'\u0eb9' / '\u0ebb'..'\u0ebd' / '\u0ec0'..'\u0ec4' / '\u0ec6' / '\u0ec8'..'\u0ecd' / '\u0ed0'..'\u0ed9' / '\u0edc'..'\u0edd' / '\u0f00' / '\u0f18'..'\u0f19' / '\u0f20'..'\u0f29' / '\u0f35' / '\u0f37' / '\u0f39' / '\u0f3e'..'\u0f47' / '\u0f49'..'\u0f6a' / '\u0f71'..'\u0f84' / '\u0f86'..'\u0f8b' / '\u0f90'..'\u0f97' / '\u0f99'..'\u0fbc' / '\u0fc6' / '\u1000'..'\u1021' / '\u1023'..'\u1027' / '\u1029'..'\u102a' / '\u102c'..'\u1032' / '\u1036'..'\u1039' / '\u1040'..'\u1049' / '\u1050'..'\u1059' / '\u10a0'..'\u10c5' / '\u10d0'..'\u10f8' / '\u1100'..'\u1159' / '\u115f'..'\u11a2' / '\u11a8'..'\u11f9' / '\u1200'..'\u1206' / '\u1208'..'\u1246' / '\u1248' / '\u124a'..'\u124d' / '\u1250'..'\u1256' / '\u1258' / '\u125a'..'\u125d' / '\u1260'..'\u1286' / '\u1288' / '\u128a'..'\u128d' / '\u1290'..'\u12ae' / '\u12b0' / '\u12b2'..'\u12b5' / '\u12b8'..'\u12be' / '\u12c0' / '\u12c2'..'\u12c5' / '\u12c8'..'\u12ce' / '\u12d0'..'\u12d6' / '\u12d8'..'\u12ee' / '\u12f0'..'\u130e' / '\u1310' / '\u1312'..'\u1315' / '\u1318'..'\u131e' / '\u1320'..'\u1346' / '\u1348'..'\u135a' / '\u1369'..'\u1371' / '\u13a0'..'\u13f4' / '\u1401'..'\u166c' / '\u166f'..'\u1676' / '\u1681'..'\u169a' / '\u16a0'..'\u16ea' / '\u16ee'..'\u16f0' / '\u1700'..'\u170c' / '\u170e'..'\u1714' / '\u1720'..'\u1734' / '\u1740'..'\u1753' / '\u1760'..'\u176c' / '\u176e'..'\u1770' / '\u1772'..'\u1773' / '\u1780'..'\u17d3' / '\u17d7' / '\u17db'..'\u17dd' / '\u17e0'..'\u17e9' / '\u180b'..'\u180d' / '\u1810'..'\u1819' / '\u1820'..'\u1877' / '\u1880'..'\u18a9' / '\u1900'..'\u191c' / '\u1920'..'\u192b' / '\u1930'..'\u193b' / '\u1946'..'\u196d' / '\u1970'..'\u1974' / '\u1d00'..'\u1d6b' / '\u1e00'..'\u1e9b' / '\u1ea0'..'\u1ef9' / '\u1f00'..'\u1f15' / '\u1f18'..'\u1f1d' / '\u1f20'..'\u1f45' / '\u1f48'..'\u1f4d' / '\u1f50'..'\u1f57' / '\u1f59' / '\u1f5b' / '\u1f5d' / '\u1f5f'..'\u1f7d' / '\u1f80'..'\u1fb4' / '\u1fb6'..'\u1fbc' / '\u1fbe' / '\u1fc2'..'\u1fc4' / '\u1fc6'..'\u1fcc' / '\u1fd0'..'\u1fd3' / '\u1fd6'..'\u1fdb' / '\u1fe0'..'\u1fec' / '\u1ff2'..'\u1ff4' / '\u1ff6'..'\u1ffc' / '\u200c'..'\u200f' / '\u202a'..'\u202e' / '\u203f'..'\u2040' / '\u2054' / '\u2060'..'\u2063' / '\u206a'..'\u206f' / '\u2071' / '\u207f' / '\u20a0'..'\u20b1' / '\u20d0'..'\u20dc' / '\u20e1' / '\u20e5'..'\u20ea' / '\u2102' / '\u2107' / '\u210a'..'\u2113' / '\u2115' / '\u2119'..'\u211d' / '\u2124' / '\u2126' / '\u2128' / '\u212a'..'\u212d' / '\u212f'..'\u2131' / '\u2133'..'\u2139' / '\u213d'..'\u213f' / '\u2145'..'\u2149' / '\u2160'..'\u2183' / '\u3005'..'\u3007' / '\u3021'..'\u302f' / '\u3031'..'\u3035' / '\u3038'..'\u303c' / '\u3041'..'\u3096' / '\u3099'..'\u309a' / '\u309d'..'\u309f' / '\u30a1'..'\u30ff' / '\u3105'..'\u312c' / '\u3131'..'\u318e' / '\u31a0'..'\u31b7' / '\u31f0'..'\u31ff' / '\u3400'..'\u4db5' / '\u4e00'..'\u9fa5' / '\ua000'..'\ua48c' / '\uac00'..'\ud7a3' / '\uf900'..'\ufa2d' / '\ufa30'..'\ufa6a' / '\ufb00'..'\ufb06' / '\ufb13'..'\ufb17' / '\ufb1d'..'\ufb28' / '\ufb2a'..'\ufb36' / '\ufb38'..'\ufb3c' / '\ufb3e' / '\ufb40'..'\ufb41' / '\ufb43'..'\ufb44' / '\ufb46'..'\ufbb1' / '\ufbd3'..'\ufd3d' / '\ufd50'..'\ufd8f' / '\ufd92'..'\ufdc7' / '\ufdf0'..'\ufdfc' / '\ufe00'..'\ufe0f' / '\ufe20'..'\ufe23' / '\ufe33'..'\ufe34' / '\ufe4d'..'\ufe4f' / '\ufe69' / '\ufe70'..'\ufe74' / '\ufe76'..'\ufefc' / '\ufeff' / '\uff04' / '\uff10'..'\uff19' / '\uff21'..'\uff3a' / '\uff3f' / '\uff41'..'\uff5a' / '\uff65'..'\uffbe' / '\uffc2'..'\uffc7' / '\uffca'..'\uffcf' / '\uffd2'..'\uffd7' / '\uffda'..'\uffdc' / '\uffe0'..'\uffe1' / '\uffe5'..'\uffe6' / '\ufff9'..'\ufffb' / ('\ud800'..'\udbff') ('\udc00'..'\udfff')"! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 16:00'! IdentifierStart #letter "'\u0024' / '\u0041'..'\u005a' / '\u005f' / '\u0061'..'\u007a' / '\u00a2'..'\u00a5' / '\u00aa' / '\u00b5' / '\u00ba' / '\u00c0'..'\u00d6' / '\u00d8'..'\u00f6' / '\u00f8'..'\u0236' / '\u0250'..'\u02c1' / '\u02c6'..'\u02d1' / '\u02e0'..'\u02e4' / '\u02ee' / '\u037a' / '\u0386' / '\u0388'..'\u038a' / '\u038c' / '\u038e'..'\u03a1' / '\u03a3'..'\u03ce' / '\u03d0'..'\u03f5' / '\u03f7'..'\u03fb' / '\u0400'..'\u0481' / '\u048a'..'\u04ce' / '\u04d0'..'\u04f5' / '\u04f8'..'\u04f9' / '\u0500'..'\u050f' / '\u0531'..'\u0556' / '\u0559' / '\u0561'..'\u0587' / '\u05d0'..'\u05ea' / '\u05f0'..'\u05f2' / '\u0621'..'\u063a' / '\u0640'..'\u064a' / '\u066e'..'\u066f' / '\u0671'..'\u06d3' / '\u06d5' / '\u06e5'..'\u06e6' / '\u06ee'..'\u06ef' / '\u06fa'..'\u06fc' / '\u06ff' / '\u0710' / '\u0712'..'\u072f' / '\u074d'..'\u074f' / '\u0780'..'\u07a5' / '\u07b1' / '\u0904'..'\u0939' / '\u093d' / '\u0950' / '\u0958'..'\u0961' / '\u0985'..'\u098c' / '\u098f'..'\u0990' / '\u0993'..'\u09a8' / '\u09aa'..'\u09b0' / '\u09b2' / '\u09b6'..'\u09b9' / '\u09bd' / '\u09dc'..'\u09dd' / '\u09df'..'\u09e1' / '\u09f0'..'\u09f3' / '\u0a05'..'\u0a0a' / '\u0a0f'..'\u0a10' / '\u0a13'..'\u0a28' / '\u0a2a'..'\u0a30' / '\u0a32'..'\u0a33' / '\u0a35'..'\u0a36' / '\u0a38'..'\u0a39' / '\u0a59'..'\u0a5c' / '\u0a5e' / '\u0a72'..'\u0a74' / '\u0a85'..'\u0a8d' / '\u0a8f'..'\u0a91' / '\u0a93'..'\u0aa8' / '\u0aaa'..'\u0ab0' / '\u0ab2'..'\u0ab3' / '\u0ab5'..'\u0ab9' / '\u0abd' / '\u0ad0' / '\u0ae0'..'\u0ae1' / '\u0af1' / '\u0b05'..'\u0b0c' / '\u0b0f'..'\u0b10' / '\u0b13'..'\u0b28' / '\u0b2a'..'\u0b30' / '\u0b32'..'\u0b33' / '\u0b35'..'\u0b39' / '\u0b3d' / '\u0b5c'..'\u0b5d' / '\u0b5f'..'\u0b61' / '\u0b71' / '\u0b83' / '\u0b85'..'\u0b8a' / '\u0b8e'..'\u0b90' / '\u0b92'..'\u0b95' / '\u0b99'..'\u0b9a' / '\u0b9c' / '\u0b9e'..'\u0b9f' / '\u0ba3'..'\u0ba4' / '\u0ba8'..'\u0baa' / '\u0bae'..'\u0bb5' / '\u0bb7'..'\u0bb9' / '\u0bf9' / '\u0c05'..'\u0c0c' / '\u0c0e'..'\u0c10' / '\u0c12'..'\u0c28' / '\u0c2a'..'\u0c33' / '\u0c35'..'\u0c39' / '\u0c60'..'\u0c61' / '\u0c85'..'\u0c8c' / '\u0c8e'..'\u0c90' / '\u0c92'..'\u0ca8' / '\u0caa'..'\u0cb3' / '\u0cb5'..'\u0cb9' / '\u0cbd' / '\u0cde' / '\u0ce0'..'\u0ce1' / '\u0d05'..'\u0d0c' / '\u0d0e'..'\u0d10' / '\u0d12'..'\u0d28' / '\u0d2a'..'\u0d39' / '\u0d60'..'\u0d61' / '\u0d85'..'\u0d96' / '\u0d9a'..'\u0db1' / '\u0db3'..'\u0dbb' / '\u0dbd' / '\u0dc0'..'\u0dc6' / '\u0e01'..'\u0e30' / '\u0e32'..'\u0e33' / '\u0e3f'..'\u0e46' / '\u0e81'..'\u0e82' / '\u0e84' / '\u0e87'..'\u0e88' / '\u0e8a' / '\u0e8d' / '\u0e94'..'\u0e97' / '\u0e99'..'\u0e9f' / '\u0ea1'..'\u0ea3' / '\u0ea5' / '\u0ea7' / '\u0eaa'..'\u0eab' / '\u0ead'..'\u0eb0' / '\u0eb2'..'\u0eb3' / '\u0ebd' / '\u0ec0'..'\u0ec4' / '\u0ec6' / '\u0edc'..'\u0edd' / '\u0f00' / '\u0f40'..'\u0f47' / '\u0f49'..'\u0f6a' / '\u0f88'..'\u0f8b' / '\u1000'..'\u1021' / '\u1023'..'\u1027' / '\u1029'..'\u102a' / '\u1050'..'\u1055' / '\u10a0'..'\u10c5' / '\u10d0'..'\u10f8' / '\u1100'..'\u1159' / '\u115f'..'\u11a2' / '\u11a8'..'\u11f9' / '\u1200'..'\u1206' / '\u1208'..'\u1246' / '\u1248' / '\u124a'..'\u124d' / '\u1250'..'\u1256' / '\u1258' / '\u125a'..'\u125d' / '\u1260'..'\u1286' / '\u1288' / '\u128a'..'\u128d' / '\u1290'..'\u12ae' / '\u12b0' / '\u12b2'..'\u12b5' / '\u12b8'..'\u12be' / '\u12c0' / '\u12c2'..'\u12c5' / '\u12c8'..'\u12ce' / '\u12d0'..'\u12d6' / '\u12d8'..'\u12ee' / '\u12f0'..'\u130e' / '\u1310' / '\u1312'..'\u1315' / '\u1318'..'\u131e' / '\u1320'..'\u1346' / '\u1348'..'\u135a' / '\u13a0'..'\u13f4' / '\u1401'..'\u166c' / '\u166f'..'\u1676' / '\u1681'..'\u169a' / '\u16a0'..'\u16ea' / '\u16ee'..'\u16f0' / '\u1700'..'\u170c' / '\u170e'..'\u1711' / '\u1720'..'\u1731' / '\u1740'..'\u1751' / '\u1760'..'\u176c' / '\u176e'..'\u1770' / '\u1780'..'\u17b3' / '\u17d7' / '\u17db'..'\u17dc' / '\u1820'..'\u1877' / '\u1880'..'\u18a8' / '\u1900'..'\u191c' / '\u1950'..'\u196d' / '\u1970'..'\u1974' / '\u1d00'..'\u1d6b' / '\u1e00'..'\u1e9b' / '\u1ea0'..'\u1ef9' / '\u1f00'..'\u1f15' / '\u1f18'..'\u1f1d' / '\u1f20'..'\u1f45' / '\u1f48'..'\u1f4d' / '\u1f50'..'\u1f57' / '\u1f59' / '\u1f5b' / '\u1f5d' / '\u1f5f'..'\u1f7d' / '\u1f80'..'\u1fb4' / '\u1fb6'..'\u1fbc' / '\u1fbe' / '\u1fc2'..'\u1fc4' / '\u1fc6'..'\u1fcc' / '\u1fd0'..'\u1fd3' / '\u1fd6'..'\u1fdb' / '\u1fe0'..'\u1fec' / '\u1ff2'..'\u1ff4' / '\u1ff6'..'\u1ffc' / '\u203f'..'\u2040' / '\u2054' / '\u2071' / '\u207f' / '\u20a0'..'\u20b1' / '\u2102' / '\u2107' / '\u210a'..'\u2113' / '\u2115' / '\u2119'..'\u211d' / '\u2124' / '\u2126' / '\u2128' / '\u212a'..'\u212d' / '\u212f'..'\u2131' / '\u2133'..'\u2139' / '\u213d'..'\u213f' / '\u2145'..'\u2149' / '\u2160'..'\u2183' / '\u3005'..'\u3007' / '\u3021'..'\u3029' / '\u3031'..'\u3035' / '\u3038'..'\u303c' / '\u3041'..'\u3096' / '\u309d'..'\u309f' / '\u30a1'..'\u30ff' / '\u3105'..'\u312c' / '\u3131'..'\u318e' / '\u31a0'..'\u31b7' / '\u31f0'..'\u31ff' / '\u3400'..'\u4db5' / '\u4e00'..'\u9fa5' / '\ua000'..'\ua48c' / '\uac00'..'\ud7a3' / '\uf900'..'\ufa2d' / '\ufa30'..'\ufa6a' / '\ufb00'..'\ufb06' / '\ufb13'..'\ufb17' / '\ufb1d' / '\ufb1f'..'\ufb28' / '\ufb2a'..'\ufb36' / '\ufb38'..'\ufb3c' / '\ufb3e' / '\ufb40'..'\ufb41' / '\ufb43'..'\ufb44' / '\ufb46'..'\ufbb1' / '\ufbd3'..'\ufd3d' / '\ufd50'..'\ufd8f' / '\ufd92'..'\ufdc7' / '\ufdf0'..'\ufdfc' / '\ufe33'..'\ufe34' / '\ufe4d'..'\ufe4f' / '\ufe69' / '\ufe70'..'\ufe74' / '\ufe76'..'\ufefc' / '\uff04' / '\uff21'..'\uff3a' / '\uff3f' / '\uff41'..'\uff5a' / '\uff65'..'\uffbe' / '\uffc2'..'\uffc7' / '\uffca'..'\uffcf' / '\uffd2'..'\uffd7' / '\uffda'..'\uffdc' / '\uffe0'..'\uffe1' / '\uffe5'..'\uffe6' / ('\ud800'..'\udbff') ('\udc00'..'\udfff')"! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:16'! IntegerNumber ($0) / (($1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) star) / ($0 , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus) / (HexPrefix , HexDigit plus)! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LBRACE '{' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LBRACKET '[' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! LONG 'long' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! LONGLITERAL (IntegerNumber , LongSuffix) javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LPAREN '(' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LT '<' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LTEQ '<=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LTLT '<<' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! LTLTEQ '<<=' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:16'! LongSuffix $l / $L! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! MONKEYSAT '@' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! NATIVE 'native' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! NEW 'new' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! NULL 'null' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:17'! NonIntegerNumber (($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus , $. , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) star , Exponent optional) / ($. , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus , Exponent optional) / (($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus , Exponent) / (($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus) / (HexPrefix , HexDigit star , ($. , HexDigit star) optional , ($p / $P) , ($+ / $-) optional , ($0 / $1 / $2 / $3 / $4 / $5 / $6 / $7 / $8 / $9) plus)! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! PACKAGE 'package' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! PERCENT '%' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! PERCENTEQ '%=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! PLUS '+' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! PLUSEQ '+=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! PLUSPLUS '++' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! PRIVATE 'private' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! PROTECTED 'protected' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! PUBLIC 'public' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! QUES '?' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! RBRACE '}' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! RBRACKET ']' javaToken ! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! RETURN 'return' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! RPAREN ')' javaToken ! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SEMI ';' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! SHORT 'short' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SLASH '/' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SLASHEQ '/=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! STAR '*' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! STAREQ '*=' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! STATIC 'static' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! STRICTFP 'strictfp' javaToken! ! !LBJavaGrammar methodsFor: 'token' stamp: 'lr 9/11/2010 11:27'! STRINGLITERAL ($" , (EscapeSequence / (($" / $\ / '\r' / '\n') not , #any)) star , $") javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SUB '-' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SUBEQ '-=' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! SUBSUB '--' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! SUPER 'super' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! SWITCH 'switch' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! SYNCHRONIZED 'synchronized' javaToken! ! !LBJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:58'! SurrogateIdentifer #word "('\ud800'..'\udbff') ('\udc00'..'\udfff')"! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! THIS 'this' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! THROW 'throw' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! THROWS 'throws' javaToken! ! !LBJavaGrammar methodsFor: 'token-chars' stamp: 'lr 9/11/2010 11:27'! TILDE '~' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! TRANSIENT 'transient' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! TRUE 'true' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! TRY 'try' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! VOID 'void' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! VOLATILE 'volatile' javaToken! ! !LBJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 9/11/2010 11:27'! WHILE 'while' javaToken! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:46'! additiveExpression multiplicativeExpression , ((PLUS / SUB) , multiplicativeExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/3/2009 16:32'! andExpression equalityExpression , (AMP , equalityExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:26'! annotation MONKEYSAT , qualifiedName , (LPAREN , (elementValuePairs / elementValue) optional , RPAREN) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:05'! annotationHeader modifiers , MONKEYSAT , INTERFACE , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:27'! annotationMethodDeclaration modifiers , type , IDENTIFIER , LPAREN , RPAREN , (DEFAULT , elementValue) optional , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:28'! annotationTypeBody LBRACE , (annotationTypeElementDeclaration) star , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:28'! annotationTypeDeclaration modifiers , MONKEYSAT , INTERFACE , IDENTIFIER , annotationTypeBody! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:29'! annotationTypeElementDeclaration annotationMethodDeclaration / interfaceFieldDeclaration / normalClassDeclaration / normalInterfaceDeclaration / enumDeclaration / annotationTypeDeclaration / SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:29'! annotations annotation plus! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:30'! arguments LPAREN , expressionList optional , RPAREN! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:33'! arrayCreator (NEW , createdName , (LBRACKET , RBRACKET) plus , arrayInitializer) / (NEW , createdName , (LBRACKET , expression , RBRACKET) plus , (LBRACKET , RBRACKET) star)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:34'! arrayInitializer LBRACE , (variableInitializer , (COMMA , variableInitializer) star) optional , COMMA optional , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:37'! assignmentOperator EQ / PLUSEQ / SUBEQ / STAREQ / SLASHEQ / AMPEQ / BAREQ / CARETEQ / PERCENTEQ / LTLTEQ / GTGTGTEQ / GTGTEQ! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:38'! block LBRACE , blockStatement star , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:38'! blockStatement localVariableDeclarationStatement / classOrInterfaceDeclaration / statement! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! castExpression (LPAREN , primitiveType , RPAREN , unaryExpression) / (LPAREN , type , RPAREN , unaryExpressionNotPlusMinus)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:06'! catchClause CATCH , LPAREN , formalParameter , RPAREN , block! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:06'! catches catchClause , catchClause star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:07'! classBody LBRACE , classBodyDeclaration star , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:07'! classBodyDeclaration (SEMI) / (STATIC optional , block) / (memberDecl)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classCreatorRest arguments , classBody optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classDeclaration normalClassDeclaration / enumDeclaration! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classHeader modifiers , CLASS , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classOrInterfaceDeclaration classDeclaration / interfaceDeclaration! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:09'! classOrInterfaceType IDENTIFIER , typeArguments optional , (DOT , IDENTIFIER , typeArguments optional) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:09'! compilationUnit annotations optional , packageDeclaration optional , importDeclaration star , typeDeclaration star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:10'! conditionalAndExpression inclusiveOrExpression , (AMPAMP , inclusiveOrExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:10'! conditionalExpression conditionalOrExpression , (QUES , expression , COLON , conditionalExpression) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:11'! conditionalOrExpression conditionalAndExpression , (BARBAR , conditionalAndExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:11'! createdName classOrInterfaceType / primitiveType! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:12'! creator (NEW , nonWildcardTypeArguments , classOrInterfaceType , classCreatorRest) / (NEW , classOrInterfaceType , classCreatorRest) / (arrayCreator)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:12'! elementValue conditionalExpression / annotation / elementValueArrayInitializer! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 14:02'! elementValueArrayInitializer LBRACE , (elementValue delimitedBy: COMMA) star , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:13'! elementValuePair IDENTIFIER , EQ , elementValue! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:13'! elementValuePairs elementValuePair , (COMMA , elementValuePair) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:14'! ellipsisParameterDecl variableModifiers , type , ELLIPSIS , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:14'! enumBody LBRACE , enumConstants optional , COMMA optional , enumBodyDeclarations optional , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumBodyDeclarations SEMI , classBodyDeclaration star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumConstant annotations optional , IDENTIFIER , arguments optional , classBody optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumConstants enumConstant , (COMMA , enumConstant) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! enumDeclaration modifiers , ENUM , IDENTIFIER , (IMPLEMENTS , typeList) optional , enumBody! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:16'! enumHeader modifiers , (ENUM / IDENTIFIER) , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:17'! equalityExpression instanceOfExpression , ((EQEQ / BANGEQ) , instanceOfExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:17'! exclusiveOrExpression andExpression , (CARET , andExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:19'! explicitConstructorInvocation (nonWildcardTypeArguments optional , (THIS / SUPER) , arguments , SEMI) / (primary , DOT , nonWildcardTypeArguments optional , SUPER , arguments , SEMI)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:29'! expression conditionalExpression , (assignmentOperator , expression) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:20'! expressionList expression , (COMMA , expression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:20'! fieldDeclaration modifiers , type , variableDeclarator , (COMMA , variableDeclarator) star , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:21'! fieldHeader modifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ / COMMA / SEMI)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:21'! forInit localVariableDeclaration / expressionList! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:07'! formalParameter variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:24'! formalParameterDecls (ellipsisParameterDecl) / (normalParameterDecl , (COMMA , normalParameterDecl) star) / ((normalParameterDecl , COMMA) plus , ellipsisParameterDecl)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:25'! formalParameters LPAREN , formalParameterDecls optional , RPAREN! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:25'! forstatement forstatementEnhanced / forstatementNormal! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:27'! forstatementEnhanced FOR , LPAREN , variableModifiers , type , IDENTIFIER , COLON , expression , RPAREN , statement! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:26'! forstatementNormal FOR , LPAREN , forInit optional , SEMI , expression optional , SEMI , expressionList optional , RPAREN , statement! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:50'! identifierSuffix ((LBRACKET , RBRACKET) plus , DOT , CLASS) / ((LBRACKET , expression , RBRACKET) plus) / (arguments) / (DOT , CLASS) / (DOT , nonWildcardTypeArguments , IDENTIFIER , arguments) / (DOT , THIS) / (DOT , SUPER , arguments) / (innerCreator)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:53'! importDeclaration (IMPORT , STATIC optional , IDENTIFIER , DOT , STAR , SEMI) / (IMPORT , STATIC optional , IDENTIFIER , (DOT , IDENTIFIER) plus , (DOT , STAR) optional , SEMI)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:53'! inclusiveOrExpression exclusiveOrExpression , (BAR , exclusiveOrExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:54'! innerCreator DOT , NEW , nonWildcardTypeArguments optional , IDENTIFIER , typeArguments optional , classCreatorRest! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:54'! instanceOfExpression relationalExpression , (INSTANCEOF , type) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:55'! interfaceBody LBRACE , interfaceBodyDeclaration star , RBRACE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:55'! interfaceBodyDeclaration interfaceFieldDeclaration / interfaceMethodDeclaration / interfaceDeclaration / classDeclaration / SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceDeclaration normalInterfaceDeclaration / annotationTypeDeclaration! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceFieldDeclaration modifiers , type , variableDeclarator , (COMMA , variableDeclarator) star , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceHeader modifiers , INTERFACE , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:58'! interfaceMethodDeclaration modifiers , typeParameters optional , (type / VOID) , IDENTIFIER , formalParameters , (LBRACKET , RBRACKET) star , (THROWS , qualifiedNameList) optional , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:58'! literal INTLITERAL / LONGLITERAL / FLOATLITERAL / DOUBLELITERAL / CHARLITERAL / STRINGLITERAL / TRUE / FALSE / NULL! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableDeclaration variableModifiers , type , variableDeclarator , (COMMA , variableDeclarator) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableDeclarationStatement localVariableDeclaration , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableHeader variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ / COMMA / SEMI)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:00'! memberDecl fieldDeclaration / methodDeclaration / classDeclaration / interfaceDeclaration! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:05'! methodDeclaration (modifiers , typeParameters optional , IDENTIFIER , formalParameters , (THROWS , qualifiedNameList) optional , LBRACE , explicitConstructorInvocation optional , blockStatement star , RBRACE) / (modifiers , typeParameters optional , (type / VOID) , IDENTIFIER , formalParameters , (LBRACKET , RBRACKET) star , (THROWS , qualifiedNameList) optional , (block / SEMI))! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:01'! methodHeader modifiers , typeParameters optional , (type / VOID) optional , IDENTIFIER , LPAREN! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:03'! modifiers (annotation / PUBLIC / PROTECTED / PRIVATE / STATIC / ABSTRACT / FINAL / NATIVE / SYNCHRONIZED / TRANSIENT / VOLATILE / STRICTFP) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 15:17'! multiplicativeExpression unaryExpression . ((STAR / SLASH / PERCENT) , unaryExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:04'! nonWildcardTypeArguments LT , typeList , GT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:05'! normalClassDeclaration modifiers , CLASS , IDENTIFIER , typeParameters optional , (EXTENDS , type) optional , (IMPLEMENTS , typeList) optional , classBody! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:05'! normalInterfaceDeclaration modifiers , INTERFACE , IDENTIFIER , typeParameters optional , (EXTENDS , typeList) optional , interfaceBody! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! normalParameterDecl variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! packageDeclaration PACKAGE , qualifiedName , SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! parExpression LPAREN , expression , RPAREN! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:00'! primary (parExpression) / (THIS , (DOT , IDENTIFIER) star , identifierSuffix optional) / (IDENTIFIER , (DOT , IDENTIFIER) star , identifierSuffix optional) / (SUPER , superSuffix) / (literal) / (creator) / (primitiveType , (LBRACKET , RBRACKET) star , DOT , CLASS) / (VOID , DOT , CLASS)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! primitiveType BOOLEAN / CHAR / BYTE / SHORT / INT / LONG / FLOAT / DOUBLE! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:53'! qualifiedImportName IDENTIFIER separatedBy: DOT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:51'! qualifiedName IDENTIFIER separatedBy: DOT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:52'! qualifiedNameList qualifiedName separatedBy: COMMA! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:09'! relationalExpression shiftExpression , (relationalOp , shiftExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:10'! relationalOp LTEQ / GTEQ / LT / GT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:33'! selector (DOT , IDENTIFIER , arguments optional) / (DOT , THIS) / (DOT , SUPER , superSuffix) / (innerCreator) / (LBRACKET , expression , RBRACKET)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:10'! shiftExpression additiveExpression , (shiftOp , additiveExpression) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:11'! shiftOp LTLT / GTGTGT / GTGT! ! !LBJavaGrammar methodsFor: 'accessing' stamp: 'lr 5/5/2009 11:28'! start compilationUnit! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:07'! statement (block) / (ASSERT , expression , (COLON , expression) optional , SEMI) / (IF , parExpression , statement , (ELSE , statement) optional) / (forstatement) / (WHILE , parExpression , statement) / (DO , statement , WHILE , parExpression , SEMI) / (trystatement) / (SWITCH , parExpression , LBRACE , switchBlockStatementGroups , RBRACE) / (SYNCHRONIZED , parExpression , block) / (RETURN , expression optional , SEMI) / (THROW , expression , SEMI) / (BREAK , IDENTIFIER optional , SEMI) / (CONTINUE , IDENTIFIER optional , SEMI) / (expression , SEMI) / (IDENTIFIER , COLON , statement) / (SEMI)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:31'! superSuffix (arguments) / (DOT , typeArguments optional , IDENTIFIER , arguments optional)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:19'! switchBlockStatementGroup switchLabel , blockStatement star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:20'! switchBlockStatementGroups switchBlockStatementGroup star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:20'! switchLabel (CASE , expression , COLON) / (DEFAULT , COLON)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:21'! trystatement TRY , block , ((catches , FINALLY , block) / catches / (FINALLY , block))! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:23'! type (classOrInterfaceType , (LBRACKET , RBRACKET) star) / (primitiveType , (LBRACKET , RBRACKET) star)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:24'! typeArgument type / (QUES , ((EXTENDS / SUPER) , type) optional)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:24'! typeArguments LT , typeArgument , (COMMA , typeArgument) star , GT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:25'! typeBound type , (AMP , type) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:25'! typeDeclaration classOrInterfaceDeclaration / SEMI! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeHeader modifiers , (CLASS / ENUM / (MONKEYSAT optional , INTERFACE)) , IDENTIFIER! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeList type , (COMMA , type) star! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeParameter IDENTIFIER , (EXTENDS , typeBound) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeParameters LT , typeParameter , (COMMA , typeParameter) star , GT! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! unaryExpression (PLUS , unaryExpression) / (SUB , unaryExpression) / (PLUS , unaryExpression) / (SUBSUB , unaryExpression) / (unaryExpressionNotPlusMinus)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:29'! unaryExpressionNotPlusMinus (TILDE , unaryExpression) / (BANG , unaryExpression) / (castExpression) / (primary , selector star , (PLUSPLUS / SUBSUB) optional)! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:31'! variableDeclarator IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ , variableInitializer) optional! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:30'! variableInitializer arrayInitializer / expression! ! !LBJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:30'! variableModifiers (FINAL / annotation) star! ! CUCompositeParser subclass: #LBSqlGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Grammar-SQL'! !LBSqlGrammar commentStamp: 'lr 6/30/2009 11:29' prior: 0! command ::= define_data | modify_data | system_command define_data ::= create_command modify_data ::= select_command | insert_command | update_command | delete_command system_command ::= | describe_command | open_command | close_command | save_command | list_command | clear_command | dump_command | help_command create_command ::= ( "CREATE" | "create" ) (character_set)+ "("((character_set)+,)+")" ("WITH"|"with") ("VALUES"|"values") "("((character_set)+,)+")" select_command ::= ("SELECT"|"select") ("*"|(character_set)+) ("FROM"|"from") (character_set)+ [("WHERE"|"where") condition] [("LIMIT"|"limit") (numeric)+] insert_command ::= ( "INSERT" | "insert" ) ("INTO"|"into") (character_set)+ "("((character_set)+,)+")" ("VALUES"|"values") "("((character_set)+,)+")" update_command ::= ("UPDATE"|update") (character_set)+ ("SET"|"set") (character_set)+ "=" (character_set)+ [("WHERE"|"where") condition] delete_command ::= ("DELETE"|"delete") ("FROM"|"from") (character_set)+ [("WHERE"|"where") condition] open_command ::= ("OPEN"|"open") (character_set)+ close_command ::= ("CLOSE"|"close") (character_set)+ save_command ::= ("SAVE"|"save") | ("SAVE"|"save") ("AS"|"as") (character_set)+ list ::= ("LS"|"ls"|"DIR"|"dir") | ("LS"|"ls"|"DIR"|"dir") (character_set)+ clear ::= ("CLEAR"|"clear"|"CLS"|"cls") dump ::= ("DUMP"|"dump") help ::= ("help"|"HELP"|"/HELP"|"/help"|"/?") condition ::= (character_set)+ (["<"|">"|"!!"]=|["<"|">"|"="]) (character_set)+ [(("AND"|"and")|("OR"|"or")) (character_set)+ (["<"|">"|"!!"]=|["<"|">"|"="]) (character_set)+] character_set ::= "a"|"b"|"c"|"d"|"e"|"f"|"g"|"h"|"i"|"j"|"k"|"l"|"m" "n"|"o"|"p"|"q"|"r"|"s"|"t"|"u"|"v"|"w"|"x"|"y"|"z" |"A"|"B"|"C"|"D"|"E"|"F"|"G"|"H"|"I"|"J"|"K"|"L"|"M" |"N"|"O"|"P"|"Q"|"R"|"S"|"T"|"U"|"V"|"W"|"X"|"Y"|"Z" |"0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9" |"-"|"_"|"("|")"|"."|","|"""|"/"|"\"|"@"|"#"|"~"|"|" |"*"|"&"|"%"|"$"|"¦Ç¬£"|"!!"|"+"|"?"|">"|"<"|"=" numeric ::= "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9" ! LBSqlGrammar subclass: #LBSqlCompiler instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Grammar-SQL'! !LBSqlCompiler class methodsFor: 'accessing' stamp: 'lr 6/30/2009 13:56'! concern ^ #compile:! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 6/30/2009 11:46'! command createCommand / deleteCommand / insertCommand / selectCommand / updateCommand! ! !LBSqlGrammar methodsFor: 'operators' stamp: 'lr 6/30/2009 12:20'! comparison expression , operator , expression! ! !LBSqlGrammar methodsFor: 'operators' stamp: 'lr 6/30/2009 12:20'! condition comparison separatedBy: logic! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 5/4/2010 14:10'! createCommand 'CREATE' token trim , expression , $( token trim , sequence , $) token trim , 'WITH' token trim , 'VALUES' token trim , $( token trim , sequence , $) token trim! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 5/4/2010 14:10'! deleteCommand 'DELETE' token trim , 'FROM' token trim , expression , whereClause optional! ! !LBSqlGrammar methodsFor: 'operators' stamp: 'lr 6/30/2009 12:27'! expression identifier / number / string! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! identifier #letter plus token trim! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 5/4/2010 14:10'! insertCommand 'INSERT' token trim , 'INTO' token trim , expression , $( token trim , sequence , $) token trim , 'VALUES' token trim , $( token trim , sequence , $) token trim! ! !LBSqlGrammar methodsFor: 'clauses' stamp: 'lr 5/4/2010 14:10'! limitClause 'LIMIT' token trim , number! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! logic ('AND' / 'OR') token trim! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! number #digit plus token trim! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! operator ('<=' / '>=' / '!!=' / '<' / '>' / '=') token trim! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 5/4/2010 14:10'! selectCommand 'SELECT' token trim , ($* token trim / sequence) , 'FROM' token trim , sequence , whereClause optional , limitClause optional! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! sequence expression separatedBy: $, token trim! ! !LBSqlGrammar methodsFor: 'accessing' stamp: 'lr 7/1/2009 09:54'! start command! ! !LBSqlGrammar methodsFor: 'tokens' stamp: 'lr 5/4/2010 14:11'! string ($" , $" negate star , $") token trim! ! !LBSqlGrammar methodsFor: 'private' stamp: 'lr 5/4/2010 14:09'! tokenParser ^ LBSqlTokenParser! ! !LBSqlGrammar methodsFor: 'commands' stamp: 'lr 5/4/2010 14:11'! updateCommand 'UPDATE' token trim , expression , 'SET' token trim , expression , $= token trim , expression , whereClause optional! ! !LBSqlGrammar methodsFor: 'clauses' stamp: 'lr 5/4/2010 14:10'! whereClause 'WHERE' token trim , condition! ! LBSqlGrammar subclass: #LBSqlHighlighter instanceVariableNames: '' classVariableNames: 'IdentifierLiteral KeywordToken LogicToken NumberLiteral OperatorToken StringLiteral' poolDictionaries: '' category: 'LanguageBoxes-Grammar-SQL'! !LBSqlHighlighter class methodsFor: 'accessing' stamp: 'lr 6/30/2009 13:56'! concern ^ #highlight:! ! !LBSqlHighlighter class methodsFor: 'initialization' stamp: 'lr 6/30/2009 14:12'! initialize KeywordToken := Array with: TextEmphasis bold with: Color cyan muchDarker. LogicToken := KeywordToken. OperatorToken := Color black. IdentifierLiteral := Color blue muchDarker. NumberLiteral := Color magenta muchDarker. StringLiteral := Color magenta muchDarker! ! !LBSqlHighlighter methodsFor: 'commands' stamp: 'lr 6/30/2009 13:46'! command super command ==> [ :nodes | self highlightKeywords: nodes ]! ! !LBSqlHighlighter methodsFor: 'utilities' stamp: 'lr 6/30/2009 13:49'! highlightKeywords: aCollection ^ aCollection flatten collect: [ :each | (each class = PPToken and: [ each size > 1 ]) ifTrue: [ each -> KeywordToken ] ifFalse: [ each ] ]! ! !LBSqlHighlighter methodsFor: 'tokens' stamp: 'lr 6/30/2009 13:46'! identifier super identifier ==> [ :token | token -> IdentifierLiteral ]! ! !LBSqlHighlighter methodsFor: 'tokens' stamp: 'lr 6/30/2009 13:46'! logic super logic ==> [ :token | token -> LogicToken ]! ! !LBSqlHighlighter methodsFor: 'tokens' stamp: 'lr 6/30/2009 13:46'! number super number ==> [ :token | token -> NumberLiteral ]! ! !LBSqlHighlighter methodsFor: 'tokens' stamp: 'lr 6/30/2009 13:46'! operator super operator ==> [ :token | token -> OperatorToken ]! ! !LBSqlHighlighter methodsFor: 'tokens' stamp: 'lr 6/30/2009 13:46'! string super string ==> [ :token | token -> StringLiteral ]! ! !QQQuoteNode class methodsFor: '*languageboxes' stamp: 'lr 4/6/2009 10:37'! highlight: aCollection ^ CHHighlighter mark: aCollection with: (CHHighlightAttribute new color: (Color black alpha: 0.1); outline: 2; yourself)! ! !CompiledMethod methodsFor: '*languageboxes' stamp: 'lr 10/30/2008 15:11'! isBroken ^ false! ! !QQMetaNode class methodsFor: '*languageboxes' stamp: 'lr 2/3/2009 18:49'! highlight: aCollection ^ aCollection! ! CHRule subclass: #LBHighlightAction instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Helvetia'! !LBHighlightAction methodsFor: 'visiting' stamp: 'lr 10/15/2010 12:00'! acceptDsl: aVisitor | parser offset tokens | parser := self highlighterClass new. LBLanguageBox activeFor: aVisitor do: [ :box | box modify: parser ]. aVisitor text removeAttributesFrom: aVisitor scopeStart to: aVisitor scopeStop. offset := aVisitor scopeStart - 1. tokens :=aVisitor isDoIt ifTrue: [ parser parseExpression: aVisitor scopedText readStream onError: [ :msg :pos | #() ] ] ifFalse: [ parser parseMethod: aVisitor scopedText readStream onError: [ :msg :pos | #() ] ]. tokens flattenedDo: [ :each | (each isVariableBinding and: [ each key isKindOf: PPToken ]) ifTrue: [ aVisitor scopeFrom: offset + each key start to: offset + each key stop with: nil visit: each value. each key comments do: [ :interval | aVisitor scopeFrom: offset + interval first to: offset + interval last with: nil visit: (LBSmalltalkHighlighter classPool at: #CommentColor) ] ]. (each isKindOf: PPToken) ifTrue: [ each comments do: [ :interval | aVisitor scopeFrom: offset + interval first to: offset + interval last with: nil visit: (LBSmalltalkHighlighter classPool at: #CommentColor) ] ] ]! ! !LBHighlightAction methodsFor: 'accessing' stamp: 'lr 9/2/2010 19:13'! highlighterClass ^ LBSmalltalkHighlighter! ! CHRule subclass: #LBParseAction instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Helvetia'! !LBParseAction methodsFor: 'visiting' stamp: 'lr 9/2/2010 15:49'! acceptDsl: aVisitor | parser | parser := self parserClass new. LBLanguageBox activeFor: aVisitor do: [ :box | box modify: parser ]. ^ aVisitor isDoIt ifTrue: [ parser parseExpression: aVisitor stream onError: [ :msg :pos | CHParserError signal: msg at: pos ] ] ifFalse: [ parser parseMethod: aVisitor stream onError: [ :msg :pos | CHParserError signal: msg at: pos ] ]! ! !LBParseAction methodsFor: 'accessing' stamp: 'lr 9/11/2010 11:37'! parserClass ^ PPSmalltalkParser! ! !PPToken methodsFor: '*languageboxes' stamp: 'lr 10/15/2010 11:57'! comments ^ #()! ! PPTokenParser subclass: #LBSqlTokenParser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Grammar-SQL'! !LBSqlTokenParser methodsFor: 'parsing' stamp: 'lr 5/4/2010 14:08'! parse: aStream | start element stop | self consumeSpacesBefore: aStream. start := aStream position. element := parser class = PPLiteralSequenceParser ifFalse: [ super parse: aStream ] ifTrue: [ | input | input := aStream next: parser string size. (input sameAs: parser string) ifTrue: [ input ] ifFalse: [ PPFailure reason: parser string , ' expected' at: start ] ]. element isPetitFailure ifTrue: [ ^ element ]. stop := aStream position. self consumeSpacesAfter: aStream. ^ self create: aStream collection start: start + 1 stop: stop! ! PPSmalltalkGrammar subclass: #LBSmalltalkHighlighter instanceVariableNames: '' classVariableNames: 'ArrayLiteral AssignmentToken BlockBrackets ByteLiteral CharLiteral CommentColor ExpressionBrackets FalseLiteral GlobalVariableTag MethodTag NilLiteral NumberLiteral PragmaTag ReturnTag SelfVariable StringLiteral SuperVariable SymbolLiteral TempToken ThisContextVariable TrueLiteral VariableTag' poolDictionaries: '' category: 'LanguageBoxes-Grammar-Smalltalk'! !LBSmalltalkHighlighter class methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:30'! concern ^ #highlight:! ! !LBSmalltalkHighlighter class methodsFor: 'initialization' stamp: 'lr 1/30/2009 15:48'! initialize MethodTag := TextEmphasis bold. PragmaTag := Color gray muchDarker. ReturnTag := TextEmphasis bold. VariableTag := Color blue muchDarker. GlobalVariableTag := Color blue muchDarker. SelfVariable := Color cyan muchDarker. SuperVariable := Color cyan muchDarker. ThisContextVariable := Color cyan muchDarker. NilLiteral := Color cyan muchDarker. FalseLiteral := Color cyan muchDarker. TrueLiteral := Color cyan muchDarker. CharLiteral := Color magenta muchDarker. StringLiteral := Color magenta muchDarker. SymbolLiteral := Color magenta muchDarker. NumberLiteral := Color magenta muchDarker. ArrayLiteral := Color magenta muchDarker. ByteLiteral := Color magenta muchDarker. TempToken := nil. BlockBrackets := nil. AssignmentToken := nil. ExpressionBrackets := nil. CommentColor := Color green muchDarker! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:22'! arrayLiteral ^ super arrayLiteral ==> [ :token | token at: 1 put: token first -> ArrayLiteral; at: token size put: token last -> ArrayLiteral; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:22'! arrayLiteralArray ^ super arrayLiteralArray ==> [ :token | token at: 1 put: token first -> ArrayLiteral; at: token size put: token last -> ArrayLiteral; yourself ].! ! !LBSmalltalkHighlighter methodsFor: 'token' stamp: 'lr 9/2/2010 19:25'! assignmentToken ^ super assignmentToken ==> [ :token | token -> AssignmentToken ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-blocks' stamp: 'lr 9/2/2010 19:18'! block ^ super block ==> [ :token | token at: 1 put: token first -> BlockBrackets; at: token size put: token last -> BlockBrackets; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-blocks' stamp: 'lr 10/15/2010 11:49'! blockBody ^ super blockBody ==> [ :nodes | nodes first last isNil ifFalse: [ nodes first at: nodes first size put: nodes first last -> BlockBrackets ]. nodes ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! byteLiteral ^ super byteLiteral ==> [ :token | token at: 1 put: token first -> ByteLiteral; at: token size put: token last -> ByteLiteral; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:23'! byteLiteralArray ^ super byteLiteralArray ==> [ :token | token at: 1 put: token first -> ByteLiteral; at: token size put: token last -> ByteLiteral; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! charLiteral ^ super charLiteral ==> [ :token | token -> CharLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! falseLiteral ^ super falseLiteral ==> [ :token | token -> FalseLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'private' stamp: 'lr 4/2/2009 15:32'! mark: aCollection with: anObject ^ CHHighlighter mark: aCollection with: anObject! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:17'! methodDeclaration ^ super methodDeclaration ==> [ :nodes | self mark: nodes with: MethodTag ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! nilLiteral ^ super nilLiteral ==> [ :token | token -> NilLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! numberLiteral ^ super numberLiteral ==> [ :token | token -> NumberLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:18'! parens ^ super parens ==> [ :token | token at: 1 put: token first -> ExpressionBrackets; at: token size put: token last -> ExpressionBrackets; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:18'! pragma ^ super pragma ==> [ :nodes | self mark: nodes with: PragmaTag ] ! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:18'! return ^ super return ==> [ :nodes | nodes at: 1 put: nodes first -> ReturnTag; yourself ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! stringLiteral ^ super stringLiteral ==> [ :token | token -> StringLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! symbolLiteral ^ super symbolLiteral ==> [ :token | token -> SymbolLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:25'! symbolLiteralArray ^ super symbolLiteralArray ==> [ :token | token -> SymbolLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:18'! temporaries ^ super temporaries ==> [ :nodes | nodes isEmpty ifFalse: [ nodes at: 1 put: nodes first -> TempToken; at: nodes size put: nodes last -> TempToken ]. nodes ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 9/2/2010 19:24'! trueLiteral ^ super trueLiteral ==> [ :token | token -> TrueLiteral ]! ! !LBSmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 9/2/2010 19:18'! variable ^ super variable ==> [ :token | token value = 'self' ifTrue: [ token -> SelfVariable ] ifFalse: [ token value = 'super' ifTrue: [ token -> SuperVariable ] ifFalse: [ token value = 'thisContext' ifTrue: [ token -> ThisContextVariable ] ifFalse: [ (Smalltalk hasClassNamed: token value) ifTrue: [ token -> GlobalVariableTag ] ifFalse: [ token -> VariableTag ] ] ] ] ]! ! !QQUnquoteNode class methodsFor: '*languageboxes' stamp: 'lr 4/6/2009 10:38'! highlight: aCollection ^ CHHighlighter mark: aCollection with: (CHHighlightAttribute new borderColor: Color darkGray; borderWidth: 1; yourself)! ! !Collection methodsFor: '*languageboxes' stamp: 'lr 9/2/2010 16:01'! flatten ^ Array streamContents: [ :stream | self flattenedDo: [ :each | stream nextPut: each ] ]! ! !Collection methodsFor: '*languageboxes' stamp: 'lr 9/2/2010 16:02'! flattenedDo: aBlock self do: [ :each | (each isCollection and: [ each isString not ]) ifTrue: [ each flattenedDo: aBlock ] ifFalse: [ aBlock value: each ] ]! ! !OBCodeBrowser methodsFor: '*languageboxes' stamp: 'lr 11/9/2010 12:46'! languageBoxProviderCommands ^ LBCmdProvider allSubclasses! ! !OBCodeBrowser methodsFor: '*languageboxes' stamp: 'lr 11/9/2010 12:46'! languageBoxUserCommands ^ LBCmdUser allSubclasses! ! OBFilter subclass: #LBBrokenMethodFilter instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-OmniBrowser'! !LBBrokenMethodFilter methodsFor: 'filtering' stamp: 'lr 9/12/2010 10:40'! displayString: aString forNode: aNode ^ (aNode isMethodNode and: [ (aNode theClass compiledMethodAt: aNode selector) isBroken ]) ifTrue: [ aString asText addAttribute: TextColor red ] ifFalse: [ aString ]! ! !PPParser methodsFor: '*languageboxes' stamp: 'lr 9/11/2010 11:30'! javaToken ^ LBJavaCommentGrammar on: self! ! TestCase subclass: #LBGrammarTest instanceVariableNames: 'result' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests'! !LBGrammarTest class methodsFor: 'testing' stamp: 'lr 6/23/2009 10:57'! isAbstract ^ self name = #LBGrammarTest! ! !LBGrammarTest class methodsFor: 'accessing' stamp: 'lr 6/23/2009 10:57'! resources ^ Array with: LBGrammarResource! ! !LBGrammarTest methodsFor: 'parsing' stamp: 'lr 5/7/2009 10:15'! parse: aString self parse: aString rule: #start! ! !LBGrammarTest methodsFor: 'parsing' stamp: 'lr 5/4/2010 14:12'! parse: aString rule: aSymbol | production | production := self parser. aSymbol = #start ifFalse: [ production := production productionAt: aSymbol ]. result := production parse: aString. self deny: result isPetitFailure description: 'Unable to parse ' , aString printString! ! !LBGrammarTest methodsFor: 'accessing' stamp: 'lr 6/23/2009 10:57'! parser ^ LBGrammarResource current parserAt: self parserClass! ! !LBGrammarTest methodsFor: 'accessing' stamp: 'lr 6/30/2009 14:03'! parserClass self subclassResponsibility! ! LBGrammarTest subclass: #LBJavaCommentGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-Java'! !LBJavaCommentGrammarTests methodsFor: 'accessing' stamp: 'lr 6/23/2009 10:57'! parserClass ^ LBJavaCommentGrammar! ! !LBJavaCommentGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 11:03'! testComment self parse: '/* * This is a normal comment */'. self assert: result value = '/* * This is a normal comment */'! ! !LBJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:02'! testCrLf self parse: String crlf. self assert: result value = String crlf! ! !LBJavaCommentGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 11:02'! testJavadoc self parse: '/** * This is a dummy Javadoc */'. self assert: result value = '/** * This is a dummy Javadoc */'! ! !LBJavaCommentGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 11:04'! testLine self parse: '// There are dragons'. self assert: result value = '// There are dragons'! ! !LBJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:03'! testSpace self parse: ' '. self assert: result value = ' '! ! !LBJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:03'! testTab self parse: ' '. self assert: result value = ' '! ! LBGrammarTest subclass: #LBJavaGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-Java'! !LBJavaGrammarTests methodsFor: 'accessing' stamp: 'lr 6/23/2009 10:57'! parserClass ^ LBJavaGrammar! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testAnnotation1 self parse: '@interface' rule: #annotation! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:59'! testAnnotation2 self parse: '@interface()' rule: #annotation! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 14:21'! testAnnotation3 self parse: '@Copyright("2002 Yoyodyne Propulsion Systems")' rule: #annotation! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:58'! testAnnotation4 self parse: '@RequestForEnhancement( id = 2868724, synopsis = "Enable time-travel", engineer = "Mr. Peabody", date = "4/1/3007" )' rule: #annotation! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:10'! testBoolLiteral1 self parse: 'true' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:10'! testBoolLiteral2 self parse: 'false' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral1 self parse: '''a''' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral2 self parse: '''3''' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral3 self parse: '''\n''' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral4 self parse: '''\t''' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral1 self parse: '6.5E+32' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral2 self parse: '7D' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral3 self parse: '.01f' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral1 self parse: '123' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral2 self parse: '123' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral3 self parse: '0x4a' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral4 self parse: '057' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:12'! testNullLiteral self parse: 'null' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testQualifiedName1 self parse: 'org' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testQualifiedName2 self parse: 'org.java' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:55'! testQualifiedName3 self parse: 'org.java.swing' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:55'! testQualifiedNameList1 self parse: 'org.java' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:56'! testQualifiedNameList2 self parse: 'org.java, org.java.swing' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:56'! testQualifiedNameList3 self parse: 'org.java, org.java, com.sun' rule: #qualifiedName! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral1 self parse: '""' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral2 self parse: '"\""' rule: #literal! ! !LBJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral3 self parse: '"This is a string"' rule: #literal! ! LBGrammarTest subclass: #LBJavaPackagesTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-Java'! !LBJavaPackagesTests methodsFor: 'accessing' stamp: 'lr 6/23/2009 10:57'! parserClass ^ LBJavaGrammar! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:40'! testHelloApple self parse: '// Hello.java import javax.swing.JApplet; import java.awt.Graphics; public class Hello extends JApplet { public void paintComponent(Graphics g) { g.drawString("Hello, world!!", 65, 95); } }'! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 10:48'! testHelloServlet self parse: '// Hello.java import java.io.*; import javax.servlet.*; public class Hello extends GenericServlet { public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); final PrintWriter pw = response.getWriter(); pw.println("Hello, world!!"); pw.close(); } }'! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 10:48'! testHelloSwing self parse: '// Hello.java (Java SE 5) import java.awt.BorderLayout; import javax.swing.*; public class Hello extends JFrame { public Hello() { super("hello"); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setLayout(new BorderLayout()); add(new JLabel("Hello, world!!")); pack(); } public static void main(String[] args) { new Hello().setVisible(true); } }'! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 10:46'! testHelloWorld self parse: '/* * Outputs "Hello, world !!" and then exits */ public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, world!!"); } }'! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 10:47'! testOddEven self parse: '// OddEven.java import javax.swing.JOptionPane; public class OddEven { // "input" is the number that the user gives to the computer private int input; // a whole number("int" means integer) /* * This is the constructor method. It gets called when an object of the OddEven type * is being created. */ public OddEven() { //Code not shown } // This is the main method. It gets called when this class is run through a Java interpreter. public static void main(String[] args) { /* * This line of code creates a new instance of this class called "number" (also known as an * Object) and initializes it by calling the constructor. The next line of code calls * the "showDialog()" method, which brings up a prompt to ask you for a number */ OddEven number = new OddEven(); number.showDialog(); } public void showDialog() { /* * "try" makes sure nothing goes wrong. If something does, * the interpreter skips to "catch" to see what it should do. */ try { /* * The code below brings up a JOptionPane, which is a dialog box * The String returned by the "showInputDialog()" method is converted into * an integer, making the program treat it as a number instead of a word. * After that, this method calls a second method, calculate() that will * display either "Even" or "Odd." */ input = new Integer(JOptionPane.showInputDialog("Please Enter A Number")); calculate(); } catch (NumberFormatException e) { /* * Getting in the catch block means that there was a problem with the format of * the number. Probably some letters were typed in instead of a number. */ System.err.println("ERROR: Invalid input. Please type in a numerical value."); } } /* * When this gets called, it sends a message to the interpreter. * The interpreter usually shows it on the command prompt (For Windows users) * or the terminal (For Linux users).(Assuming it''s open) */ private void calculate() { if (input % 2 == 0) { System.out.println("Even"); } else { System.out.println("Odd"); } } }'! ! !LBJavaPackagesTests methodsFor: 'testing' stamp: 'lr 5/7/2009 10:48'! testSimple self parse: '/** * A program that does useful things. */ public class Program { /** * A main method. * @param args The arguments */ public static void main(String[] args) { //do stuff } }'! ! LBGrammarTest subclass: #LBSqlGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-SQL'! LBSqlGrammarTests subclass: #LBSqlCompilerTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-SQL'! !LBSqlCompilerTests methodsFor: 'accessing' stamp: 'lr 6/30/2009 13:48'! parserClass ^ LBSqlCompiler! ! !LBSqlGrammarTests methodsFor: 'accessing' stamp: 'lr 6/30/2009 12:00'! parserClass ^ LBSqlGrammar! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:17'! testCreate1 self parse: 'CREATE foo (a) WITH VALUES (1)'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:17'! testCreate2 self parse: 'CREATE foo (a, b) WITH VALUES (1, 2)'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testCreate3 self parse: 'CREATE foo (a, b, c) WITH VALUES (1, 2, "foo bar")'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:16'! testDelete1 self parse: 'DELETE FROM foo'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testDelete2 self parse: 'DELETE FROM "ZorkCommander" WHERE a = 43'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testInsert1 self parse: 'INSERT INTO foo (a) VALUES ("This is a longer string")'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testInsert2 self parse: 'INSERT INTO foo ("a", b) VALUES (1, "2")'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:10'! testInsert3 self parse: 'INSERT INTO foo (a, b, c) VALUES (1, 2, 3)'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:00'! testSelect1 self parse: 'SELECT * FROM foo'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:01'! testSelect2 self parse: 'SELECT a, b, c FROM foo'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testSelect3 self parse: 'SELECT * FROM foo WHERE a !!= b'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:01'! testSelect4 self parse: 'SELECT * FROM foo LIMIT 13'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:24'! testSelect5 self parse: 'SELECT * FROM foo WHERE a > 12 LIMIT 13'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:38'! testUpdate1 self parse: 'UPDATE foo SET a = 12'! ! !LBSqlGrammarTests methodsFor: 'testing' stamp: 'lr 6/30/2009 12:25'! testUpdate2 self parse: 'UPDATE foo SET a = 12 WHERE b >= 13'! ! LBSqlGrammarTests subclass: #LBSqlHighlighterTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Tests-SQL'! !LBSqlHighlighterTests methodsFor: 'accessing' stamp: 'lr 6/30/2009 13:48'! parserClass ^ LBSqlHighlighter! ! !PPSmalltalkParser class methodsFor: '*languageboxes' stamp: 'lr 9/11/2010 11:38'! concern ^ #compile:! ! !OBMetagraphBuilder methodsFor: '*languageboxes-core' stamp: 'lr 9/12/2010 10:42'! populateBrokenMethod self methodMetaNode addFilter: LBBrokenMethodFilter new! ! !QQSpliceNode class methodsFor: '*languageboxes' stamp: 'lr 4/6/2009 10:21'! highlight: aCollection ^ CHHighlighter mark: aCollection with: Color darkGray! ! Object subclass: #LBBrokenMethod instanceVariableNames: 'theClass selector source' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Core'! !LBBrokenMethod class methodsFor: 'instance creation' stamp: 'lr 10/30/2008 14:42'! class: aClass selector: aSelector source: aString ^ self new initializeClass: aClass selector: aSelector source: aString! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:53'! compiledMethod ^ self! ! !LBBrokenMethod methodsFor: 'source' stamp: 'lr 10/30/2008 14:48'! flushCache! ! !LBBrokenMethod methodsFor: 'source' stamp: 'lr 10/30/2008 14:38'! getSource ^ source! ! !LBBrokenMethod methodsFor: 'source' stamp: 'lr 10/30/2008 14:49'! getSourceFor: aSelector in: aClass ^ source! ! !LBBrokenMethod methodsFor: 'source' stamp: 'lr 10/30/2008 15:07'! getSourceFromFile ^ source! ! !LBBrokenMethod methodsFor: 'literals' stamp: 'lr 10/30/2008 14:37'! hasLiteral: anObject ^ false! ! !LBBrokenMethod methodsFor: 'initialization' stamp: 'lr 10/30/2008 14:28'! initializeClass: aClass selector: aSelector source: aString theClass := aClass. selector := aSelector. source := aString! ! !LBBrokenMethod methodsFor: 'testing' stamp: 'lr 10/30/2008 15:08'! isBroken ^ true! ! !LBBrokenMethod methodsFor: 'testing' stamp: 'lr 10/30/2008 14:55'! isRequired ^ false! ! !LBBrokenMethod methodsFor: 'testing' stamp: 'lr 10/30/2008 14:53'! isSubclassResponsibility ^ false! ! !LBBrokenMethod methodsFor: 'literals' stamp: 'lr 10/30/2008 14:36'! literals ^ #()! ! !LBBrokenMethod methodsFor: 'literals' stamp: 'lr 9/12/2010 10:37'! literalsDo: aBlock self literals do: aBlock! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:38'! methodClass ^ theClass! ! !LBBrokenMethod methodsFor: 'protocol' stamp: 'lr 10/30/2008 15:13'! methodClass: aClass! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:35'! pragmas ^ #()! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 9/2/2010 11:57'! properties ^ AdditionalMethodState forMethod: self selector: self selector! ! !LBBrokenMethod methodsFor: 'evaluating' stamp: 'lr 10/30/2008 14:26'! run: aSelector with: anArray in: anObject self error: 'Unable to compile ' , aSelector printString! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:38'! selector ^ selector! ! !LBBrokenMethod methodsFor: 'protocol' stamp: 'lr 10/30/2008 15:13'! selector: aSelector! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:53'! sendsToSuper ^ false! ! !LBBrokenMethod methodsFor: 'source' stamp: 'lr 10/30/2008 15:16'! sourcePointer ^ 0! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:57'! timeStamp ^ nil! ! !LBBrokenMethod methodsFor: 'accessing' stamp: 'lr 9/2/2010 11:58'! trailer ^ CompiledMethodTrailer empty! ! Object subclass: #LBChange instanceVariableNames: 'fragment production action class' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Core'! !LBChange methodsFor: 'operators' stamp: 'lr 6/23/2009 11:22'! , anAdvice ^ LBChangeSequence new , self , anAdvice! ! !LBChange methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:57'! action: aSymbol "The action to apply." action := aSymbol asSymbol! ! !LBChange methodsFor: 'accessing-place' stamp: 'lr 6/23/2009 11:27'! after: aGrammar "Insert the new grammar after the rule aGrammar." self action: #after. self production: aGrammar! ! !LBChange methodsFor: 'accessing-place' stamp: 'lr 6/23/2009 11:27'! before: aGrammar "Insert the new grammar before the rule aGrammar." self action: #before. self production: aGrammar! ! !LBChange methodsFor: 'accessing-list' stamp: 'lr 10/10/2008 15:39'! choice "Use a choice to combine the two grammars." class := PPChoiceParser! ! !LBChange methodsFor: 'accessing' stamp: 'lr 6/30/2009 14:42'! fragment: aGrammar "The grammar fragment to introduce." fragment := aGrammar asParser! ! !LBChange methodsFor: 'initialization' stamp: 'lr 6/30/2009 14:43'! initialize self choice; after: PPEpsilonParser new. self fragment: (PPFailingParser message: 'Invalid Parser')! ! !LBChange methodsFor: 'public' stamp: 'lr 6/30/2009 15:29'! modify: aGrammar with: aBox | copied wrapped | copied := production copy. wrapped := aBox isNil ifTrue: [ fragment ] ifFalse: [ fragment ==> [ :nodes | aBox perform: aGrammar class concern with: (aBox transform: nodes) ] ]. production def: (action = #replace ifTrue: [ wrapped ] ifFalse: [ action = #before ifTrue: [ class with: wrapped with: copied ] ifFalse: [ action = #after ifTrue: [ class with: copied with: wrapped ] ifFalse: [ self error: 'Invalid change action.' ] ] ])! ! !LBChange methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:26'! production: aGrammar "The production to change." production := aGrammar asParser! ! !LBChange methodsFor: 'accessing-place' stamp: 'lr 6/23/2009 11:27'! replace: aGrammar "Replace the aGrammar." self action: #replace. self production: aGrammar! ! !LBChange methodsFor: 'accessing-list' stamp: 'lr 1/19/2009 09:38'! sequence "Use a sequence to combine the two grammars." class := PPSequenceParser! ! Object subclass: #LBChangeSequence instanceVariableNames: 'changes' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Core'! !LBChangeSequence methodsFor: 'operators' stamp: 'lr 6/23/2009 11:20'! , aChange changes add: aChange! ! !LBChangeSequence methodsFor: 'initialization' stamp: 'lr 6/23/2009 11:20'! initialize super initialize. changes := OrderedCollection new! ! !LBChangeSequence methodsFor: 'public' stamp: 'lr 6/23/2009 11:21'! modify: aGrammar with: aBox changes do: [ :change | change modify: aGrammar with: aBox ]! ! Object subclass: #LBLanguageBox instanceVariableNames: 'active environments' classVariableNames: '' poolDictionaries: '' category: 'LanguageBoxes-Core'! LBLanguageBox class instanceVariableNames: 'default'! LBLanguageBox class instanceVariableNames: 'default'! !LBLanguageBox class methodsFor: 'querying' stamp: 'lr 6/23/2009 12:08'! activeFor: aContext do: aBlock self all do: [ :box | (box isActiveFor: aContext) ifTrue: [ aBlock value: box ] ]! ! !LBLanguageBox class methodsFor: 'accessing' stamp: 'lr 9/11/2010 11:42'! all "Answer all language boxes of the system." ^ (self allSubclasses reject: [ :each | each isAbstract ]) collect: [ :each | each default ]! ! !LBLanguageBox class methodsFor: 'accessing' stamp: 'lr 6/23/2009 11:24'! default "Answer the langauage box instance of the receiver." ^ default ifNil: [ default := self new ]! ! !LBLanguageBox class methodsFor: 'querying' stamp: 'lr 9/11/2010 11:41'! isAbstract ^ self name = #LBLanguageBox! ! !LBLanguageBox class methodsFor: 'instance creation' stamp: 'lr 9/11/2010 11:43'! new self isAbstract ifTrue: [ self error: 'Abstract language boxes cannot be instantiated.' ]. ^ super new! ! !LBLanguageBox class methodsFor: 'initialization' stamp: 'lr 10/28/2008 15:30'! recompile self all do: [ :each | each recompile ]! ! !LBLanguageBox class methodsFor: 'initialization' stamp: 'lr 10/28/2008 15:30'! unload self all do: [ :each | each disable ]! ! !LBLanguageBox methodsFor: 'private' stamp: 'lr 6/23/2009 11:24'! active: aBoolean "Enable or disable the receiving language box." active = aBoolean ifTrue: [ ^ self ]. active := aBoolean. self recompile! ! !LBLanguageBox methodsFor: 'scoping' stamp: 'lr 6/23/2009 11:24'! add: anEnvironment "Add anEnvironment to the receiving language box and incrementally update all code." environments := environments copyWith: anEnvironment. self isActive ifTrue: [ self recompile: anEnvironment ]. ^ anEnvironment! ! !LBLanguageBox methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addClass: aClass ^ self add: (BrowserEnvironment new forClasses: (Array with: aClass))! ! !LBLanguageBox methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addPackage: aString ^ self add: (BrowserEnvironment new forPackageNamed: aString)! ! !LBLanguageBox methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addPragma: aKeyword ^ self add: (BrowserEnvironment new forPragmas: (Array with: aKeyword))! ! !LBLanguageBox methodsFor: 'hooks' stamp: 'lr 6/30/2009 14:03'! change: aGrammar "A hook method that that answers an change on how to modify the language. aGrammar is the original language model and might be used to reference existing grammar productions." self subclassResponsibility! ! !LBLanguageBox methodsFor: 'hooks' stamp: 'lr 6/30/2009 14:03'! compile: aCollection "A hook method that that transforms a collection of token to the AST." ^ aCollection lift! ! !LBLanguageBox methodsFor: 'actions' stamp: 'lr 6/23/2009 11:25'! disable "Disable the receiving langauge box." self active: false! ! !LBLanguageBox methodsFor: 'actions' stamp: 'lr 6/23/2009 11:25'! enable "Enable the receiving language box." self active: true! ! !LBLanguageBox methodsFor: 'accessing' stamp: 'lr 11/11/2008 16:10'! environment "Answer the users of environment of the receiver." | environment | environment := self environments inject: BrowserEnvironment new not into: [ :result :each | result | each ]. environment label: 'Users of ' , self name. ^ environment! ! !LBLanguageBox methodsFor: 'accessing' stamp: 'lr 10/28/2008 15:24'! environments "Answer the environments of the receiver." ^ environments! ! !LBLanguageBox methodsFor: 'hooks' stamp: 'lr 1/19/2009 09:27'! highlight: aCollection "A hook method that that highlights a collection of token to the AST, by default do not highlight anything." ^ aCollection! ! !LBLanguageBox methodsFor: 'testing' stamp: 'lr 6/23/2009 11:25'! includesSelector: aSelector in: aClass "Answer whether the receiving language box is active in the given context or not." ^ self environments anySatisfy: [ :each | each includesSelector: aSelector in: aClass ]! ! !LBLanguageBox methodsFor: 'initialization' stamp: 'lr 11/6/2008 14:09'! initialize active := true. environments := #()! ! !LBLanguageBox methodsFor: 'testing' stamp: 'lr 6/23/2009 11:25'! isActive "Answer wether the receiving language box is active or not." ^ active! ! !LBLanguageBox methodsFor: 'testing' stamp: 'lr 6/23/2009 11:25'! isActiveFor: aContext "Answer whether the receiving language box is active for the given context." ^ self isActive and: [ self includesSelector: aContext selector in: aContext theClass ]! ! !LBLanguageBox methodsFor: 'public' stamp: 'lr 6/23/2009 11:17'! modify: aGrammar "Modify a grammar by applying a change object to it." (self change: aGrammar) modify: aGrammar with: self! ! !LBLanguageBox methodsFor: 'accessing' stamp: 'lr 10/2/2009 14:48'! name "A human readable name of the language box." ^ self class name! ! !LBLanguageBox methodsFor: 'actions' stamp: 'lr 6/23/2009 12:04'! recompile "Recompile all the affected methods in the selected enviornments." | environment | environment := SelectorEnvironment new. self environments do: [ :each | (self recompile: each) classesAndSelectorsDo: [ :class :selector | environment addClass: class selector: selector ] ]. ^ environment label: 'Broken methods'! ! !LBLanguageBox methodsFor: 'actions' stamp: 'lr 9/12/2010 10:24'! recompile: anEnvironment "Recompile all the affected methods in anEnvironment." | environment | environment := SelectorEnvironment new. environment label: 'Broken methods'. anEnvironment classesAndSelectorsDo: [ :class :selector | [ self recompileClass: class selector: selector ] on: CHParserError do: [ :err | class methodDictionary at: selector ifPresent: [ :method | environment addClass: class selector: selector. class methodDictAddSelectorSilently: selector withMethod: (LBBrokenMethod class: class selector: selector source: method getSource) ] ] ]. ^ environment! ! !LBLanguageBox methodsFor: 'private' stamp: 'lr 10/30/2008 15:14'! recompileClass: aClass selector: aSelector | method | method := aClass methodDictionary at: aSelector ifAbsent: [ ^ self ]. method isBroken ifTrue: [ aClass compile: method getSource ] ifFalse: [ aClass recompile: aSelector ]! ! !LBLanguageBox methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:25'! remove: anEnvironment "Removes anEnvironment from the scope of the receiver and incrementally update all code." environments := environments copyWithout: anEnvironment. self isActive ifTrue: [ self recompile: anEnvironment ]. ^ anEnvironment! ! !LBLanguageBox methodsFor: 'hooks' stamp: 'lr 3/9/2009 17:41'! transform: aToken "A hook method that that is always called with the parse result of the parse tree advice." ^ aToken! ! LBSqlHighlighter initialize! LBSmalltalkHighlighter initialize!