SystemOrganization addCategory: #'LanguageAspects-Core'! SystemOrganization addCategory: #'LanguageAspects-DSL'! SystemOrganization addCategory: #'LanguageAspects-OmniBrowser'! SystemOrganization addCategory: #'LanguageAspects-Grammar-Smalltalk'! SystemOrganization addCategory: #'LanguageAspects-Grammar-Java'! SystemOrganization addCategory: #'LanguageAspects-Tests-Smalltalk'! SystemOrganization addCategory: #'LanguageAspects-Tests-Java'! CUCompositeParser subclass: #LAJavaCommentGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Java'! !LAJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 14:58'! comment '/*' , ('*/' not , #any) star , '*/'! ! !LAJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 14:58'! javadoc '/**' , ('*/' not , #any) star , '*/'! ! !LAJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/5/2009 15:04'! line '//' , ((#cr / #lf) not , #any) star! ! !LAJavaCommentGrammar methodsFor: 'parsing' stamp: 'lr 5/7/2009 11:00'! parse: aStream | start element stop | start := aStream position. element := super parse: aStream. element isFailure ifTrue: [ ^ element ]. stop := aStream position. ^ PPToken on: aStream collection start: start + 1 stop: stop! ! !LAJavaCommentGrammar methodsFor: 'accessing' stamp: 'lr 5/7/2009 11:05'! start ^ (whitespace plus / javadoc / comment / line) star! ! !LAJavaCommentGrammar methodsFor: 'productions' stamp: 'lr 5/7/2009 11:05'! whitespace #space! ! CUCompositeParser subclass: #LAJavaGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Java'! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! ABSTRACT 'abstract' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! AMP '&' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! AMPAMP '&&' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! AMPEQ '&=' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! ASSERT 'assert' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! BANG '!!' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! BANGEQ '!!=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:36'! BAR '|' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:35'! BARBAR '||' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:36'! BAREQ '|=' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! BOOLEAN 'boolean' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! BREAK 'break' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! BYTE 'byte' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! CARET '^' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! CARETEQ '^=' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CASE 'case' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CATCH 'catch' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CHAR 'char' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 14:20'! CHARLITERAL ($' , (EscapeSequence / (($" / $\ / '\r' / '\n') not , #any)) , $') token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CLASS 'class' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! COLON ':' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:21'! COMMA ',' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CONST 'const' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! CONTINUE 'continue' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! DEFAULT 'default' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! DO 'do' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! DOT '.' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! DOUBLE 'double' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 13:47'! DOUBLELITERAL (NonIntegerNumber , DoubleSuffix optional) token! ! !LAJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:41'! DoubleSuffix $d / $D! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! ELLIPSIS '...' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! ELSE 'else' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! ENUM 'enum' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! EQ '=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! EQEQ '==' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! EXTENDS 'extends' token! ! !LAJavaGrammar 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))! ! !LAJavaGrammar 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! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! FALSE 'false' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! FINAL 'final' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:18'! FINALLY 'finally' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! FLOAT 'float' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 13:48'! FLOATLITERAL (NonIntegerNumber , FloatSuffix) token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! FOR 'for' token! ! !LAJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:41'! FloatSuffix $f / $F! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! GOTO 'goto' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! GT '>' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 12:10'! GTEQ '>=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 12:11'! GTGT '>>' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:36'! GTGTEQ '>>=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 12:11'! GTGTGT '>>>' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:37'! GTGTGTEQ '>>>=' token! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:36'! HexPrefix '0x' / '0X'! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 13:48'! IDENTIFIER (IdentifierStart , IdentifierPart star) token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! IF 'if' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! IMPLEMENTS 'implements' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! IMPORT 'import' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! INSTANCEOF 'instanceof' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! INT 'int' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! INTERFACE 'interface' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 13:48'! INTLITERAL IntegerNumber token! ! !LAJavaGrammar 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')"! ! !LAJavaGrammar 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')"! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! LBRACE '{' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! LBRACKET '[' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! LONG 'long' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 13:48'! LONGLITERAL (IntegerNumber , LongSuffix) token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! LPAREN '(' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:22'! LT '<' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 12:09'! LTEQ '<=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 12:11'! LTLT '<<' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:37'! LTLTEQ '<<=' token! ! !LAJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/5/2009 15:16'! LongSuffix $l / $L! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! MONKEYSAT '@' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! NATIVE 'native' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! NEW 'new' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! NULL 'null' token! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! PACKAGE 'package' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! PERCENT '%' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! PERCENTEQ '%=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! PLUS '+' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! PLUSEQ '+=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! PLUSPLUS '++' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! PRIVATE 'private' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! PROTECTED 'protected' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! PUBLIC 'public' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! QUES '?' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! RBRACE '}' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! RBRACKET ']' token ! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! RETURN 'return' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! RPAREN ')' token ! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! SEMI ';' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! SHORT 'short' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! SLASH '/' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:23'! SLASHEQ '/=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! STAR '*' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! STAREQ '*=' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! STATIC 'static' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! STRICTFP 'strictfp' token! ! !LAJavaGrammar methodsFor: 'token' stamp: 'lr 5/7/2009 14:18'! STRINGLITERAL ($" , (EscapeSequence / (($" / $\ / '\r' / '\n') not , #any)) star , $") token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! SUB '-' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! SUBEQ '-=' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! SUBSUB '--' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! SUPER 'super' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! SWITCH 'switch' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! SYNCHRONIZED 'synchronized' token! ! !LAJavaGrammar methodsFor: 'token-private' stamp: 'lr 5/3/2009 15:58'! SurrogateIdentifer #word "('\ud800'..'\udbff') ('\udc00'..'\udfff')"! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:19'! THIS 'this' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! THROW 'throw' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! THROWS 'throws' token! ! !LAJavaGrammar methodsFor: 'token-chars' stamp: 'lr 5/5/2009 10:24'! TILDE '~' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! TRANSIENT 'transient' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! TRUE 'true' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! TRY 'try' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! VOID 'void' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! VOLATILE 'volatile' token! ! !LAJavaGrammar methodsFor: 'token-keywords' stamp: 'lr 5/5/2009 10:20'! WHILE 'while' token! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:46'! additiveExpression multiplicativeExpression , ((PLUS / SUB) , multiplicativeExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/3/2009 16:32'! andExpression equalityExpression , (AMP , equalityExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:26'! annotation MONKEYSAT , qualifiedName , (LPAREN , (elementValuePairs / elementValue) optional , RPAREN) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:05'! annotationHeader modifiers , MONKEYSAT , INTERFACE , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:27'! annotationMethodDeclaration modifiers , type , IDENTIFIER , LPAREN , RPAREN , (DEFAULT , elementValue) optional , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:28'! annotationTypeBody LBRACE , (annotationTypeElementDeclaration) star , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:28'! annotationTypeDeclaration modifiers , MONKEYSAT , INTERFACE , IDENTIFIER , annotationTypeBody! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:29'! annotationTypeElementDeclaration annotationMethodDeclaration / interfaceFieldDeclaration / normalClassDeclaration / normalInterfaceDeclaration / enumDeclaration / annotationTypeDeclaration / SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:29'! annotations annotation plus! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:30'! arguments LPAREN , expressionList optional , RPAREN! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:34'! arrayInitializer LBRACE , (variableInitializer , (COMMA , variableInitializer) star) optional , COMMA optional , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:37'! assignmentOperator EQ / PLUSEQ / SUBEQ / STAREQ / SLASHEQ / AMPEQ / BAREQ / CARETEQ / PERCENTEQ / LTLTEQ / GTGTGTEQ / GTGTEQ! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:38'! block LBRACE , blockStatement star , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 10:38'! blockStatement localVariableDeclarationStatement / classOrInterfaceDeclaration / statement! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! castExpression (LPAREN , primitiveType , RPAREN , unaryExpression) / (LPAREN , type , RPAREN , unaryExpressionNotPlusMinus)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:06'! catchClause CATCH , LPAREN , formalParameter , RPAREN , block! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:06'! catches catchClause , catchClause star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:07'! classBody LBRACE , classBodyDeclaration star , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:07'! classBodyDeclaration (SEMI) / (STATIC optional , block) / (memberDecl)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classCreatorRest arguments , classBody optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classDeclaration normalClassDeclaration / enumDeclaration! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classHeader modifiers , CLASS , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:08'! classOrInterfaceDeclaration classDeclaration / interfaceDeclaration! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:09'! classOrInterfaceType IDENTIFIER , typeArguments optional , (DOT , IDENTIFIER , typeArguments optional) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:09'! compilationUnit annotations optional , packageDeclaration optional , importDeclaration star , typeDeclaration star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:10'! conditionalAndExpression inclusiveOrExpression , (AMPAMP , inclusiveOrExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:10'! conditionalExpression conditionalOrExpression , (QUES , expression , COLON , conditionalExpression) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:11'! conditionalOrExpression conditionalAndExpression , (BARBAR , conditionalAndExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:11'! createdName classOrInterfaceType / primitiveType! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:12'! creator (NEW , nonWildcardTypeArguments , classOrInterfaceType , classCreatorRest) / (NEW , classOrInterfaceType , classCreatorRest) / (arrayCreator)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:12'! elementValue conditionalExpression / annotation / elementValueArrayInitializer! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 14:02'! elementValueArrayInitializer LBRACE , (elementValue delimitedBy: COMMA) star , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:13'! elementValuePair IDENTIFIER , EQ , elementValue! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:13'! elementValuePairs elementValuePair , (COMMA , elementValuePair) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:14'! ellipsisParameterDecl variableModifiers , type , ELLIPSIS , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:14'! enumBody LBRACE , enumConstants optional , COMMA optional , enumBodyDeclarations optional , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumBodyDeclarations SEMI , classBodyDeclaration star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumConstant annotations optional , IDENTIFIER , arguments optional , classBody optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:15'! enumConstants enumConstant , (COMMA , enumConstant) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! enumDeclaration modifiers , ENUM , IDENTIFIER , (IMPLEMENTS , typeList) optional , enumBody! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:16'! enumHeader modifiers , (ENUM / IDENTIFIER) , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:17'! equalityExpression instanceOfExpression , ((EQEQ / BANGEQ) , instanceOfExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:17'! exclusiveOrExpression andExpression , (CARET , andExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:19'! explicitConstructorInvocation (nonWildcardTypeArguments optional , (THIS / SUPER) , arguments , SEMI) / (primary , DOT , nonWildcardTypeArguments optional , SUPER , arguments , SEMI)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:29'! expression conditionalExpression , (assignmentOperator , expression) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:20'! expressionList expression , (COMMA , expression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:20'! fieldDeclaration modifiers , type , variableDeclarator , (COMMA , variableDeclarator) star , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:21'! fieldHeader modifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ / COMMA / SEMI)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:21'! forInit localVariableDeclaration / expressionList! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:07'! formalParameter variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:24'! formalParameterDecls (ellipsisParameterDecl) / (normalParameterDecl , (COMMA , normalParameterDecl) star) / ((normalParameterDecl , COMMA) plus , ellipsisParameterDecl)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:25'! formalParameters LPAREN , formalParameterDecls optional , RPAREN! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:25'! forstatement forstatementEnhanced / forstatementNormal! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:27'! forstatementEnhanced FOR , LPAREN , variableModifiers , type , IDENTIFIER , COLON , expression , RPAREN , statement! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:26'! forstatementNormal FOR , LPAREN , forInit optional , SEMI , expression optional , SEMI , expressionList optional , RPAREN , statement! ! !LAJavaGrammar 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)! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:53'! inclusiveOrExpression exclusiveOrExpression , (BAR , exclusiveOrExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:54'! innerCreator DOT , NEW , nonWildcardTypeArguments optional , IDENTIFIER , typeArguments optional , classCreatorRest! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:54'! instanceOfExpression relationalExpression , (INSTANCEOF , type) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:55'! interfaceBody LBRACE , interfaceBodyDeclaration star , RBRACE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:55'! interfaceBodyDeclaration interfaceFieldDeclaration / interfaceMethodDeclaration / interfaceDeclaration / classDeclaration / SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceDeclaration normalInterfaceDeclaration / annotationTypeDeclaration! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceFieldDeclaration modifiers , type , variableDeclarator , (COMMA , variableDeclarator) star , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:56'! interfaceHeader modifiers , INTERFACE , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:58'! interfaceMethodDeclaration modifiers , typeParameters optional , (type / VOID) , IDENTIFIER , formalParameters , (LBRACKET , RBRACKET) star , (THROWS , qualifiedNameList) optional , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:58'! literal INTLITERAL / LONGLITERAL / FLOATLITERAL / DOUBLELITERAL / CHARLITERAL / STRINGLITERAL / TRUE / FALSE / NULL! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableDeclaration variableModifiers , type , variableDeclarator , (COMMA , variableDeclarator) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableDeclarationStatement localVariableDeclaration , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 11:59'! localVariableHeader variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ / COMMA / SEMI)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:00'! memberDecl fieldDeclaration / methodDeclaration / classDeclaration / interfaceDeclaration! ! !LAJavaGrammar 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))! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:01'! methodHeader modifiers , typeParameters optional , (type / VOID) optional , IDENTIFIER , LPAREN! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:03'! modifiers (annotation / PUBLIC / PROTECTED / PRIVATE / STATIC / ABSTRACT / FINAL / NATIVE / SYNCHRONIZED / TRANSIENT / VOLATILE / STRICTFP) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 15:17'! multiplicativeExpression unaryExpression . ((STAR / SLASH / PERCENT) , unaryExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:04'! nonWildcardTypeArguments LT , typeList , GT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:05'! normalClassDeclaration modifiers , CLASS , IDENTIFIER , typeParameters optional , (EXTENDS , type) optional , (IMPLEMENTS , typeList) optional , classBody! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:05'! normalInterfaceDeclaration modifiers , INTERFACE , IDENTIFIER , typeParameters optional , (EXTENDS , typeList) optional , interfaceBody! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! normalParameterDecl variableModifiers , type , IDENTIFIER , (LBRACKET , RBRACKET) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! packageDeclaration PACKAGE , qualifiedName , SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:06'! parExpression LPAREN , expression , RPAREN! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! primitiveType BOOLEAN / CHAR / BYTE / SHORT / INT / LONG / FLOAT / DOUBLE! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:53'! qualifiedImportName IDENTIFIER separatedBy: DOT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:51'! qualifiedName IDENTIFIER separatedBy: DOT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/7/2009 13:52'! qualifiedNameList qualifiedName separatedBy: COMMA! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:09'! relationalExpression shiftExpression , (relationalOp , shiftExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:10'! relationalOp LTEQ / GTEQ / LT / GT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:33'! selector (DOT , IDENTIFIER , arguments optional) / (DOT , THIS) / (DOT , SUPER , superSuffix) / (innerCreator) / (LBRACKET , expression , RBRACKET)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:10'! shiftExpression additiveExpression , (shiftOp , additiveExpression) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:11'! shiftOp LTLT / GTGTGT / GTGT! ! !LAJavaGrammar methodsFor: 'accessing' stamp: 'lr 5/5/2009 11:28'! start compilationUnit! ! !LAJavaGrammar 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)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:31'! superSuffix (arguments) / (DOT , typeArguments optional , IDENTIFIER , arguments optional)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:19'! switchBlockStatementGroup switchLabel , blockStatement star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:20'! switchBlockStatementGroups switchBlockStatementGroup star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:20'! switchLabel (CASE , expression , COLON) / (DEFAULT , COLON)! ! !LAJavaGrammar methodsFor: 'private' stamp: 'lr 5/7/2009 13:42'! tokenParser ^ LAJavaCommentGrammar! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:21'! trystatement TRY , block , ((catches , FINALLY , block) / catches / (FINALLY , block))! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:23'! type (classOrInterfaceType , (LBRACKET , RBRACKET) star) / (primitiveType , (LBRACKET , RBRACKET) star)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:24'! typeArgument type / (QUES , ((EXTENDS / SUPER) , type) optional)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:24'! typeArguments LT , typeArgument , (COMMA , typeArgument) star , GT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:25'! typeBound type , (AMP , type) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:25'! typeDeclaration classOrInterfaceDeclaration / SEMI! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeHeader modifiers , (CLASS / ENUM / (MONKEYSAT optional , INTERFACE)) , IDENTIFIER! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeList type , (COMMA , type) star! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeParameter IDENTIFIER , (EXTENDS , typeBound) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:26'! typeParameters LT , typeParameter , (COMMA , typeParameter) star , GT! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 14:06'! unaryExpression (PLUS , unaryExpression) / (SUB , unaryExpression) / (PLUS , unaryExpression) / (SUBSUB , unaryExpression) / (unaryExpressionNotPlusMinus)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:29'! unaryExpressionNotPlusMinus (TILDE , unaryExpression) / (BANG , unaryExpression) / (castExpression) / (primary , selector star , (PLUSPLUS / SUBSUB) optional)! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:31'! variableDeclarator IDENTIFIER , (LBRACKET , RBRACKET) star , (EQ , variableInitializer) optional! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:30'! variableInitializer arrayInitializer / expression! ! !LAJavaGrammar methodsFor: 'parser' stamp: 'lr 5/5/2009 12:30'! variableModifiers (FINAL / annotation) star! ! CUCompositeParser subclass: #LASmalltalkGrammar instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Smalltalk'! LASmalltalkGrammar subclass: #LASmalltalkCompiler instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Smalltalk'! !LASmalltalkCompiler class methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:30'! concern ^ #compile:! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 1/30/2009 09:58'! array super array ==> [ :nodes | RBArrayNode leftBrace: nodes first rightBrace: nodes last statements: nodes second ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:06'! arrayLiteral super arrayLiteral ==> [ :nodes | RBLiteralNode value: nodes second asArray ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 14:21'! arrayLiteralArray super arrayLiteralArray ==> [ :nodes | nodes second asArray ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:57'! arrayLiteralByte super arrayLiteralByte ==> [ :nodes | nodes second asByteArray ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:19'! arrayLiteralChar super arrayLiteralChar ==> [ :token | token value second ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:15'! arrayLiteralFalse super arrayLiteralFalse ==> [ :token | false ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:14'! arrayLiteralNil super arrayLiteralNil ==> [ :token | nil ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:14'! arrayLiteralNumber super arrayLiteralNumber ==> [ :token | Number readFrom: token value ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/24/2008 11:50'! arrayLiteralString super arrayLiteralString ==> [ :token | self buildString: token value ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/24/2008 11:51'! arrayLiteralSymbol super arrayLiteralSymbol ==> [ :token | (self buildString: token value) asSymbol ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:15'! arrayLiteralTrue super arrayLiteralTrue ==> [ :token | true ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 9/26/2008 11:33'! assignment super assignment ==> #first! ! !LASmalltalkCompiler methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 11:00'! binaryExpression super binaryExpression map: [ :receiver :messages | self build: receiver messages: messages ]! ! !LASmalltalkCompiler methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:27'! block super block ==> #second! ! !LASmalltalkCompiler methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:46'! blockArgument super blockArgument ==> #second! ! !LASmalltalkCompiler methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:38'! blockArgumentsEmpty super blockArgumentsEmpty ==> [ :nodes | #() ]! ! !LASmalltalkCompiler methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:37'! blockBody super blockBody ==> [ :nodes | RBBlockNode arguments: nodes first body: nodes last ]! ! !LASmalltalkCompiler methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:38'! blockSequenceEmpty super blockSequenceEmpty ==> [ :nodes | RBSequenceNode statements: #() ]! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 10/24/2008 11:54'! build: aNode assignment: anArray ^ anArray isEmpty ifTrue: [ aNode ] ifFalse: [ anArray reverse inject: aNode into: [ :result :each | RBAssignmentNode variable: each value: result ] ]! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 4/6/2009 15:16'! build: aNode cascade: anArray | messages | ^ (anArray isNil or: [ anArray isEmpty ]) ifTrue: [ aNode ] ifFalse: [ messages := OrderedCollection new: anArray size + 1. messages addLast: aNode. anArray do: [ :each | messages addLast: (self build: aNode receiver messages: (Array with: each second)) ]. RBCascadeNode messages: messages ]! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 10/24/2008 11:28'! build: aNode messages: anArray ^ (anArray isNil or: [ anArray isEmpty ]) ifTrue: [ aNode ] ifFalse: [ anArray inject: aNode into: [ :receiver :message | message isNil ifTrue: [ receiver ] ifFalse: [ RBMessageNode receiver: receiver selectorParts: message first arguments: message second ] ] ]! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 10/24/2008 11:37'! build: aTempCollection sequence: aStatementCollection ^ (aTempCollection isEmpty ifTrue: [ RBSequenceNode new ] ifFalse: [ RBSequenceNode leftBar: aTempCollection first temporaries: aTempCollection second rightBar: aTempCollection last ]) statements: aStatementCollection; yourself ! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 10/24/2008 12:12'! buildPragma: anArray ^ Pragma keyword: (anArray first inject: String new into: [ :result :each | result , each value ]) asSymbol arguments: anArray second! ! !LASmalltalkCompiler methodsFor: 'private' stamp: 'lr 10/24/2008 11:51'! buildString: aString (aString isEmpty not and: [ aString first = $# ]) ifTrue: [ ^ (self buildString: aString allButFirst) asSymbol ]. (aString isEmpty or: [ aString first ~= $' or: [ aString last ~= $' ] ]) ifTrue: [ ^ aString ]. ^ (aString copyFrom: 2 to: aString size - 1) copyReplaceAll: '''''' with: ''''! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:58'! byteLiteral super byteLiteral ==> [ :nodes | RBLiteralNode value: nodes second asByteArray ]! ! !LASmalltalkCompiler methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 11:51'! cascadeExpression super cascadeExpression map: [ :receiver :messages | self build: receiver cascade: messages ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:16'! charLiteral super charLiteral ==> [ :token | RBLiteralNode literalToken: token value: token value second ]! ! !LASmalltalkCompiler methodsFor: 'accessing' stamp: 'lr 3/27/2009 14:58'! doIt: aBoolean "Make sure that the all parsers read the complete input." super doIt: aBoolean. parser := parser end! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 3/27/2009 14:58'! doit super doit map: [ :body | RBDoItNode body: body ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/24/2008 11:55'! expression super expression map: [ :variables :expression | self build: expression assignment: variables ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:16'! falseLiteral super falseLiteral ==> [ :token | RBLiteralNode literalToken: token value: false ]! ! !LASmalltalkCompiler methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 11:23'! keywordExpression super keywordExpression map: [ :receiver :message | self build: receiver messages: (Array with: message) ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 5/7/2009 14:22'! method super method end map: [ :declaration :body | declaration pragmas: body first. declaration body: (self build: body second sequence: body third). declaration ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/24/2008 10:50'! methodDeclaration super methodDeclaration ==> [ :nodes | RBMethodNode selectorParts: nodes first arguments: nodes second ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:16'! nilLiteral super nilLiteral ==> [ :token | RBLiteralNode literalToken: token value: nil ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:17'! numberLiteral super numberLiteral ==> [ :token | RBLiteralNode literalToken: token value: (Number readFrom: token value) ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/17/2008 15:40'! parens super parens ==> #second! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/24/2008 12:12'! pragma super pragma ==> [ :nodes | | pragma | pragma := self buildPragma: nodes second. RBPragmaNode pragma: pragma spec: pragma keyword start: nodes first start stop: nodes last stop firstToken: nodes first lastToken: nodes last ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/23/2008 17:09'! return super return map: [ :token :expression | RBReturnNode value: expression ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 10/24/2008 11:38'! sequence super sequence map: [ :temporaries :statements | self build: temporaries sequence: statements ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/24/2008 11:50'! stringLiteral super stringLiteral ==> [ :token | RBLiteralNode literalToken: token value: (self buildString: token value) ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/24/2008 11:50'! symbolLiteral super symbolLiteral ==> [ :node | RBLiteralNode literalToken: node value: (self buildString: node value) ]! ! !LASmalltalkCompiler methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:28'! trueLiteral super trueLiteral ==> [ :token | RBLiteralNode literalToken: token value: true ]! ! !LASmalltalkCompiler methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 11:01'! unaryExpression super unaryExpression map: [ :receiver :messages | self build: receiver messages: messages ]! ! !LASmalltalkCompiler methodsFor: 'grammar' stamp: 'lr 9/23/2008 20:02'! variable super variable ==> [ :token | RBVariableNode identifierToken: token ]! ! !LASmalltalkGrammar class methodsFor: 'accessing' stamp: 'lr 2/6/2009 11:15'! compileUseLanguageAspects ^ Preferences compileUseLanguageAspects! ! !LASmalltalkGrammar class methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:30'! concern ^ nil! ! !LASmalltalkGrammar class methodsFor: 'instance creation' stamp: 'lr 5/7/2009 10:38'! doIt: aBoolean ^ self new doIt: aBoolean; yourself! ! !LASmalltalkGrammar class methodsFor: 'initialization' stamp: 'lr 2/6/2009 11:17'! initialize Preferences addPreference: #compileUseLanguageAspects category: #compiler default: false balloonHelp: 'If true, language aspects are enabled for compiling methods. Only newly compiled methods will be affected by this preference. This requires the new compiler to be enabled.'! ! !LASmalltalkGrammar class methodsFor: 'configuration' stamp: 'lr 12/16/2008 11:14'! languageAspectsHighlight ^ nil! ! !LASmalltalkGrammar class methodsFor: 'configuration' stamp: 'lr 12/16/2008 11:15'! languageAspectsParser ^ nil! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:26'! array ${ token , statements , $} token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:27'! arrayLiteral '#(' token , arrayLiteralElement star , $) token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:27'! arrayLiteralArray ($# optional , $() token , arrayLiteralElement star , $) token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:27'! arrayLiteralByte ($# optional , $[) token , arrayLiteralNumber star , $] token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:11'! arrayLiteralChar charToken! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:40'! arrayLiteralElement arrayLiteralTrue / arrayLiteralFalse / arrayLiteralNil / arrayLiteralNumber / arrayLiteralChar / arrayLiteralString / arrayLiteralSymbol / arrayLiteralArray / arrayLiteralByte! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:12'! arrayLiteralFalse falseToken! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:12'! arrayLiteralNil nilToken! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:12'! arrayLiteralNumber numberToken! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:12'! arrayLiteralString stringToken! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:27'! arrayLiteralSymbol ($# optional , symbol) token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/17/2008 11:11'! arrayLiteralTrue trueToken! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 9/23/2008 20:27'! assignment variable , assignmentToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:27'! assignmentToken (':=' / '_') token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 15:07'! binary ($~ / $- / $!! / $@ / $% / $& / $* / $+ / $= / $\ / $| / $? / $/ / $> / $< / $,) , ($~ / $!! / $@ / $% / $& / $* / $+ / $= / $\ / $| / $? / $/ / $> / $< / $,) star! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 9/23/2008 18:43'! binaryExpression unaryExpression , binaryMessage star! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 10:54'! binaryMessage (binaryToken , unaryExpression) ==> [ :nodes | Array with: (Array with: nodes first) with: (Array with: nodes second) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-methods' stamp: 'lr 10/24/2008 10:48'! binaryMethod (binaryToken , variable) ==> [ :nodes | Array with: (Array with: nodes first) with: (Array with: nodes second) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-pragmas' stamp: 'lr 10/24/2008 11:57'! binaryPragma (binaryToken , arrayLiteralElement) ==> [ :nodes | Array with: (Array with: nodes first) with: (Array with: nodes second) ]! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:27'! binaryToken binary token! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 5/5/2009 14:27'! block $[ token , blockBody , $] token! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 5/5/2009 14:28'! blockArgument $: token , variable! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:40'! blockArguments blockArgument plus! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:34'! blockArgumentsEmpty epsilon! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 5/5/2009 14:28'! blockBody (blockArguments , $| token , blockSequence) / (blockArguments , epsilon , blockSequenceEmpty) / (blockArgumentsEmpty , epsilon , blockSequence)! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:36'! blockSequence sequence! ! !LASmalltalkGrammar methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:36'! blockSequenceEmpty epsilon! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:28'! byteLiteral '#[' token , arrayLiteralNumber star , $] token! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 9/23/2008 19:29'! cascadeExpression keywordExpression , cascadeMessage star! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 5/5/2009 14:28'! cascadeMessage $; token , message! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 14:22'! char $$ , #any! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:15'! charLiteral charToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:28'! charToken char token! ! !LASmalltalkGrammar methodsFor: 'accessing' stamp: 'lr 3/27/2009 14:58'! doIt: aBoolean "Chose a different start rule depending on the type of parser required." parser := aBoolean ifTrue: [ self doit ] ifFalse: [ self method ]! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 3/27/2009 14:43'! doit sequence! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 3/26/2009 16:21'! epsilon PPEpsilonParser new! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 9/23/2008 20:27'! expression assignment star , cascadeExpression! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:23'! falseLiteral falseToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:28'! falseToken ('false' , #word not) token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 14:22'! identifier #letter , #word star! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:28'! identifierToken identifier token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 14:23'! keyword identifier , $:! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 11:11'! keywordExpression binaryExpression , keywordMessage optional! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 10:55'! keywordMessage (keywordToken , binaryExpression) plus ==> [ :nodes | Array with: (nodes collect: [ :each | each first ]) with: (nodes collect: [ :each | each second ]) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-methods' stamp: 'lr 10/24/2008 10:47'! keywordMethod (keywordToken , variable) plus ==> [ :nodes | Array with: (nodes collect: [ :each | each first ]) with: (nodes collect: [ :each | each second ]) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-pragmas' stamp: 'lr 10/24/2008 11:57'! keywordPragma (keywordToken , arrayLiteralElement) plus ==> [ :nodes | Array with: (nodes collect: [ :each | each first ]) with: (nodes collect: [ :each | each second ]) ]! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:29'! keywordToken keyword token! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 1/30/2009 09:58'! literal trueLiteral / falseLiteral / nilLiteral / charLiteral / numberLiteral / stringLiteral / symbolLiteral / arrayLiteral / byteLiteral! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 4/6/2009 11:05'! message keywordMessage / binaryMessage / unaryMessage! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 10/24/2008 10:40'! method methodDeclaration , methodSequence! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 10/24/2008 10:48'! methodDeclaration keywordMethod / unaryMethod / binaryMethod! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:29'! methodSequence $. token star , pragmas , temporaries , pragmas , statements ==> [ :nodes | Array with: nodes second , nodes fourth with: nodes third with: nodes fifth ]! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 9/23/2008 21:06'! multiword keyword plus! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:29'! multiwordToken multiword token! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:16'! nilLiteral nilToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:29'! nilToken ('nil' , #word not) token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 1/30/2009 09:56'! number ($- optional , #digit) and , [ :stream | [ Number readFrom: stream ] on: Error do: [ :err | PPFailure reason: err messageText at: stream position ] ] asParser! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:17'! numberLiteral numberToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:29'! numberToken number token! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:29'! parens $( token , expression , $) token! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:29'! pragma $< token , pragmaMessage , $> token! ! !LASmalltalkGrammar methodsFor: 'grammar-pragmas' stamp: 'lr 4/6/2009 11:31'! pragmaMessage keywordPragma / unaryPragma / binaryPragma! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 10/20/2008 10:31'! pragmas pragma star! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 2/6/2009 11:23'! primary literal / variable / block / parens / array! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:29'! return $^ token , expression! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 9/23/2008 20:00'! sequence temporaries , statements! ! !LASmalltalkGrammar methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:40'! start "The default start symbol is the 'method', but this method also initializes the start symbol 'doit'. The method #doIt: will initialize the parser with either of the two." (Array with: method with: doit) first! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:30'! statements (return , $. token star ==> [ :nodes | Array with: nodes first ]) / (expression wrapped , $. token plus , statements ==> [ :nodes | nodes last copyWithFirst: nodes first ]) / (expression wrapped , $. token star ==> [ :nodes | Array with: nodes first ]) / ($. token star ==> [ :node | Array new ])! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 14:23'! string $' , (($' , $') / $' negate) star , $'! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:17'! stringLiteral stringToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:30'! stringToken string token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/23/2008 13:50'! symbol unary / binary / multiword / string! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 5/5/2009 14:30'! symbolLiteral ($# , symbol) token! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:30'! symbolToken symbol token! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 5/5/2009 14:30'! temporaries ($| token , variable star , $| token) optional ==> [ :nodes | nodes isNil ifTrue: [ Array new ] ifFalse: [ nodes ] ]! ! !LASmalltalkGrammar methodsFor: 'private' stamp: 'lr 5/7/2009 11:26'! tokenParser ^ LASmalltalkTokenParser! ! !LASmalltalkGrammar methodsFor: 'grammar-literals' stamp: 'lr 10/13/2008 17:18'! trueLiteral trueToken! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:30'! trueToken ('true' , #word not) token! ! !LASmalltalkGrammar methodsFor: 'primitives' stamp: 'lr 10/17/2008 14:23'! unary identifier , $: not! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 9/23/2008 19:07'! unaryExpression primary , unaryMessage star! ! !LASmalltalkGrammar methodsFor: 'grammar-messages' stamp: 'lr 10/24/2008 10:55'! unaryMessage (unaryToken) ==> [ :node | Array with: (Array with: node) with: (Array new) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-methods' stamp: 'lr 10/24/2008 10:55'! unaryMethod (identifierToken) ==> [ :node | Array with: (Array with: node) with: (Array new) ]! ! !LASmalltalkGrammar methodsFor: 'grammar-pragmas' stamp: 'lr 10/24/2008 11:56'! unaryPragma (identifierToken) ==> [ :node | Array with: (Array with: node) with: (Array new) ]! ! !LASmalltalkGrammar methodsFor: 'token' stamp: 'lr 5/5/2009 14:30'! unaryToken unary token! ! !LASmalltalkGrammar methodsFor: 'grammar' stamp: 'lr 9/23/2008 20:02'! variable identifierToken! ! LASmalltalkGrammar subclass: #LASmalltalkHighlighter instanceVariableNames: 'comments' classVariableNames: 'NilLiteral MethodTag PragmaTag SuperVariable FalseLiteral CharLiteral ArrayLiteral NumberLiteral VariableTag ThisContextVariable CommentColor GlobalVariableTag ReturnTag TrueLiteral SelfVariable BlockBrackets StringLiteral SymbolLiteral ExpressionBrackets AssignmentToken TempToken ByteLiteral' poolDictionaries: '' category: 'LanguageAspects-Grammar-Smalltalk'! !LASmalltalkHighlighter class methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:30'! concern ^ #highlight:! ! !LASmalltalkHighlighter 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! ! !LASmalltalkHighlighter methodsFor: 'private' stamp: 'lr 4/6/2009 11:57'! addComment: aToken comments addLast: aToken -> CommentColor! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 14:58'! arrayLiteral super arrayLiteral ==> [ :token | token at: 1 put: token first -> ArrayLiteral; at: token size put: token last -> ArrayLiteral; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:40'! arrayLiteralArray super arrayLiteralArray ==> [ :token | token at: 1 put: token first -> ArrayLiteral; at: token size put: token last -> ArrayLiteral; yourself ].! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:57'! arrayLiteralByte super arrayLiteralByte ==> [ :token | token at: 1 put: token first -> ByteLiteral; at: token size put: token last -> ByteLiteral; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:54'! arrayLiteralChar super arrayLiteralChar ==> [ :token | token -> CharLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:53'! arrayLiteralFalse super arrayLiteralFalse ==> [ :token | token -> FalseLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:53'! arrayLiteralNil super arrayLiteralNil ==> [ :token | token -> NilLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:54'! arrayLiteralNumber super arrayLiteralNumber ==> [ :token | token -> NumberLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:54'! arrayLiteralString super arrayLiteralString ==> [ :token | token -> StringLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:54'! arrayLiteralSymbol super arrayLiteralSymbol ==> [ :token | token -> SymbolLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:54'! arrayLiteralTrue super arrayLiteralTrue ==> [ :token | token -> TrueLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'token' stamp: 'lr 11/11/2008 16:11'! assignmentToken super assignmentToken ==> [ :token | token -> AssignmentToken ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-blocks' stamp: 'lr 1/30/2009 14:58'! block super block ==> [ :token | token at: 1 put: token first -> BlockBrackets; at: token size put: token last -> BlockBrackets; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-blocks' stamp: 'lr 3/26/2009 16:25'! blockBody super blockBody ==> [ :token | token at: 2 put: token second -> BlockBrackets; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 1/30/2009 09:58'! byteLiteral super byteLiteral ==> [ :token | token at: 1 put: token first -> ByteLiteral; at: token size put: token last -> ByteLiteral; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:55'! charLiteral super charLiteral ==> [ :token | token -> CharLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:55'! falseLiteral super falseLiteral ==> [ :token | token -> FalseLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'initialization' stamp: 'lr 1/22/2009 15:28'! initialize super initialize. comments := OrderedCollection new! ! !LASmalltalkHighlighter methodsFor: 'private' stamp: 'lr 4/2/2009 15:32'! mark: aCollection with: anObject ^ CHHighlighter mark: aCollection with: anObject! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 4/6/2009 11:57'! methodDeclaration super methodDeclaration ==> [ :nodes | self mark: nodes with: MethodTag ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:56'! nilLiteral super nilLiteral ==> [ :token | token -> NilLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:56'! numberLiteral super numberLiteral ==> [ :token | token -> NumberLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 1/30/2009 15:44'! parens super parens ==> [ :token | token at: 1 put: token first -> ExpressionBrackets; at: token size put: token last -> ExpressionBrackets; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'parsing' stamp: 'lr 1/22/2009 15:29'! parse: aStream comments add: (super parse: aStream). ^ comments! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 4/6/2009 11:58'! pragma super pragma ==> [ :nodes | self mark: nodes with: PragmaTag ] ! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 11/11/2008 16:05'! return super return ==> [ :nodes | nodes at: 1 put: nodes first -> ReturnTag; yourself ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:56'! stringLiteral super stringLiteral ==> [ :token | token -> StringLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:56'! symbolLiteral super symbolLiteral ==> [ :token | token -> SymbolLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 1/30/2009 15:48'! temporaries super temporaries ==> [ :nodes | nodes isEmpty ifFalse: [ nodes at: 1 put: nodes first -> TempToken; at: nodes size put: nodes last -> TempToken ]. nodes ]! ! !LASmalltalkHighlighter methodsFor: 'private' stamp: 'lr 5/7/2009 11:26'! tokenParser ^ LASmalltalkHightlightTokenParser! ! !LASmalltalkHighlighter methodsFor: 'grammar-literals' stamp: 'lr 11/11/2008 15:56'! trueLiteral super trueLiteral ==> [ :token | token -> TrueLiteral ]! ! !LASmalltalkHighlighter methodsFor: 'grammar' stamp: 'lr 11/11/2008 16:14'! 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 ] ] ] ] ]! ! !QQSpliceNode class methodsFor: '*languageaspects' stamp: 'lr 4/6/2009 10:21'! highlight: aCollection ^ CHHighlighter mark: aCollection with: Color darkGray! ! !OBCodeBrowser methodsFor: '*languageaspects' stamp: 'lr 1/19/2009 10:14'! cmdLaAspect ^ LACmdAspect allSubclasses! ! !OBCodeBrowser methodsFor: '*languageaspects' stamp: 'lr 1/19/2009 10:14'! cmdLaObject ^ LACmdObject allSubclasses! ! !QQUnquoteNode class methodsFor: '*languageaspects' stamp: 'lr 4/6/2009 10:38'! highlight: aCollection ^ CHHighlighter mark: aCollection with: (CHHighlightAttribute new borderColor: Color darkGray; borderWidth: 1; yourself)! ! !CompiledMethod methodsFor: '*languageaspects' stamp: 'lr 10/30/2008 15:11'! isBroken ^ false! ! PPTokenParser subclass: #LASmalltalkTokenParser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Smalltalk'! LASmalltalkTokenParser subclass: #LASmalltalkHightlightTokenParser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Grammar-Smalltalk'! !LASmalltalkHightlightTokenParser methodsFor: 'parsing' stamp: 'lr 4/2/2009 18:40'! parse: aStream | token current | token := super parse: aStream. (token isFailure not and: [ token stop < aStream position ]) ifTrue: [ current := thisContext sender. [ current isNil or: [ current receiver class == LASmalltalkHighlighter ] ] whileFalse: [ current := current sender ]. current isNil ifFalse: [ current receiver addComment: (self create: aStream collection start: token stop + 1 stop: aStream position) ] ]. ^ token! ! !LASmalltalkTokenParser methodsFor: 'hooks' stamp: 'lr 1/30/2009 10:06'! consumeSpaces: aStream [ super consumeSpaces: aStream. aStream peek == $" ] whileTrue: [ aStream next. [ aStream atEnd not and: [ aStream next = $" ] ] whileFalse ]! ! CHRule subclass: #LAHighlightAction instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-DSL'! !LAHighlightAction methodsFor: 'visiting' stamp: 'lr 5/7/2009 13:08'! acceptDsl: aVisitor | parser offset tokens | parser := self highlighterClass doIt: aVisitor isDoIt. parser withContextDo: [ LAAspect activeFor: aVisitor do: [ :aspect | aspect weave: parser ] ]. aVisitor text removeAttributesFrom: aVisitor scopeStart to: aVisitor scopeStop. offset := aVisitor scopeStart - 1. tokens := parser parse: aVisitor scopedText readStream ifError: [ :err | #() ]. 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 ] ]! ! !LAHighlightAction methodsFor: 'accessing' stamp: 'lr 11/21/2008 09:42'! highlighterClass ^ LASmalltalkHighlighter! ! CHRule subclass: #LAParseAction instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-DSL'! !LAParseAction methodsFor: 'visiting' stamp: 'lr 5/7/2009 13:08'! acceptDsl: aVisitor | parser | parser := self parserClass doIt: aVisitor isDoIt. parser withContextDo: [ LAAspect activeFor: aVisitor do: [ :aspect | aspect weave: parser ] ]. ^ parser parse: aVisitor stream ifError: [ :err | CHParserError signal: err reason at: err position ]! ! !LAParseAction methodsFor: 'accessing' stamp: 'lr 5/7/2009 11:47'! parserClass ^ LASmalltalkCompiler! ! !QQQuoteNode class methodsFor: '*languageaspects' stamp: 'lr 4/6/2009 10:37'! highlight: aCollection ^ CHHighlighter mark: aCollection with: (CHHighlightAttribute new color: (Color black alpha: 0.1); outline: 2; yourself)! ! Object subclass: #LAAdvice instanceVariableNames: 'parser production action class' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Core'! !LAAdvice methodsFor: 'operators' stamp: 'lr 2/3/2009 17:47'! , anAdvice ^ LAComposedAdvice new , self , anAdvice! ! !LAAdvice methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:57'! action: aSymbol "The action to apply." action := aSymbol asSymbol! ! !LAAdvice methodsFor: 'accessing-place' stamp: 'lr 1/22/2009 11:11'! after: aParser "Insert the new parser after the rule aParser." self action: #after. self production: aParser! ! !LAAdvice methodsFor: 'accessing-place' stamp: 'lr 1/22/2009 11:12'! before: aParser "Insert the new parser before the rule aParser." self action: #before. self production: aParser! ! !LAAdvice methodsFor: 'accessing-list' stamp: 'lr 10/10/2008 15:39'! choice "Use a choice to combine the two grammars." class := PPChoiceParser! ! !LAAdvice methodsFor: 'initialization' stamp: 'lr 1/22/2009 11:15'! initialize self choice; after: PPEpsilonParser new. self parser: (PPFailingParser message: 'Invalid Parser')! ! !LAAdvice methodsFor: 'accessing' stamp: 'lr 1/19/2009 09:56'! parser: aParser "The parser to introduce." parser := aParser asParser! ! !LAAdvice methodsFor: 'accessing' stamp: 'lr 1/22/2009 11:15'! production: aParser "The production to change." production := aParser asParser! ! !LAAdvice methodsFor: 'accessing-place' stamp: 'lr 1/22/2009 11:12'! replace: aParser "Replace the rule named aSymbol." self action: #replace. self production: aParser! ! !LAAdvice methodsFor: 'accessing-list' stamp: 'lr 1/19/2009 09:38'! sequence "Use a sequence to combine the two grammars." class := PPSequenceParser! ! !LAAdvice methodsFor: 'public' stamp: 'lr 3/9/2009 17:43'! weave: aParser into: anAspect | copied wraped | copied := production copy. wraped := parser ==> [ :nodes | anAspect perform: aParser class concern with: (anAspect transform: nodes) ]. production def: (action = #replace ifTrue: [ wraped ] ifFalse: [ action = #before ifTrue: [ class with: wraped with: copied ] ifFalse: [ action = #after ifTrue: [ class with: copied with: wraped ] ifFalse: [ self error: 'Invalid advice action.' ] ] ])! ! Object subclass: #LAAspect instanceVariableNames: 'active environments' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Core'! LAAspect class instanceVariableNames: 'default'! LAAspect class instanceVariableNames: 'default'! !LAAspect class methodsFor: 'querying' stamp: 'lr 3/27/2009 13:58'! activeFor: aContext do: aBlock self all do: [ :aspect | (aspect isActiveFor: aContext) ifTrue: [ aBlock value: aspect ] ]! ! !LAAspect class methodsFor: 'accessing' stamp: 'lr 3/27/2009 14:03'! all "Answer all aspects of the system." ^ self allSubclasses collect: [ :each | each default ]! ! !LAAspect class methodsFor: 'accessing' stamp: 'lr 3/27/2009 14:01'! default "Answer the aspect instance of the receiver." ^ default ifNil: [ default := self new ]! ! !LAAspect class methodsFor: 'configuration' stamp: 'lr 2/6/2009 11:59'! languageAspectsHighlight ^ nil! ! !LAAspect class methodsFor: 'configuration' stamp: 'lr 2/6/2009 11:59'! languageAspectsParser ^ nil! ! !LAAspect class methodsFor: 'initialization' stamp: 'lr 10/28/2008 15:30'! recompile self all do: [ :each | each recompile ]! ! !LAAspect class methodsFor: 'initialization' stamp: 'lr 10/28/2008 15:30'! unload self all do: [ :each | each disable ]! ! !LAAspect methodsFor: 'private' stamp: 'lr 10/10/2008 15:09'! active: aBoolean "Enable or disable the receiving language aspect." active = aBoolean ifTrue: [ ^ self ]. active := aBoolean. self recompile! ! !LAAspect methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:25'! add: anEnvironment "Add anEnvironment to the receiving aspect and incrementally update all code." environments := environments copyWith: anEnvironment. self isActive ifTrue: [ self recompile: anEnvironment ]. ^ anEnvironment! ! !LAAspect methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addClass: aClass ^ self add: (BrowserEnvironment new forClasses: (Array with: aClass))! ! !LAAspect methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addPackage: aString ^ self add: (BrowserEnvironment new forPackageNamed: aString)! ! !LAAspect methodsFor: 'scoping' stamp: 'lr 10/28/2008 15:10'! addPragma: aKeyword ^ self add: (BrowserEnvironment new forPragmas: (Array with: aKeyword))! ! !LAAspect methodsFor: 'hooks' stamp: 'lr 1/19/2009 09:41'! advice: aParser "A hook method that that answers an advice how to change the langauge. aParser is the original parser and might be used to reference existing rules." ^ LAAdvice new! ! !LAAspect methodsFor: 'hooks' stamp: 'lr 3/9/2009 17:42'! compile: aCollection "A hook method that that transforms a collection of token to the AST." ^ nil lift! ! !LAAspect methodsFor: 'actions' stamp: 'lr 10/28/2008 15:13'! disable "Disable the receiving aspect." self active: false! ! !LAAspect methodsFor: 'actions' stamp: 'lr 10/28/2008 15:13'! enable "Enable the receiving aspect." self active: true! ! !LAAspect 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! ! !LAAspect methodsFor: 'accessing' stamp: 'lr 10/28/2008 15:24'! environments "Answer the environments of the receiver." ^ environments! ! !LAAspect 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! ! !LAAspect methodsFor: 'testing' stamp: 'lr 3/27/2009 13:55'! includesSelector: aSelector in: aClass "Answer whether the receiving aspect is active in the given context or not." ^ self environments anySatisfy: [ :each | each includesSelector: aSelector in: aClass ]! ! !LAAspect methodsFor: 'initialization' stamp: 'lr 11/6/2008 14:09'! initialize active := true. environments := #()! ! !LAAspect methodsFor: 'testing' stamp: 'lr 10/10/2008 15:01'! isActive "Answer wether the receiving aspect is active or not." ^ active! ! !LAAspect methodsFor: 'testing' stamp: 'lr 3/27/2009 14:04'! isActiveFor: aContext "Answer whether the receiving aspect is active for the given context." ^ self isActive and: [ self includesSelector: aContext selector in: aContext theClass ]! ! !LAAspect methodsFor: 'accessing' stamp: 'lr 10/23/2008 17:25'! name "A human readable name of the aspect." ^ self class name! ! !LAAspect methodsFor: 'actions' stamp: 'lr 10/28/2008 15:11'! recompile "Recompile all the affected methods in the selected enviornments." self environments do: [ :each | self recompile: each]! ! !LAAspect methodsFor: 'actions' stamp: 'lr 10/30/2008 15:09'! 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: SmaCCParserError do: [ :err | class methodDictionary at: selector ifPresent: [ :method | environment addClass: class selector: selector. class methodDictAddSelectorSilently: selector withMethod: (LABroken class: class selector: selector source: method getSource) ] ] ]. ^ environment! ! !LAAspect 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 ]! ! !LAAspect 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! ! !LAAspect 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! ! !LAAspect methodsFor: 'public' stamp: 'lr 1/19/2009 09:40'! weave: aParser "Weave aParser with all the applicable concerns." (self advice: aParser) weave: aParser into: self! ! Object subclass: #LABroken instanceVariableNames: 'theClass selector source' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Core'! !LABroken 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! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:53'! compiledMethod ^ self! ! !LABroken methodsFor: 'source' stamp: 'lr 10/30/2008 14:48'! flushCache! ! !LABroken methodsFor: 'source' stamp: 'lr 10/30/2008 14:38'! getSource ^ source! ! !LABroken methodsFor: 'source' stamp: 'lr 10/30/2008 14:49'! getSourceFor: aSelector in: aClass ^ source! ! !LABroken methodsFor: 'source' stamp: 'lr 10/30/2008 15:07'! getSourceFromFile ^ source! ! !LABroken methodsFor: 'literals' stamp: 'lr 10/30/2008 14:37'! hasLiteral: anObject ^ false! ! !LABroken methodsFor: 'initialization' stamp: 'lr 10/30/2008 14:28'! initializeClass: aClass selector: aSelector source: aString theClass := aClass. selector := aSelector. source := aString! ! !LABroken methodsFor: 'testing' stamp: 'lr 10/30/2008 15:08'! isBroken ^ true! ! !LABroken methodsFor: 'testing' stamp: 'lr 10/30/2008 14:55'! isRequired ^ false! ! !LABroken methodsFor: 'testing' stamp: 'lr 10/30/2008 14:53'! isSubclassResponsibility ^ false! ! !LABroken methodsFor: 'literals' stamp: 'lr 10/30/2008 14:36'! literals ^ #()! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:38'! methodClass ^ theClass! ! !LABroken methodsFor: 'protocol' stamp: 'lr 10/30/2008 15:13'! methodClass: aClass! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:35'! pragmas ^ #()! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:36'! properties ^ MethodProperties new! ! !LABroken methodsFor: 'literals' stamp: 'lr 10/30/2008 14:37'! refersToLiteral: anObject ^ false! ! !LABroken methodsFor: 'evaluating' stamp: 'lr 10/30/2008 14:26'! run: aSelector with: anArray in: anObject self error: 'Unable to compile ' , aSelector printString! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:38'! selector ^ selector! ! !LABroken methodsFor: 'protocol' stamp: 'lr 10/30/2008 15:13'! selector: aSelector! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:53'! sendsToSuper ^ false! ! !LABroken methodsFor: 'source' stamp: 'lr 10/30/2008 15:16'! sourcePointer ^ 0! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:57'! timeStamp ^ nil! ! !LABroken methodsFor: 'accessing' stamp: 'lr 10/30/2008 15:01'! trailer ^ #(0 0 0 0)! ! Object subclass: #LAComposedAdvice instanceVariableNames: 'advices' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Core'! !LAComposedAdvice methodsFor: 'operators' stamp: 'lr 2/3/2009 17:47'! , anAdvice advices add: anAdvice! ! !LAComposedAdvice methodsFor: 'initialization' stamp: 'lr 2/3/2009 17:48'! initialize super initialize. advices := OrderedCollection new! ! !LAComposedAdvice methodsFor: 'public' stamp: 'lr 2/3/2009 17:48'! weave: aParser into: anAspect advices do: [ :each | each weave: aParser into: anAspect ]! ! LAGrammarTest subclass: #LAJavaCommentGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Java'! !LAJavaCommentGrammarTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:55'! parserClass ^ LAJavaCommentGrammar! ! !LAJavaCommentGrammarTests 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 */'! ! !LAJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:02'! testCrLf self parse: String crlf. self assert: result value = String crlf! ! !LAJavaCommentGrammarTests 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 */'! ! !LAJavaCommentGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 11:04'! testLine self parse: '// There are dragons'. self assert: result value = '// There are dragons'! ! !LAJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:03'! testSpace self parse: ' '. self assert: result value = ' '! ! !LAJavaCommentGrammarTests methodsFor: 'testing-whitespace' stamp: 'lr 5/7/2009 11:03'! testTab self parse: ' '. self assert: result value = ' '! ! LAGrammarTest subclass: #LAJavaGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Java'! !LAJavaGrammarTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:26'! parserClass ^ LAJavaGrammar! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testAnnotation1 self parse: '@interface' rule: #annotation! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:59'! testAnnotation2 self parse: '@interface()' rule: #annotation! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 14:21'! testAnnotation3 self parse: '@Copyright("2002 Yoyodyne Propulsion Systems")' rule: #annotation! ! !LAJavaGrammarTests 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! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:10'! testBoolLiteral1 self parse: 'true' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:10'! testBoolLiteral2 self parse: 'false' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral1 self parse: '''a''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral2 self parse: '''3''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral3 self parse: '''\n''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral4 self parse: '''\t''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:09'! testCharLiteral5 self parse: '''u0041''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:10'! testCharLiteral6 self parse: '''\0009''' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral1 self parse: '6.5E+32' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral2 self parse: '7D' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testFloatLiteral3 self parse: '.01f' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral1 self parse: '123' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral2 self parse: '123' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral3 self parse: '0x4a' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:08'! testIntegerLiteral4 self parse: '057' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:12'! testNullLiteral self parse: 'null' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testQualifiedName1 self parse: 'org' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:54'! testQualifiedName2 self parse: 'org.java' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:55'! testQualifiedName3 self parse: 'org.java.swing' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:55'! testQualifiedNameList1 self parse: 'org.java' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:56'! testQualifiedNameList2 self parse: 'org.java, org.java.swing' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing' stamp: 'lr 5/7/2009 13:56'! testQualifiedNameList3 self parse: 'org.java, org.java, com.sun' rule: #qualifiedName! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral1 self parse: '""' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral2 self parse: '"\""' rule: #literal! ! !LAJavaGrammarTests methodsFor: 'testing-literals' stamp: 'lr 5/7/2009 14:11'! testStringLiteral3 self parse: '"This is a string"' rule: #literal! ! LAGrammarTest subclass: #LAJavaPackagesTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Java'! !LAJavaPackagesTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:26'! parserClass ^ LAJavaGrammar! ! !LAJavaPackagesTests 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); } }'! ! !LAJavaPackagesTests 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(); } }'! ! !LAJavaPackagesTests 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); } }'! ! !LAJavaPackagesTests 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!!"); } }'! ! !LAJavaPackagesTests 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"); } } }'! ! !LAJavaPackagesTests 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 } }'! ! LAGrammarTest subclass: #LASmalltalkGrammarTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Smalltalk'! LASmalltalkGrammarTests subclass: #LASmalltalkCompilerTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Smalltalk'! !LASmalltalkCompilerTests methodsFor: 'private' stamp: 'lr 3/26/2009 14:56'! assert: aNode format: aString aNode isCollection ifFalse: [ ^ self assert: (Array with: aNode) format: (Array with: aString) ]. self assert: aNode size = aString size. aNode with: aString do: [ :node :string | self assert: node formattedCode = string ]! ! !LASmalltalkCompilerTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:22'! parserClass ^ LASmalltalkCompiler! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock1 super testArgumentsBlock1. self assert: result isBlock. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock2 super testArgumentsBlock2. self assert: result isBlock. self assert: result arguments size = 2. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result arguments second isVariable. self assert: result arguments second name = 'b'. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock3 super testArgumentsBlock3. self assert: result isBlock. self assert: result arguments size = 3. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result arguments second isVariable. self assert: result arguments second name = 'b'. self assert: result arguments third isVariable. self assert: result arguments third name = 'c'. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral1 super testArrayLiteral1. self assert: result isLiteral. self assert: result value = #()! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral10 super testArrayLiteral10. self assert: result isLiteral. self assert: result value = #(#(1 2 ) #(1 2 3 ) )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 10:03'! testArrayLiteral11 super testArrayLiteral11. self assert: result isLiteral. self assert: result value size = 2. self assert: (result value first isKindOf: ByteArray). self assert: result value first size = 2. self assert: (result value last isKindOf: ByteArray). self assert: result value last size = 3! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral2 super testArrayLiteral2. self assert: result isLiteral. self assert: result value = #(1 )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral3 super testArrayLiteral3. self assert: result isLiteral. self assert: result value = #(1 2 )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral4 super testArrayLiteral4. self assert: result isLiteral. self assert: result value = #(true false nil )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral5 super testArrayLiteral5. self assert: result isLiteral. self assert: result value = #($a )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral6 super testArrayLiteral6. self assert: result isLiteral. self assert: result value = #(1.2 )! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 16:03'! testArrayLiteral7 super testArrayLiteral7. self assert: result isLiteral. self assert: result value = #(size #at: at:put: #'=='). result value do: [ :each | self assert: each isSymbol ]! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 16:01'! testArrayLiteral8 super testArrayLiteral8. self assert: result isLiteral. self assert: result value = #('baz'). self assert: result value first isString. self assert: result value first isSymbol not! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 16:02'! testArrayLiteral9 super testArrayLiteral9. self assert: result isLiteral. self assert: result value = #((1) 2)! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment1 super testAssignment1. self assert: result isLiteral. self assert: result value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment2 super testAssignment2. self assert: result isAssignment. self assert: result variable isVariable. self assert: result variable name = 'a'. self assert: result value isLiteral. self assert: result value value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment3 super testAssignment3. self assert: result isAssignment. self assert: result variable isVariable. self assert: result variable name = 'a'. self assert: result value isAssignment. self assert: result value variable isVariable. self assert: result value variable name = 'b'. self assert: result value value isLiteral. self assert: result value value value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment4 super testAssignment4. self assert: result isAssignment. self assert: result variable isVariable. self assert: result variable name = 'a'. self assert: result value isLiteral. self assert: result value value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment5 super testAssignment5. self assert: result isAssignment. self assert: result variable isVariable. self assert: result variable name = 'a'. self assert: result value isAssignment. self assert: result value variable isVariable. self assert: result value variable name = 'b'. self assert: result value value isLiteral. self assert: result value value value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryExpression1 super testBinaryExpression1. self assert: result isMessage. self assert: result receiver isLiteral. self assert: result receiver value = 1. self assert: result arguments size = 1. self assert: result arguments first isLiteral. self assert: result arguments first value = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryExpression2 super testBinaryExpression2. self assert: result isMessage. self assert: result receiver isMessage. self assert: result receiver receiver isLiteral. self assert: result receiver receiver value = 1. self assert: result receiver arguments size = 1. self assert: result receiver arguments first isLiteral. self assert: result receiver arguments first value = 2. self assert: result arguments size = 1. self assert: result arguments first isLiteral. self assert: result arguments first value = 3! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod1 super testBinaryMethod1. self assert: result isMethod. self assert: result selector = #+. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod2 super testBinaryMethod2. self assert: result isMethod. self assert: result selector = #+. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod3 super testBinaryMethod3. self assert: result isMethod. self assert: result selector = #+. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries isEmpty. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod4 super testBinaryMethod4. self assert: result isMethod. self assert: result selector = #+. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:59'! testByteLiteral1 super testByteLiteral1. self assert: result isLiteral. self assert: (result value isKindOf: ByteArray). self assert: result value isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:59'! testByteLiteral2 super testByteLiteral2. self assert: result isLiteral. self assert: (result value isKindOf: ByteArray). self assert: result value size = 1. self assert: result value first = 0! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 10:00'! testByteLiteral3 super testByteLiteral3. self assert: result isLiteral. self assert: (result value isKindOf: ByteArray). self assert: result value size = 1. self assert: result value first = 255! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 10:00'! testByteLiteral4 super testByteLiteral4. self assert: result isLiteral. self assert: (result value isKindOf: ByteArray). self assert: result value size = 2. self assert: result value first = 1. self assert: result value last = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 10:02'! testByteLiteral5 super testByteLiteral5. self assert: result isLiteral. self assert: (result value isKindOf: ByteArray). self assert: result value size = 3. self assert: result value first = 10. self assert: result value second = 63. self assert: result value last = 255! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression1 super testCascadeExpression1. self assert: result isCascade. self assert: result receiver isLiteral. self assert: result messages size = 2. self assert: result messages first receiver = result receiver. self assert: result messages first selector = #abs. self assert: result messages second receiver = result receiver. self assert: result messages second selector = #negated! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression2 super testCascadeExpression2. self assert: result isCascade. self assert: result receiver isMessage. self assert: result receiver receiver isLiteral. self assert: result receiver receiver value = 1. self assert: result receiver selector = #abs. self assert: result messages size = 3. self assert: result messages first receiver = result receiver. self assert: result messages first selector = #negated. self assert: result messages second receiver = result receiver. self assert: result messages second selector = #raisedTo:. self assert: result messages third receiver = result receiver. self assert: result messages third selector = #negated! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression3 super testCascadeExpression3. self assert: result isCascade. self assert: result receiver isLiteral. self assert: result receiver value = 1. self assert: result messages size = 2. self assert: result messages first receiver = result receiver. self assert: result messages first selector = #+. self assert: result messages first arguments size = 1. self assert: result messages second receiver = result receiver. self assert: result messages second selector = #-. self assert: result messages second arguments size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral1 super testCharLiteral1. self assert: result isLiteral. self assert: result value = $a! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral2 super testCharLiteral2. self assert: result isLiteral. self assert: result value = Character space! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral3 super testCharLiteral3. self assert: result isLiteral. self assert: result value = $$! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:57'! testComment1 super testComment1. self assert: result isMessage. self assert: result receiver isValue. self assert: result selector = #+. self assert: result arguments first isValue! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:57'! testComment2 super testComment2. self assert: result isMessage. self assert: result receiver isValue. self assert: result selector = #+. self assert: result arguments first isValue! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:57'! testComment3 super testComment3. self assert: result isMessage. self assert: result receiver isValue. self assert: result selector = #+. self assert: result arguments first isValue! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:57'! testComment4 super testComment4. self assert: result isMessage. self assert: result receiver isValue. self assert: result selector = #+. self assert: result arguments first isValue! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:57'! testComment5 super testComment5. self assert: result isMessage. self assert: result receiver isValue. self assert: result selector = #+. self assert: result arguments first isValue! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testComplexBlock1 super testComplexBlock1. self assert: result isBlock. self assert: result arguments size = 1. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testComplexBlock2 super testComplexBlock2. self assert: result isBlock. self assert: result arguments size = 1. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression1 super testKeywordExpression1. self assert: result isMessage. self assert: result receiver isLiteral. self assert: result receiver value = 1. self assert: result selector = #to:. self assert: result arguments size = 1. self assert: result arguments first isLiteral. self assert: result arguments first value = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression2 super testKeywordExpression2. self assert: result isMessage. self assert: result receiver isLiteral. self assert: result selector = #to:by:. self assert: result arguments size = 2. self assert: result arguments first isLiteral. self assert: result arguments first value = 2. self assert: result arguments second isLiteral. self assert: result arguments second value = 3! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression3 super testKeywordExpression3. self assert: result isMessage. self assert: result receiver isLiteral. self assert: result selector = #to:by:do:. self assert: result arguments size = 3. self assert: result arguments first isLiteral. self assert: result arguments first value = 2. self assert: result arguments second isLiteral. self assert: result arguments second value = 3. self assert: result arguments third isLiteral. self assert: result arguments third value = 4! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod1 super testKeywordMethod1. self assert: result isMethod. self assert: result selector = #to:. self assert: result arguments size = 1. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod2 super testKeywordMethod2. self assert: result isMethod. self assert: result selector = #to:do:. self assert: result arguments size = 2. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result arguments second isVariable. self assert: result arguments second name = 'b'. self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod3 super testKeywordMethod3. self assert: result isMethod. self assert: result selector = #to:do:by:. self assert: result arguments size = 3. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result arguments second isVariable. self assert: result arguments second name = 'b'. self assert: result arguments third isVariable. self assert: result arguments third name = 'c'. self assert: result body temporaries isEmpty. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod4 super testKeywordMethod4. self assert: result isMethod. self assert: result selector = #to:do:by:. self assert: result arguments size = 3. self assert: result arguments first isVariable. self assert: result arguments first name = 'a'. self assert: result arguments second isVariable. self assert: result arguments second name = 'b'. self assert: result arguments third isVariable. self assert: result arguments third name = 'c'. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral1 super testNumberLiteral1. self assert: result isLiteral. self assert: result value = 0! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral10 super testNumberLiteral10. self assert: result isLiteral. self assert: result value = 10! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral11 super testNumberLiteral11. self assert: result isLiteral. self assert: result value = 511! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral12 super testNumberLiteral12. self assert: result isLiteral. self assert: result value = 175! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral13 super testNumberLiteral13. self assert: result isLiteral. self assert: result value = 202.9921875! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral14 super testNumberLiteral14. self assert: result isLiteral. self assert: result value floor = -9! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral2 super testNumberLiteral2. self assert: result isLiteral. self assert: result value = 0.1! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral3 super testNumberLiteral3. self assert: result isLiteral. self assert: result value = 123! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral4 super testNumberLiteral4. self assert: result isLiteral. self assert: result value = 123.456! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral5 super testNumberLiteral5. self assert: result isLiteral. self assert: result value = 0! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral6 super testNumberLiteral6. self assert: result isLiteral. self assert: result value = -0.1! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral7 super testNumberLiteral7. self assert: result isLiteral. self assert: result value = -123! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral8 super testNumberLiteral8. self assert: result isLiteral. self assert: result value = -123! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral9 super testNumberLiteral9. self assert: result isLiteral. self assert: result value = -123.456! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:59'! testPragma1 super testPragma1. self assert: result pragmas format: #(''). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:51'! testPragma10 super testPragma10. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma11 super testPragma11. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma12 super testPragma12. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma13 super testPragma13. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:51'! testPragma14 super testPragma14. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:06'! testPragma15 super testPragma15. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:56'! testPragma2 super testPragma2. self assert: result pragmas format: #( '' '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:57'! testPragma3 super testPragma3. self assert: result pragmas format: #( '' ). self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:57'! testPragma4 super testPragma4. self assert: result pragmas format: #( '' ). self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:57'! testPragma5 super testPragma5. self assert: result pragmas format: #( '' '' ). self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma6 super testPragma6. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma7 super testPragma7. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:00'! testPragma8 super testPragma8. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:51'! testPragma9 super testPragma9. self assert: result pragmas format: #( '' ). self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testSequence1 super testSequence1. self assert: result isSequence. self assert: result temporaries size = 1. self assert: result temporaries first isVariable. self assert: result temporaries first name = 'a'. self assert: result statements size = 2. self assert: result statements first isLiteral. self assert: result statements first value = 1. self assert: result statements second isLiteral. self assert: result statements second value = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testSimpleBlock1 super testSimpleBlock1. self assert: result isBlock. self assert: result arguments isEmpty. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testSimpleBlock2 super testSimpleBlock2. self assert: result isBlock. self assert: result arguments isEmpty. self assert: result body temporaries isEmpty. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 3/26/2009 17:02'! testSimpleBlock3 super testSimpleBlock3. self assert: result isBlock. self assert: result arguments size = 1. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral1 super testSpecialLiteral1. self assert: result isLiteral. self assert: result value = true! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral2 super testSpecialLiteral2. self assert: result isLiteral. self assert: result value = false! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral3 super testSpecialLiteral3. self assert: result isLiteral. self assert: result value = nil! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock1 super testStatementBlock1. self assert: result isBlock. self assert: result arguments isEmpty. self assert: result body temporaries isEmpty. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock2 super testStatementBlock2. self assert: result isBlock. self assert: result arguments isEmpty. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock3 super testStatementBlock3. self assert: result isBlock. self assert: result arguments isEmpty. self assert: result body temporaries size = 2. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements1 super testStatements1. self assert: result isSequence. self assert: result temporaries isEmpty. self assert: result statements size = 1. self assert: result statements first isLiteral. self assert: result statements first value = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements2 super testStatements2. self assert: result isSequence. self assert: result temporaries isEmpty. self assert: result statements size = 2. self assert: result statements first isLiteral. self assert: result statements first value = 1. self assert: result statements second isLiteral. self assert: result statements second value = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements3 super testStatements3. self assert: result isSequence. self assert: result temporaries isEmpty. self assert: result statements size = 3. self assert: result statements first isLiteral. self assert: result statements first value = 1. self assert: result statements second isLiteral. self assert: result statements second value = 2. self assert: result statements third isLiteral. self assert: result statements third value = 3! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/26/2009 16:13'! testStatements4 super testStatements4. self assert: result isSequence. self assert: result temporaries isEmpty. self assert: result statements size = 3. self assert: result statements first isLiteral. self assert: result statements first value = 1. self assert: result statements second isLiteral. self assert: result statements second value = 2. self assert: result statements third isLiteral. self assert: result statements third value = 3! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/26/2009 16:14'! testStatements5 super testStatements5. self assert: result isSequence. self assert: result temporaries isEmpty. self assert: result statements size = 2. self assert: result statements first isLiteral. self assert: result statements first value = 1. self assert: result statements second isLiteral. self assert: result statements second value = 2! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral1 super testStringLiteral1. self assert: result isLiteral. self assert: result value = ''! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral2 super testStringLiteral2. self assert: result isLiteral. self assert: result value = 'ab'! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral3 super testStringLiteral3. self assert: result isLiteral. self assert: result value = 'ab''cd'! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral1 super testSymbolLiteral1. self assert: result isLiteral. self assert: result value = #foo! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral2 super testSymbolLiteral2. self assert: result isLiteral. self assert: result value = #+! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral3 super testSymbolLiteral3. self assert: result isLiteral. self assert: result value = #key:! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral4 super testSymbolLiteral4. self assert: result isLiteral. self assert: result value = #key:value:! ! !LASmalltalkCompilerTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral5 super testSymbolLiteral5. self assert: result isLiteral. self assert: result value = #'testing-result'! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries1 super testTemporaries1. self assert: result isSequence. self assert: result temporaries size = 1. self assert: result temporaries first isVariable. self assert: result temporaries first name = 'a'. self assert: result statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries2 super testTemporaries2. self assert: result isSequence. self assert: result temporaries size = 2. self assert: result temporaries first isVariable. self assert: result temporaries first name = 'a'. self assert: result temporaries second isVariable. self assert: result temporaries second name = 'b'. self assert: result statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries3 super testTemporaries3. self assert: result isSequence. self assert: result temporaries size = 3. self assert: result temporaries first isVariable. self assert: result temporaries first name = 'a'. self assert: result temporaries second isVariable. self assert: result temporaries second name = 'b'. self assert: result temporaries third isVariable. self assert: result temporaries third name = 'c'. self assert: result statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryExpression1 super testUnaryExpression1. self assert: result isMessage. self assert: result receiver isLiteral. self assert: result selector = #abs. self assert: result arguments isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryExpression2 super testUnaryExpression2. self assert: result isMessage. self assert: result receiver isMessage. self assert: result receiver receiver isLiteral. self assert: result receiver receiver value = 1. self assert: result receiver selector = #abs. self assert: result receiver arguments isEmpty. self assert: result selector = #negated. self assert: result arguments isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod1 super testUnaryMethod1. self assert: result isMethod. self assert: result selector = #abs. self assert: result arguments isEmpty. self assert: result body temporaries isEmpty. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod2 super testUnaryMethod2. self assert: result isMethod. self assert: result selector = #abs. self assert: result arguments isEmpty. self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod3 super testUnaryMethod3. self assert: result isMethod. self assert: result selector = #abs. self assert: result arguments isEmpty. self assert: result body temporaries isEmpty. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod4 super testUnaryMethod4. self assert: result isMethod. self assert: result selector = #abs. self assert: result arguments isEmpty. self assert: result body temporaries size = 1. self assert: result body statements size = 1! ! !LASmalltalkCompilerTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod5 super testUnaryMethod5. self assert: result isMethod. self assert: result selector = #abs. self assert: result arguments isEmpty. self assert: result body temporaries size = 1. self assert: result body statements isEmpty! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:19'! testVariable1 super testVariable1. self assert: result isVariable. self assert: result name = 'trueBinding'! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:19'! testVariable2 super testVariable2. self assert: result isVariable. self assert: result name = 'falseBinding'! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:19'! testVariable3 super testVariable3. self assert: result isVariable. self assert: result name = 'nilly'! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:19'! testVariable4 super testVariable4. self assert: result isVariable. self assert: result name = 'selfish'! ! !LASmalltalkCompilerTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:19'! testVariable5 super testVariable5. self assert: result isVariable. self assert: result name = 'supernanny'! ! !LASmalltalkGrammarTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:14'! parserClass ^ LASmalltalkGrammar! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock1 self parse: '[ :a | ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock2 self parse: '[ :a :b | ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testArgumentsBlock3 self parse: '[ :a :b :c | ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral1 self parse: '#()' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral10 self parse: '#((1 2) #(1 2 3))' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:46'! testArrayLiteral11 self parse: '#([1 2] #[1 2 3])' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral2 self parse: '#(1)' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral3 self parse: '#(1 2)' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral4 self parse: '#(true false nil)' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral5 self parse: '#($a)' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral6 self parse: '#(1.2)' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:45'! testArrayLiteral7 self parse: '#(size #at: at:put: #''=='')' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral8 self parse: '#(''baz'')' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testArrayLiteral9 self parse: '#((1) 2))' rule: #arrayLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment1 self parse: '1' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment2 self parse: 'a := 1' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment3 self parse: 'a := b := 1' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment4 self parse: 'a _ 1' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testAssignment5 self parse: 'a _ b _ 1' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryExpression1 self parse: '1 + 2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryExpression2 self parse: '1 + 2 + 3' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod1 self parse: '+ a' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod2 self parse: '+ a | b |' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod3 self parse: '+ a b' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testBinaryMethod4 self parse: '+ a | b | c' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:44'! testByteLiteral1 self parse: '#[]' rule: #byteLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:50'! testByteLiteral2 self parse: '#[0]' rule: #byteLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:50'! testByteLiteral3 self parse: '#[255]' rule: #byteLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 09:50'! testByteLiteral4 self parse: '#[ 1 2 ]' rule: #byteLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 1/30/2009 10:02'! testByteLiteral5 self parse: '#[ 2r1010 8r77 16rFF ]' rule: #byteLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression1 self parse: '1 abs; negated' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression2 self parse: '1 abs negated; raisedTo: 12; negated' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testCascadeExpression3 self parse: '1 + 2; - 3' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral1 self parse: '$a' rule: #charLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral2 self parse: '$ ' rule: #charLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testCharLiteral3 self parse: '$$' rule: #charLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:55'! testComment1 self parse: '1"one"+2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:55'! testComment2 self parse: '1 "one" +2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:56'! testComment3 self parse: '1"one"+"two"2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:56'! testComment4 self parse: '1"one""two"+2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 1/22/2009 14:56'! testComment5 self parse: '1"one" "two"+2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testComplexBlock1 self parse: '[ :a | | b | c ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testComplexBlock2 self parse: '[:a||b|c]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression1 self parse: '1 to: 2' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression2 self parse: '1 to: 2 by: 3' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordExpression3 self parse: '1 to: 2 by: 3 do: 4' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod1 self parse: 'to: a' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod2 self parse: 'to: a do: b | c |' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod3 self parse: 'to: a do: b by: c d' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testKeywordMethod4 self parse: 'to: a do: b by: c | d | e' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral1 self parse: '0' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral10 self parse: '10r10' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral11 self parse: '8r777' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral12 self parse: '16rAF' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral13 self parse: '16rCA.FE' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral14 self parse: '3r-22.2' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral2 self parse: '0.1' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral3 self parse: '123' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral4 self parse: '123.456' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral5 self parse: '-0' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral6 self parse: '-0.1' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral7 self parse: '-123' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral8 self parse: '-123' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testNumberLiteral9 self parse: '-123.456' rule: #numberLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 10/23/2008 15:53'! testPragma1 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:52'! testPragma10 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:52'! testPragma11 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:52'! testPragma12 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:52'! testPragma13 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:05'! testPragma14 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 15:05'! testPragma15 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:37'! testPragma2 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 10/23/2008 15:53'! testPragma3 self parse: 'method | a | ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 10/23/2008 15:53'! testPragma4 self parse: 'method | a |' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 10/23/2008 15:53'! testPragma5 self parse: 'method | a | ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:36'! testPragma6 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:37'! testPragma7 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:37'! testPragma8 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-pragmas' stamp: 'lr 3/26/2009 14:37'! testPragma9 self parse: 'method ' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testSequence1 self parse: '| a | 1 . 2' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testSimpleBlock1 self parse: '[ ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testSimpleBlock2 self parse: '[ nil ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 3/26/2009 16:11'! testSimpleBlock3 self parse: '[ :a ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral1 self parse: 'true' rule: #trueLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral2 self parse: 'false' rule: #falseLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSpecialLiteral3 self parse: 'nil' rule: #nilLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock1 self parse: '[ nil ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock2 self parse: '[ | a | nil ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing-blocks' stamp: 'lr 10/23/2008 15:53'! testStatementBlock3 self parse: '[ | a b | nil ]' rule: #block! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements1 self parse: '1' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements2 self parse: '1 . 2' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testStatements3 self parse: '1 . 2 . 3' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:11'! testStatements4 self parse: '1 . 2 . 3 .' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/26/2009 16:13'! testStatements5 self parse: '1 . . 2' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral1 self parse: '''''' rule: #stringLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral2 self parse: '''ab''' rule: #stringLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testStringLiteral3 self parse: '''ab''''cd''' rule: #stringLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral1 self parse: '#foo' rule: #symbolLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral2 self parse: '#+' rule: #symbolLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral3 self parse: '#key:' rule: #symbolLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral4 self parse: '#key:value:' rule: #symbolLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing-literals' stamp: 'lr 10/23/2008 15:53'! testSymbolLiteral5 self parse: '#''testing-result''' rule: #symbolLiteral! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries1 self parse: '| a |' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries2 self parse: '| a b |' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 10/23/2008 15:53'! testTemporaries3 self parse: '| a b c |' rule: #sequence! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryExpression1 self parse: '1 abs' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryExpression2 self parse: '1 abs negated' rule: #expression! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod1 self parse: 'abs' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod2 self parse: 'abs | a |' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod3 self parse: 'abs a' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod4 self parse: 'abs | a | b' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing-messages' stamp: 'lr 10/23/2008 15:53'! testUnaryMethod5 self parse: 'abs | a |' rule: #method! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:14'! testVariable1 self parse: 'trueBinding' rule: #primary! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:17'! testVariable2 self parse: 'falseBinding' rule: #primary! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:17'! testVariable3 self parse: 'nilly' rule: #primary! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:18'! testVariable4 self parse: 'selfish' rule: #primary! ! !LASmalltalkGrammarTests methodsFor: 'testing' stamp: 'lr 3/18/2009 10:18'! testVariable5 self parse: 'supernanny' rule: #primary! ! LASmalltalkGrammarTests subclass: #LASmalltalkHighlighterTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Smalltalk'! !LASmalltalkHighlighterTests methodsFor: 'accessing' stamp: 'lr 10/23/2008 15:53'! parserClass ^ LASmalltalkHighlighter! ! LAGrammarTest subclass: #LASmalltalkPackagesTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-Tests-Smalltalk'! !LASmalltalkPackagesTests commentStamp: 'lr 3/26/2009 16:09' prior: 0! Evalaute the following code to verify the complete image. PackageOrganizer default packages inject: LAPackagesTests new into: [ :test :package | [ test verifyPackage: package packageName ] on: TestResult resumableFailure do: [ :err | err resume ] ]! !LASmalltalkPackagesTests methodsFor: 'private' stamp: 'lr 3/26/2009 14:32'! assert: aBoolean description: aString aBoolean ifFalse: [ Transcript show: aString; cr ]. self assert: aBoolean description: aString resumable: true! ! !LASmalltalkPackagesTests methodsFor: 'accessing' stamp: 'lr 5/7/2009 10:21'! parserClass ^ LASmalltalkCompiler! ! !LASmalltalkPackagesTests methodsFor: 'testing' stamp: 'lr 3/26/2009 15:47'! testBoolean self verifyClass: Boolean. self verifyClass: True. self verifyClass: False! ! !LASmalltalkPackagesTests methodsFor: 'testing' stamp: 'lr 3/26/2009 15:56'! testCollection self verifyClass: Collection. self verifyClass: Array. self verifyClass: Set. self verifyClass: Dictionary. self verifyClass: Bag. self verifyClass: OrderedCollection. self verifyClass: SortedCollection! ! !LASmalltalkPackagesTests methodsFor: 'testing' stamp: 'lr 3/26/2009 15:56'! testMagnitude self verifyClass: Magnitude. self verifyClass: Point. self verifyClass: Integer. self verifyClass: SmallInteger. self verifyClass: Fraction. self verifyClass: Float! ! !LASmalltalkPackagesTests methodsFor: 'testing' stamp: 'lr 3/26/2009 15:57'! testObject self verifyClass: Object. self verifyClass: ProtoObject! ! !LASmalltalkPackagesTests methodsFor: 'private' stamp: 'lr 3/26/2009 14:28'! verifyClass: aClass aClass selectors do: [ :selector | self verifyClass: aClass selector: selector ] displayingProgress: aClass name! ! !LASmalltalkPackagesTests methodsFor: 'private' stamp: 'lr 3/27/2009 11:32'! verifyClass: aClass selector: aSelector "Verifies that the method aSelector in aClass parses the same using the standard refactoring parser and the langauge aspect parser. Methods that contain float literals are ignored, since they do not reproduce well. Furthermore methods with pragmas are not actually compared as they might pretty print differently." | source original other | source := aClass sourceCodeAt: aSelector. source isNil ifTrue: [ ^ self ]. original := aClass parseTreeFor: aSelector. original isNil ifTrue: [ ^ self ]. original nodesDo: [ :each | each comments: nil ]. other := self parser parse: source asParserStream. source := aClass name , '>>#' , source. other isFailure ifTrue: [ self assert: false description: source ] ifFalse: [ (other pragmas isEmpty and: [ ((aClass compiledMethodAt: aSelector) hasLiteralSuchThat: [ :literal | literal isFloat ]) not ]) ifTrue: [ self assert: original formattedCode = other formattedCode description: source ] ]! ! !LASmalltalkPackagesTests methodsFor: 'private' stamp: 'lr 3/26/2009 14:28'! verifyPackage: aString | package | package := PackageInfo named: aString. package classesAndMetaClasses do: [ :each | self verifyClass: each ] displayingProgress: aString! ! !QQMetaNode class methodsFor: '*languageaspects' stamp: 'lr 2/3/2009 18:49'! highlight: aCollection ^ aCollection! ! OBCommand subclass: #LACmdAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! LACmdAspect subclass: #LACmdActivateAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdActivateAspect methodsFor: 'execution' stamp: 'lr 10/30/2008 13:40'! execute self aspect active: self aspect isActive not! ! !LACmdActivateAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:45'! label ^ self aspect isActive ifTrue: [ 'disable aspect' ] ifFalse: [ 'enable aspect' ]! ! !LACmdAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:19'! aspect ^ target theNonMetaClass default! ! !LACmdAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:42'! cluster ^ #'language aspects'! ! !LACmdAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:42'! group ^ #aspect! ! !LACmdAspect methodsFor: 'testing' stamp: 'lr 10/30/2008 13:43'! isActive ^ (requestor isSelected: target) and: [ (target isKindOf: OBClassAwareNode) and: [ target theNonMetaClass includesBehavior: LAAspect ] ]! ! LACmdAspect subclass: #LACmdInspectAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdInspectAspect methodsFor: 'execution' stamp: 'lr 10/30/2008 13:34'! execute self aspect explore! ! !LACmdInspectAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:36'! icon ^ #inspectItIcon! ! !LACmdInspectAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:45'! label ^ 'inspect aspect'! ! LACmdAspect subclass: #LACmdRecompileAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdRecompileAspect methodsFor: 'execution' stamp: 'lr 10/30/2008 13:21'! execute self aspect recompile! ! !LACmdRecompileAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:45'! label ^ 'recompile users'! ! LACmdAspect subclass: #LACmdScopeAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdScopeAspect methodsFor: 'execution' stamp: 'lr 10/30/2008 13:23'! execute self aspect environment browserInstance open ! ! !LACmdScopeAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:44'! label ^ 'browse scope'! ! OBCommand subclass: #LACmdObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! LACmdObject subclass: #LACmdAddAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdAddAspect methodsFor: 'execution' stamp: 'lr 11/11/2008 12:02'! execute | environment aspect | environment := target browserEnvironment. aspect := self chooseAspect: 'Add Language Aspect' select: [ :each | (each environment & environment) isEmpty ]. aspect isNil ifTrue: [ ^ self ]. aspect add: environment! ! !LACmdAddAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:11'! group ^ #scope! ! !LACmdAddAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:11'! label ^ 'add aspect...'! ! LACmdObject subclass: #LACmdBrowseAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdBrowseAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:16'! environment | environment | environment := self aspects inject: ClassEnvironment new into: [ :result :aspect | (target withinBrowserEnvironment: aspect environment) ifTrue: [ result addClass: aspect class ]. result ]. environment label: 'Language Aspects for ' , target name. ^ environment! ! !LACmdBrowseAspect methodsFor: 'execution' stamp: 'lr 10/30/2008 14:04'! execute | aspects | aspects := self aspects select: [ :each | target withinBrowserEnvironment: each environment ]. aspects isEmpty ifTrue: [ ^ self ]. aspects size = 1 ifTrue: [ ^ requestor browser jumpTo: aspects anyOne class asNode ]. self environment browserInstance open! ! !LACmdBrowseAspect methodsFor: 'testing' stamp: 'lr 10/30/2008 13:52'! isEnabled ^ self environment isEmpty not! ! !LACmdBrowseAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:16'! label ^ 'browse aspect'! ! !LACmdObject methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:42'! aspect ^ target theNonMetaClass default! ! !LACmdObject methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:43'! aspects ^ LAAspect all! ! !LACmdObject methodsFor: 'utilities' stamp: 'lr 10/30/2008 14:06'! chooseAspect: aString ^ self chooseAspect: aString select: [ :each | true ]! ! !LACmdObject methodsFor: 'utilities' stamp: 'lr 10/30/2008 14:06'! chooseAspect: aString select: aBlock | aspects labels | aspects := self aspects asArray select: aBlock. aspects isEmpty ifTrue: [ ^ nil ]. aspects sort: [ :a :b | a name < b name ]. labels := aspects collect: [ :each | each name ]. ^ OBChoiceRequest prompt: aString labels: labels values: aspects! ! !LACmdObject methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:42'! cluster ^ #'language aspects'! ! !LACmdObject methodsFor: 'accessing' stamp: 'lr 10/30/2008 13:42'! group ^ #object! ! !LACmdObject methodsFor: 'testing' stamp: 'lr 10/30/2008 13:43'! isActive ^ (requestor isSelected: target) and: [ target isKindOf: OBClassAwareNode ]! ! LACmdObject subclass: #LACmdRemoveAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'LanguageAspects-OmniBrowser'! !LACmdRemoveAspect methodsFor: 'execution' stamp: 'lr 11/11/2008 12:03'! execute | environment aspect | environment := target browserEnvironment. aspect := self chooseAspect: 'Remove Language Aspect' select: [ :each | (each environment & environment) isEmpty not ]. aspect isNil ifTrue: [ ^ self ]. aspect environments do: [ :each | (each & environment) isEmpty ifFalse: [ aspect remove: each ] ]! ! !LACmdRemoveAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:11'! group ^ #scope! ! !LACmdRemoveAspect methodsFor: 'accessing' stamp: 'lr 10/30/2008 14:12'! label ^ 'remove aspect...'! ! LASmalltalkGrammar initialize! LASmalltalkHighlighter initialize!