cmDependsJavaParser.y 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227
  1. %{
  2. /*=========================================================================
  3. Program: CMake - Cross-Platform Makefile Generator
  4. Module: $RCSfile$
  5. Language: C++
  6. Date: $Date$
  7. Version: $Revision$
  8. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  9. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  10. This software is distributed WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE. See the above copyright notices for more information.
  13. =========================================================================*/
  14. /*
  15. This file must be translated to C and modified to build everywhere.
  16. Run bison like this:
  17. bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y
  18. Modify cmDependsJavaParser.c:
  19. - remove TABs
  20. */
  21. /* Configure the parser to use a lexer object. */
  22. #define YYPARSE_PARAM yyscanner
  23. #define YYLEX_PARAM yyscanner
  24. #define YYERROR_VERBOSE 1
  25. #define cmDependsJava_yyerror(x) \
  26. cmDependsJavaError(yyscanner, x)
  27. #define yyGetParser (cmDependsJava_yyget_extra(yyscanner))
  28. /*-------------------------------------------------------------------------*/
  29. #include "cmDependsJavaParserHelper.h" /* Interface to parser object. */
  30. #include "cmDependsJavaLexer.h" /* Interface to lexer object. */
  31. #include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */
  32. /* Forward declare the lexer entry point. */
  33. YY_DECL;
  34. /* Internal utility functions. */
  35. static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
  36. #define YYDEBUG 1
  37. #define YYMAXDEPTH 1000000
  38. #define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp);
  39. #define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval)
  40. #define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
  41. /* Disable some warnings in the generated code. */
  42. #ifdef __BORLANDC__
  43. # pragma warn -8004 /* Variable assigned a value that is not used. */
  44. #endif
  45. #ifdef _MSC_VER
  46. # pragma warning (disable: 4102) /* Unused goto label. */
  47. # pragma warning (disable: 4065) /* Switch statement contains default but no case. */
  48. #endif
  49. %}
  50. /* Generate a reentrant parser object. */
  51. %pure_parser
  52. /*
  53. %union {
  54. char* string;
  55. }
  56. */
  57. /*-------------------------------------------------------------------------*/
  58. /* Tokens */
  59. %token jp_ABSTRACT
  60. %token jp_ASSERT
  61. %token jp_BOOLEAN_TYPE
  62. %token jp_BREAK
  63. %token jp_BYTE_TYPE
  64. %token jp_CASE
  65. %token jp_CATCH
  66. %token jp_CHAR_TYPE
  67. %token jp_CLASS
  68. %token jp_CONTINUE
  69. %token jp_DEFAULT
  70. %token jp_DO
  71. %token jp_DOUBLE_TYPE
  72. %token jp_ELSE
  73. %token jp_EXTENDS
  74. %token jp_FINAL
  75. %token jp_FINALLY
  76. %token jp_FLOAT_TYPE
  77. %token jp_FOR
  78. %token jp_IF
  79. %token jp_IMPLEMENTS
  80. %token jp_IMPORT
  81. %token jp_INSTANCEOF
  82. %token jp_INT_TYPE
  83. %token jp_INTERFACE
  84. %token jp_LONG_TYPE
  85. %token jp_NATIVE
  86. %token jp_NEW
  87. %token jp_PACKAGE
  88. %token jp_PRIVATE
  89. %token jp_PROTECTED
  90. %token jp_PUBLIC
  91. %token jp_RETURN
  92. %token jp_SHORT_TYPE
  93. %token jp_STATIC
  94. %token jp_STRICTFP
  95. %token jp_SUPER
  96. %token jp_SWITCH
  97. %token jp_SYNCHRONIZED
  98. %token jp_THIS
  99. %token jp_THROW
  100. %token jp_THROWS
  101. %token jp_TRANSIENT
  102. %token jp_TRY
  103. %token jp_VOID
  104. %token jp_VOLATILE
  105. %token jp_WHILE
  106. %token jp_BOOLEANLITERAL
  107. %token jp_CHARACTERLITERAL
  108. %token jp_DECIMALINTEGERLITERAL
  109. %token jp_FLOATINGPOINTLITERAL
  110. %token jp_HEXINTEGERLITERAL
  111. %token jp_NULLLITERAL
  112. %token jp_STRINGLITERAL
  113. %token jp_NAME
  114. %token jp_AND
  115. %token jp_ANDAND
  116. %token jp_ANDEQUALS
  117. %token jp_BRACKETEND
  118. %token jp_BRACKETSTART
  119. %token jp_CARROT
  120. %token jp_CARROTEQUALS
  121. %token jp_COLON
  122. %token jp_COMMA
  123. %token jp_CURLYEND
  124. %token jp_CURLYSTART
  125. %token jp_DIVIDE
  126. %token jp_DIVIDEEQUALS
  127. %token jp_DOLLAR
  128. %token jp_DOT
  129. %token jp_EQUALS
  130. %token jp_EQUALSEQUALS
  131. %token jp_EXCLAMATION
  132. %token jp_EXCLAMATIONEQUALS
  133. %token jp_GREATER
  134. %token jp_GTEQUALS
  135. %token jp_GTGT
  136. %token jp_GTGTEQUALS
  137. %token jp_GTGTGT
  138. %token jp_GTGTGTEQUALS
  139. %token jp_LESLESEQUALS
  140. %token jp_LESSTHAN
  141. %token jp_LTEQUALS
  142. %token jp_LTLT
  143. %token jp_MINUS
  144. %token jp_MINUSEQUALS
  145. %token jp_MINUSMINUS
  146. %token jp_PAREEND
  147. %token jp_PARESTART
  148. %token jp_PERCENT
  149. %token jp_PERCENTEQUALS
  150. %token jp_PIPE
  151. %token jp_PIPEEQUALS
  152. %token jp_PIPEPIPE
  153. %token jp_PLUS
  154. %token jp_PLUSEQUALS
  155. %token jp_PLUSPLUS
  156. %token jp_QUESTION
  157. %token jp_SEMICOL
  158. %token jp_TILDE
  159. %token jp_TIMES
  160. %token jp_TIMESEQUALS
  161. %token jp_ERROR
  162. /*-------------------------------------------------------------------------*/
  163. /* grammar */
  164. %%
  165. Goal:
  166. CompilationUnit
  167. {
  168. jpElementStart(1);
  169. jpCheckEmpty(1);
  170. $<str>$ = 0;
  171. yyGetParser->SetCurrentCombine("");
  172. }
  173. Literal:
  174. IntegerLiteral
  175. {
  176. jpElementStart(1);
  177. jpCheckEmpty(1);
  178. $<str>$ = 0;
  179. yyGetParser->SetCurrentCombine("");
  180. }
  181. |
  182. jp_FLOATINGPOINTLITERAL
  183. {
  184. jpElementStart(1);
  185. jpCheckEmpty(1);
  186. $<str>$ = 0;
  187. yyGetParser->SetCurrentCombine("");
  188. }
  189. |
  190. jp_BOOLEANLITERAL
  191. {
  192. jpElementStart(1);
  193. jpCheckEmpty(1);
  194. $<str>$ = 0;
  195. yyGetParser->SetCurrentCombine("");
  196. }
  197. |
  198. jp_CHARACTERLITERAL
  199. {
  200. jpElementStart(1);
  201. jpCheckEmpty(1);
  202. $<str>$ = 0;
  203. yyGetParser->SetCurrentCombine("");
  204. }
  205. |
  206. jp_STRINGLITERAL
  207. {
  208. jpElementStart(1);
  209. jpCheckEmpty(1);
  210. $<str>$ = 0;
  211. yyGetParser->SetCurrentCombine("");
  212. }
  213. |
  214. jp_NULLLITERAL
  215. {
  216. jpElementStart(1);
  217. jpCheckEmpty(1);
  218. $<str>$ = 0;
  219. yyGetParser->SetCurrentCombine("");
  220. }
  221. IntegerLiteral:
  222. jp_DECIMALINTEGERLITERAL
  223. {
  224. jpElementStart(1);
  225. jpCheckEmpty(1);
  226. $<str>$ = 0;
  227. yyGetParser->SetCurrentCombine("");
  228. }
  229. |
  230. jp_HEXINTEGERLITERAL
  231. {
  232. jpElementStart(1);
  233. jpCheckEmpty(1);
  234. $<str>$ = 0;
  235. yyGetParser->SetCurrentCombine("");
  236. }
  237. Type:
  238. PrimitiveType
  239. {
  240. jpElementStart(1);
  241. jpCheckEmpty(1);
  242. $<str>$ = 0;
  243. yyGetParser->SetCurrentCombine("");
  244. }
  245. |
  246. ReferenceType
  247. {
  248. jpElementStart(1);
  249. jpCheckEmpty(1);
  250. $<str>$ = 0;
  251. yyGetParser->SetCurrentCombine("");
  252. }
  253. PrimitiveType:
  254. jp_BYTE_TYPE
  255. {
  256. jpElementStart(0);
  257. }
  258. |
  259. jp_SHORT_TYPE
  260. {
  261. jpElementStart(0);
  262. }
  263. |
  264. jp_INT_TYPE
  265. {
  266. jpElementStart(0);
  267. }
  268. |
  269. jp_LONG_TYPE
  270. {
  271. jpElementStart(0);
  272. }
  273. |
  274. jp_CHAR_TYPE
  275. {
  276. jpElementStart(0);
  277. }
  278. |
  279. jp_FLOAT_TYPE
  280. {
  281. jpElementStart(0);
  282. }
  283. |
  284. jp_DOUBLE_TYPE
  285. {
  286. jpElementStart(0);
  287. }
  288. |
  289. jp_BOOLEAN_TYPE
  290. {
  291. jpElementStart(0);
  292. }
  293. ReferenceType:
  294. ClassOrInterfaceType
  295. {
  296. jpElementStart(1);
  297. jpCheckEmpty(1);
  298. $<str>$ = 0;
  299. yyGetParser->SetCurrentCombine("");
  300. }
  301. |
  302. ArrayType
  303. {
  304. jpElementStart(1);
  305. jpCheckEmpty(1);
  306. $<str>$ = 0;
  307. yyGetParser->SetCurrentCombine("");
  308. }
  309. ClassOrInterfaceType:
  310. Name
  311. {
  312. jpElementStart(1);
  313. jpStoreClass($<str>1);
  314. jpCheckEmpty(1);
  315. $<str>$ = 0;
  316. yyGetParser->SetCurrentCombine("");
  317. }
  318. ClassType:
  319. ClassOrInterfaceType
  320. {
  321. jpElementStart(1);
  322. jpCheckEmpty(1);
  323. $<str>$ = 0;
  324. yyGetParser->SetCurrentCombine("");
  325. }
  326. InterfaceType:
  327. ClassOrInterfaceType
  328. {
  329. jpElementStart(1);
  330. jpCheckEmpty(1);
  331. $<str>$ = 0;
  332. yyGetParser->SetCurrentCombine("");
  333. }
  334. ArrayType:
  335. PrimitiveType Dims
  336. {
  337. jpElementStart(2);
  338. jpCheckEmpty(2);
  339. $<str>$ = 0;
  340. yyGetParser->SetCurrentCombine("");
  341. }
  342. |
  343. Name Dims
  344. {
  345. jpElementStart(2);
  346. jpStoreClass($<str>1);
  347. jpCheckEmpty(2);
  348. $<str>$ = 0;
  349. yyGetParser->SetCurrentCombine("");
  350. }
  351. Name:
  352. SimpleName
  353. {
  354. jpElementStart(1);
  355. $<str>$ = $<str>1;
  356. }
  357. |
  358. QualifiedName
  359. {
  360. jpElementStart(1);
  361. $<str>$ = $<str>1;
  362. }
  363. SimpleName:
  364. Identifier
  365. {
  366. jpElementStart(1);
  367. $<str>$ = $<str>1;
  368. }
  369. Identifier:
  370. jp_NAME
  371. {
  372. jpElementStart(1);
  373. $<str>$ = $<str>1;
  374. }
  375. |
  376. jp_DOLLAR jp_NAME
  377. {
  378. jpElementStart(2);
  379. $<str>$ = $<str>2;
  380. }
  381. QualifiedName:
  382. Name jp_DOT Identifier
  383. {
  384. jpElementStart(3);
  385. yyGetParser->AddClassFound($<str>1);
  386. yyGetParser->UpdateCombine($<str>1, $<str>3);
  387. yyGetParser->DeallocateParserType(&($<str>1));
  388. $<str>$ = const_cast<char*>(yyGetParser->GetCurrentCombine());
  389. }
  390. |
  391. Name jp_DOT jp_CLASS
  392. {
  393. jpElementStart(3);
  394. jpStoreClass($<str>1);
  395. jpCheckEmpty(3);
  396. yyGetParser->SetCurrentCombine("");
  397. $<str>$ = 0;
  398. yyGetParser->SetCurrentCombine("");
  399. }
  400. |
  401. Name jp_DOT jp_THIS
  402. {
  403. jpElementStart(3);
  404. jpStoreClass($<str>1);
  405. yyGetParser->SetCurrentCombine("");
  406. jpCheckEmpty(3);
  407. $<str>$ = 0;
  408. yyGetParser->SetCurrentCombine("");
  409. }
  410. |
  411. SimpleType jp_DOT jp_CLASS
  412. {
  413. jpElementStart(3);
  414. jpCheckEmpty(3);
  415. $<str>$ = 0;
  416. yyGetParser->SetCurrentCombine("");
  417. }
  418. SimpleType:
  419. PrimitiveType
  420. {
  421. jpElementStart(1);
  422. jpCheckEmpty(1);
  423. $<str>$ = 0;
  424. yyGetParser->SetCurrentCombine("");
  425. }
  426. |
  427. jp_VOID
  428. {
  429. jpElementStart(1);
  430. jpCheckEmpty(1);
  431. $<str>$ = 0;
  432. yyGetParser->SetCurrentCombine("");
  433. }
  434. CompilationUnit:
  435. PackageDeclarationopt ImportDeclarations TypeDeclarations
  436. {
  437. jpElementStart(3);
  438. jpCheckEmpty(3);
  439. $<str>$ = 0;
  440. yyGetParser->SetCurrentCombine("");
  441. }
  442. PackageDeclarationopt:
  443. {
  444. jpElementStart(0);
  445. $<str>$ = 0;
  446. yyGetParser->SetCurrentCombine("");
  447. }
  448. |
  449. PackageDeclaration
  450. {
  451. jpElementStart(1);
  452. jpCheckEmpty(1);
  453. $<str>$ = 0;
  454. yyGetParser->SetCurrentCombine("");
  455. }
  456. ImportDeclarations:
  457. {
  458. jpElementStart(0);
  459. $<str>$ = 0;
  460. yyGetParser->SetCurrentCombine("");
  461. }
  462. |
  463. ImportDeclarations ImportDeclaration
  464. {
  465. jpElementStart(2);
  466. jpCheckEmpty(2);
  467. $<str>$ = 0;
  468. yyGetParser->SetCurrentCombine("");
  469. }
  470. TypeDeclarations:
  471. {
  472. jpElementStart(0);
  473. $<str>$ = 0;
  474. yyGetParser->SetCurrentCombine("");
  475. }
  476. |
  477. TypeDeclarations TypeDeclaration
  478. {
  479. jpElementStart(2);
  480. jpCheckEmpty(2);
  481. $<str>$ = 0;
  482. yyGetParser->SetCurrentCombine("");
  483. }
  484. PackageDeclaration:
  485. jp_PACKAGE Name jp_SEMICOL
  486. {
  487. jpElementStart(3);
  488. yyGetParser->SetCurrentPackage($<str>2);
  489. yyGetParser->DeallocateParserType(&($<str>2));
  490. yyGetParser->SetCurrentCombine("");
  491. jpCheckEmpty(3);
  492. $<str>$ = 0;
  493. yyGetParser->SetCurrentCombine("");
  494. }
  495. ImportDeclaration:
  496. SingleTypeImportDeclaration
  497. {
  498. jpElementStart(1);
  499. jpCheckEmpty(1);
  500. $<str>$ = 0;
  501. yyGetParser->SetCurrentCombine("");
  502. }
  503. |
  504. TypeImportOnDemandDeclaration
  505. {
  506. jpElementStart(1);
  507. jpCheckEmpty(1);
  508. $<str>$ = 0;
  509. yyGetParser->SetCurrentCombine("");
  510. }
  511. SingleTypeImportDeclaration:
  512. jp_IMPORT Name jp_SEMICOL
  513. {
  514. jpElementStart(3);
  515. yyGetParser->AddPackagesImport($<str>2);
  516. yyGetParser->DeallocateParserType(&($<str>2));
  517. yyGetParser->SetCurrentCombine("");
  518. jpCheckEmpty(3);
  519. $<str>$ = 0;
  520. yyGetParser->SetCurrentCombine("");
  521. }
  522. TypeImportOnDemandDeclaration:
  523. jp_IMPORT Name jp_DOT jp_TIMES jp_SEMICOL
  524. {
  525. jpElementStart(5);
  526. std::string str = $<str>2;
  527. str += ".*";
  528. yyGetParser->AddPackagesImport(str.c_str());
  529. yyGetParser->DeallocateParserType(&($<str>2));
  530. yyGetParser->SetCurrentCombine("");
  531. $<str>$ = 0;
  532. yyGetParser->SetCurrentCombine("");
  533. }
  534. TypeDeclaration:
  535. ClassDeclaration
  536. {
  537. jpElementStart(1);
  538. jpCheckEmpty(1);
  539. $<str>$ = 0;
  540. yyGetParser->SetCurrentCombine("");
  541. }
  542. |
  543. InterfaceDeclaration
  544. {
  545. jpElementStart(1);
  546. jpCheckEmpty(1);
  547. $<str>$ = 0;
  548. yyGetParser->SetCurrentCombine("");
  549. }
  550. |
  551. jp_SEMICOL
  552. {
  553. jpElementStart(1);
  554. jpCheckEmpty(1);
  555. $<str>$ = 0;
  556. yyGetParser->SetCurrentCombine("");
  557. }
  558. Modifiers:
  559. Modifier
  560. {
  561. jpElementStart(1);
  562. jpCheckEmpty(1);
  563. $<str>$ = 0;
  564. yyGetParser->SetCurrentCombine("");
  565. }
  566. |
  567. Modifiers Modifier
  568. {
  569. jpElementStart(2);
  570. jpCheckEmpty(2);
  571. $<str>$ = 0;
  572. yyGetParser->SetCurrentCombine("");
  573. }
  574. Modifier:
  575. jp_PUBLIC | jp_PROTECTED | jp_PRIVATE |
  576. jp_STATIC |
  577. jp_ABSTRACT | jp_FINAL | jp_NATIVE | jp_SYNCHRONIZED | jp_TRANSIENT | jp_VOLATILE |
  578. jp_STRICTFP
  579. ClassHeader:
  580. Modifiersopt jp_CLASS Identifier
  581. {
  582. yyGetParser->StartClass($<str>3);
  583. jpElementStart(3);
  584. yyGetParser->DeallocateParserType(&($<str>3));
  585. jpCheckEmpty(3);
  586. }
  587. ClassDeclaration:
  588. ClassHeader ClassBody
  589. {
  590. jpElementStart(2);
  591. jpCheckEmpty(2);
  592. $<str>$ = 0;
  593. yyGetParser->SetCurrentCombine("");
  594. yyGetParser->EndClass();
  595. }
  596. |
  597. ClassHeader Interfaces ClassBody
  598. {
  599. jpElementStart(3);
  600. jpCheckEmpty(2);
  601. $<str>$ = 0;
  602. yyGetParser->SetCurrentCombine("");
  603. yyGetParser->EndClass();
  604. }
  605. |
  606. ClassHeader Super ClassBody
  607. {
  608. jpElementStart(3);
  609. jpCheckEmpty(3);
  610. $<str>$ = 0;
  611. yyGetParser->SetCurrentCombine("");
  612. yyGetParser->EndClass();
  613. }
  614. |
  615. ClassHeader Super Interfaces ClassBody
  616. {
  617. jpElementStart(4);
  618. jpCheckEmpty(4);
  619. $<str>$ = 0;
  620. yyGetParser->SetCurrentCombine("");
  621. yyGetParser->EndClass();
  622. }
  623. Modifiersopt:
  624. {
  625. jpElementStart(0);
  626. $<str>$ = 0;
  627. yyGetParser->SetCurrentCombine("");
  628. }
  629. |
  630. Modifiers
  631. {
  632. jpElementStart(1);
  633. jpCheckEmpty(1);
  634. $<str>$ = 0;
  635. yyGetParser->SetCurrentCombine("");
  636. }
  637. Super:
  638. jp_EXTENDS ClassType
  639. {
  640. jpElementStart(2);
  641. jpCheckEmpty(2);
  642. $<str>$ = 0;
  643. yyGetParser->SetCurrentCombine("");
  644. }
  645. Interfaces:
  646. jp_IMPLEMENTS InterfaceTypeList
  647. {
  648. jpElementStart(2);
  649. jpCheckEmpty(2);
  650. $<str>$ = 0;
  651. yyGetParser->SetCurrentCombine("");
  652. }
  653. InterfaceTypeList:
  654. InterfaceType
  655. {
  656. jpElementStart(1);
  657. jpCheckEmpty(1);
  658. $<str>$ = 0;
  659. yyGetParser->SetCurrentCombine("");
  660. }
  661. |
  662. InterfaceTypeList jp_COMMA InterfaceType
  663. {
  664. jpElementStart(3);
  665. jpCheckEmpty(3);
  666. $<str>$ = 0;
  667. yyGetParser->SetCurrentCombine("");
  668. }
  669. ClassBody:
  670. jp_CURLYSTART ClassBodyDeclarations jp_CURLYEND
  671. {
  672. jpElementStart(3);
  673. jpCheckEmpty(3);
  674. $<str>$ = 0;
  675. yyGetParser->SetCurrentCombine("");
  676. }
  677. ClassBodyDeclarations:
  678. {
  679. jpElementStart(1);
  680. $<str>$ = 0;
  681. yyGetParser->SetCurrentCombine("");
  682. }
  683. |
  684. ClassBodyDeclarations ClassBodyDeclaration
  685. {
  686. jpElementStart(2);
  687. jpCheckEmpty(2);
  688. $<str>$ = 0;
  689. yyGetParser->SetCurrentCombine("");
  690. }
  691. ClassBodyDeclaration:
  692. ClassMemberDeclaration
  693. {
  694. jpElementStart(1);
  695. jpCheckEmpty(1);
  696. $<str>$ = 0;
  697. yyGetParser->SetCurrentCombine("");
  698. }
  699. |
  700. StaticInitializer
  701. {
  702. jpElementStart(1);
  703. jpCheckEmpty(1);
  704. $<str>$ = 0;
  705. yyGetParser->SetCurrentCombine("");
  706. }
  707. |
  708. ConstructorDeclaration
  709. {
  710. jpElementStart(1);
  711. jpCheckEmpty(1);
  712. $<str>$ = 0;
  713. yyGetParser->SetCurrentCombine("");
  714. }
  715. |
  716. TypeDeclaration
  717. {
  718. jpElementStart(1);
  719. jpCheckEmpty(1);
  720. $<str>$ = 0;
  721. yyGetParser->SetCurrentCombine("");
  722. }
  723. ClassMemberDeclaration:
  724. FieldDeclaration
  725. {
  726. jpElementStart(1);
  727. jpCheckEmpty(1);
  728. $<str>$ = 0;
  729. yyGetParser->SetCurrentCombine("");
  730. }
  731. |
  732. MethodDeclaration
  733. {
  734. jpElementStart(1);
  735. jpCheckEmpty(1);
  736. $<str>$ = 0;
  737. yyGetParser->SetCurrentCombine("");
  738. }
  739. FieldDeclaration:
  740. Modifiersopt Type VariableDeclarators jp_SEMICOL
  741. {
  742. jpElementStart(4);
  743. }
  744. VariableDeclarators:
  745. VariableDeclarator
  746. {
  747. jpElementStart(1);
  748. jpCheckEmpty(1);
  749. $<str>$ = 0;
  750. yyGetParser->SetCurrentCombine("");
  751. }
  752. |
  753. VariableDeclarators jp_COMMA VariableDeclarator
  754. {
  755. jpElementStart(3);
  756. jpCheckEmpty(3);
  757. $<str>$ = 0;
  758. yyGetParser->SetCurrentCombine("");
  759. }
  760. VariableDeclarator:
  761. VariableDeclaratorId
  762. {
  763. jpElementStart(1);
  764. jpCheckEmpty(1);
  765. $<str>$ = 0;
  766. yyGetParser->SetCurrentCombine("");
  767. }
  768. |
  769. VariableDeclaratorId jp_EQUALS VariableInitializer
  770. {
  771. jpElementStart(3);
  772. jpCheckEmpty(3);
  773. $<str>$ = 0;
  774. yyGetParser->SetCurrentCombine("");
  775. }
  776. VariableDeclaratorId:
  777. Identifier
  778. {
  779. jpElementStart(1);
  780. yyGetParser->DeallocateParserType(&($<str>1));
  781. jpCheckEmpty(1);
  782. $<str>$ = 0;
  783. yyGetParser->SetCurrentCombine("");
  784. }
  785. |
  786. VariableDeclaratorId jp_BRACKETSTART jp_BRACKETEND
  787. {
  788. jpElementStart(1);
  789. jpCheckEmpty(1);
  790. $<str>$ = 0;
  791. yyGetParser->SetCurrentCombine("");
  792. }
  793. VariableInitializer:
  794. Expression
  795. {
  796. jpElementStart(1);
  797. jpCheckEmpty(1);
  798. $<str>$ = 0;
  799. yyGetParser->SetCurrentCombine("");
  800. }
  801. |
  802. ArrayInitializer
  803. {
  804. jpElementStart(1);
  805. jpCheckEmpty(1);
  806. $<str>$ = 0;
  807. yyGetParser->SetCurrentCombine("");
  808. }
  809. MethodDeclaration:
  810. MethodHeader jp_SEMICOL
  811. {
  812. jpElementStart(2);
  813. jpCheckEmpty(2);
  814. $<str>$ = 0;
  815. yyGetParser->SetCurrentCombine("");
  816. }
  817. |
  818. MethodHeader MethodBody
  819. {
  820. jpElementStart(2);
  821. jpCheckEmpty(2);
  822. $<str>$ = 0;
  823. yyGetParser->SetCurrentCombine("");
  824. }
  825. |
  826. MethodHeader MethodBody jp_SEMICOL
  827. {
  828. jpElementStart(3);
  829. jpCheckEmpty(3);
  830. $<str>$ = 0;
  831. yyGetParser->SetCurrentCombine("");
  832. }
  833. MethodHeader:
  834. Modifiersopt Type MethodDeclarator Throwsopt
  835. {
  836. jpElementStart(4);
  837. jpCheckEmpty(4);
  838. $<str>$ = 0;
  839. yyGetParser->SetCurrentCombine("");
  840. }
  841. |
  842. Modifiersopt jp_VOID MethodDeclarator Throwsopt
  843. {
  844. jpElementStart(4);
  845. jpCheckEmpty(4);
  846. $<str>$ = 0;
  847. yyGetParser->SetCurrentCombine("");
  848. }
  849. Throwsopt:
  850. {
  851. jpElementStart(0);
  852. $<str>$ = 0;
  853. yyGetParser->SetCurrentCombine("");
  854. }
  855. |
  856. Throws
  857. {
  858. jpElementStart(1);
  859. jpCheckEmpty(1);
  860. $<str>$ = 0;
  861. yyGetParser->SetCurrentCombine("");
  862. }
  863. MethodDeclarator:
  864. Identifier jp_PARESTART FormalParameterListopt jp_PAREEND
  865. {
  866. jpElementStart(4);
  867. yyGetParser->DeallocateParserType(&($<str>1));
  868. jpCheckEmpty(4);
  869. $<str>$ = 0;
  870. yyGetParser->SetCurrentCombine("");
  871. }
  872. |
  873. MethodDeclarator jp_BRACKETSTART jp_BRACKETEND
  874. {
  875. jpElementStart(3);
  876. }
  877. FormalParameterListopt:
  878. {
  879. jpElementStart(0);
  880. $<str>$ = 0;
  881. yyGetParser->SetCurrentCombine("");
  882. }
  883. |
  884. FormalParameterList
  885. FormalParameterList:
  886. FormalParameter
  887. {
  888. jpElementStart(1);
  889. }
  890. |
  891. FormalParameterList jp_COMMA FormalParameter
  892. {
  893. jpElementStart(3);
  894. jpCheckEmpty(3);
  895. $<str>$ = 0;
  896. yyGetParser->SetCurrentCombine("");
  897. }
  898. FormalParameter:
  899. Modifiersopt Type VariableDeclaratorId
  900. {
  901. jpElementStart(3);
  902. jpCheckEmpty(3);
  903. $<str>$ = 0;
  904. yyGetParser->SetCurrentCombine("");
  905. }
  906. Throws:
  907. jp_THROWS ClassTypeList
  908. {
  909. jpElementStart(2);
  910. jpCheckEmpty(2);
  911. $<str>$ = 0;
  912. yyGetParser->SetCurrentCombine("");
  913. }
  914. ClassTypeList:
  915. ClassType
  916. {
  917. jpElementStart(1);
  918. }
  919. |
  920. ClassTypeList jp_COMMA ClassType
  921. {
  922. jpElementStart(3);
  923. jpCheckEmpty(3);
  924. $<str>$ = 0;
  925. yyGetParser->SetCurrentCombine("");
  926. }
  927. MethodBody:
  928. Block
  929. {
  930. jpElementStart(1);
  931. jpCheckEmpty(1);
  932. $<str>$ = 0;
  933. yyGetParser->SetCurrentCombine("");
  934. }
  935. StaticInitializer:
  936. jp_STATIC Block
  937. {
  938. jpElementStart(2);
  939. jpCheckEmpty(2);
  940. $<str>$ = 0;
  941. yyGetParser->SetCurrentCombine("");
  942. }
  943. ConstructorDeclaration:
  944. Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody
  945. {
  946. jpElementStart(4);
  947. jpCheckEmpty(4);
  948. $<str>$ = 0;
  949. yyGetParser->SetCurrentCombine("");
  950. }
  951. |
  952. Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody jp_SEMICOL
  953. {
  954. jpElementStart(5);
  955. jpCheckEmpty(5);
  956. $<str>$ = 0;
  957. yyGetParser->SetCurrentCombine("");
  958. }
  959. ConstructorDeclarator:
  960. SimpleName jp_PARESTART FormalParameterListopt jp_PAREEND
  961. {
  962. jpElementStart(4);
  963. yyGetParser->DeallocateParserType(&($<str>1));
  964. jpCheckEmpty(4);
  965. $<str>$ = 0;
  966. yyGetParser->SetCurrentCombine("");
  967. }
  968. ConstructorBody:
  969. jp_CURLYSTART ExplicitConstructorInvocationopt BlockStatementsopt jp_CURLYEND
  970. {
  971. jpElementStart(4);
  972. jpCheckEmpty(4);
  973. $<str>$ = 0;
  974. yyGetParser->SetCurrentCombine("");
  975. }
  976. ExplicitConstructorInvocationopt:
  977. {
  978. jpElementStart(0);
  979. $<str>$ = 0;
  980. yyGetParser->SetCurrentCombine("");
  981. }
  982. |
  983. ExplicitConstructorInvocationopt ExplicitConstructorInvocation
  984. {
  985. jpElementStart(2);
  986. jpCheckEmpty(2);
  987. $<str>$ = 0;
  988. yyGetParser->SetCurrentCombine("");
  989. }
  990. ExplicitConstructorInvocation:
  991. jp_THIS jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL
  992. {
  993. jpElementStart(5);
  994. jpCheckEmpty(5);
  995. $<str>$ = 0;
  996. yyGetParser->SetCurrentCombine("");
  997. }
  998. |
  999. jp_SUPER jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL
  1000. {
  1001. jpElementStart(5);
  1002. jpCheckEmpty(5);
  1003. $<str>$ = 0;
  1004. yyGetParser->SetCurrentCombine("");
  1005. }
  1006. InterfaceHeader:
  1007. Modifiersopt jp_INTERFACE Identifier
  1008. {
  1009. yyGetParser->StartClass($<str>3);
  1010. jpElementStart(3);
  1011. yyGetParser->DeallocateParserType(&($<str>3));
  1012. jpCheckEmpty(3);
  1013. }
  1014. InterfaceDeclaration:
  1015. InterfaceHeader ExtendsInterfacesopt InterfaceBody
  1016. {
  1017. jpElementStart(2);
  1018. jpCheckEmpty(2);
  1019. $<str>$ = 0;
  1020. yyGetParser->SetCurrentCombine("");
  1021. yyGetParser->EndClass();
  1022. }
  1023. ExtendsInterfacesopt:
  1024. {
  1025. jpElementStart(0);
  1026. $<str>$ = 0;
  1027. yyGetParser->SetCurrentCombine("");
  1028. }
  1029. |
  1030. ExtendsInterfaces
  1031. {
  1032. jpElementStart(1);
  1033. jpCheckEmpty(1);
  1034. $<str>$ = 0;
  1035. yyGetParser->SetCurrentCombine("");
  1036. }
  1037. ExtendsInterfaces:
  1038. jp_EXTENDS InterfaceType
  1039. {
  1040. jpElementStart(2);
  1041. jpCheckEmpty(2);
  1042. $<str>$ = 0;
  1043. yyGetParser->SetCurrentCombine("");
  1044. }
  1045. |
  1046. ExtendsInterfaces jp_COMMA InterfaceType
  1047. {
  1048. jpElementStart(3);
  1049. jpCheckEmpty(3);
  1050. $<str>$ = 0;
  1051. yyGetParser->SetCurrentCombine("");
  1052. }
  1053. InterfaceBody:
  1054. jp_CURLYSTART InterfaceMemberDeclarations jp_CURLYEND
  1055. {
  1056. jpElementStart(3);
  1057. jpCheckEmpty(3);
  1058. $<str>$ = 0;
  1059. yyGetParser->SetCurrentCombine("");
  1060. }
  1061. InterfaceMemberDeclarations:
  1062. {
  1063. jpElementStart(0);
  1064. $<str>$ = 0;
  1065. yyGetParser->SetCurrentCombine("");
  1066. }
  1067. |
  1068. InterfaceMemberDeclarations InterfaceMemberDeclaration
  1069. {
  1070. jpElementStart(2);
  1071. $<str>$ = 0;
  1072. yyGetParser->SetCurrentCombine("");
  1073. }
  1074. InterfaceMemberDeclaration:
  1075. ConstantDeclaration
  1076. {
  1077. jpElementStart(1);
  1078. jpCheckEmpty(1);
  1079. $<str>$ = 0;
  1080. yyGetParser->SetCurrentCombine("");
  1081. }
  1082. |
  1083. AbstractMethodDeclaration
  1084. {
  1085. jpElementStart(1);
  1086. jpCheckEmpty(1);
  1087. $<str>$ = 0;
  1088. yyGetParser->SetCurrentCombine("");
  1089. }
  1090. |
  1091. ClassDeclaration
  1092. {
  1093. jpElementStart(1);
  1094. jpCheckEmpty(1);
  1095. $<str>$ = 0;
  1096. yyGetParser->SetCurrentCombine("");
  1097. }
  1098. |
  1099. ClassDeclaration jp_SEMICOL
  1100. {
  1101. jpElementStart(2);
  1102. $<str>$ = 0;
  1103. yyGetParser->SetCurrentCombine("");
  1104. }
  1105. |
  1106. InterfaceDeclaration
  1107. {
  1108. jpElementStart(1);
  1109. jpCheckEmpty(1);
  1110. $<str>$ = 0;
  1111. yyGetParser->SetCurrentCombine("");
  1112. }
  1113. |
  1114. InterfaceDeclaration jp_SEMICOL
  1115. {
  1116. jpElementStart(2);
  1117. $<str>$ = 0;
  1118. yyGetParser->SetCurrentCombine("");
  1119. }
  1120. ConstantDeclaration:
  1121. FieldDeclaration
  1122. {
  1123. jpElementStart(1);
  1124. jpCheckEmpty(1);
  1125. $<str>$ = 0;
  1126. yyGetParser->SetCurrentCombine("");
  1127. }
  1128. AbstractMethodDeclaration:
  1129. MethodHeader Semicols
  1130. {
  1131. jpElementStart(2);
  1132. jpCheckEmpty(2);
  1133. $<str>$ = 0;
  1134. yyGetParser->SetCurrentCombine("");
  1135. }
  1136. Semicols:
  1137. jp_SEMICOL
  1138. {
  1139. jpElementStart(1);
  1140. jpCheckEmpty(1);
  1141. $<str>$ = 0;
  1142. yyGetParser->SetCurrentCombine("");
  1143. }
  1144. |
  1145. Semicols jp_SEMICOL
  1146. {
  1147. jpElementStart(2);
  1148. jpCheckEmpty(2);
  1149. $<str>$ = 0;
  1150. yyGetParser->SetCurrentCombine("");
  1151. }
  1152. ArrayInitializer:
  1153. jp_CURLYSTART VariableInitializersOptional jp_CURLYEND
  1154. {
  1155. jpElementStart(3);
  1156. jpCheckEmpty(3);
  1157. $<str>$ = 0;
  1158. yyGetParser->SetCurrentCombine("");
  1159. }
  1160. VariableInitializersOptional:
  1161. {
  1162. jpElementStart(1);
  1163. $<str>$ = 0;
  1164. yyGetParser->SetCurrentCombine("");
  1165. }
  1166. |
  1167. VariableInitializers
  1168. {
  1169. jpElementStart(1);
  1170. jpCheckEmpty(1);
  1171. $<str>$ = 0;
  1172. yyGetParser->SetCurrentCombine("");
  1173. }
  1174. |
  1175. VariableInitializers jp_COMMA
  1176. {
  1177. jpElementStart(2);
  1178. jpCheckEmpty(2);
  1179. $<str>$ = 0;
  1180. yyGetParser->SetCurrentCombine("");
  1181. }
  1182. VariableInitializers:
  1183. VariableInitializer
  1184. {
  1185. jpElementStart(1);
  1186. jpCheckEmpty(1);
  1187. $<str>$ = 0;
  1188. yyGetParser->SetCurrentCombine("");
  1189. }
  1190. |
  1191. VariableInitializers jp_COMMA VariableInitializer
  1192. {
  1193. jpElementStart(3);
  1194. jpCheckEmpty(3);
  1195. $<str>$ = 0;
  1196. yyGetParser->SetCurrentCombine("");
  1197. }
  1198. Block:
  1199. jp_CURLYSTART BlockStatementsopt jp_CURLYEND
  1200. {
  1201. jpElementStart(4);
  1202. $<str>$ = 0;
  1203. yyGetParser->SetCurrentCombine("");
  1204. }
  1205. BlockStatementsopt:
  1206. {
  1207. jpElementStart(1);
  1208. $<str>$ = 0;
  1209. yyGetParser->SetCurrentCombine("");
  1210. }
  1211. |
  1212. BlockStatements
  1213. {
  1214. jpElementStart(1);
  1215. jpCheckEmpty(1);
  1216. $<str>$ = 0;
  1217. yyGetParser->SetCurrentCombine("");
  1218. }
  1219. BlockStatements:
  1220. BlockStatement
  1221. {
  1222. jpElementStart(1);
  1223. jpCheckEmpty(1);
  1224. $<str>$ = 0;
  1225. yyGetParser->SetCurrentCombine("");
  1226. }
  1227. |
  1228. BlockStatements BlockStatement
  1229. {
  1230. jpElementStart(1);
  1231. jpCheckEmpty(2);
  1232. $<str>$ = 0;
  1233. yyGetParser->SetCurrentCombine("");
  1234. }
  1235. BlockStatement:
  1236. LocalVariableDeclarationStatement
  1237. {
  1238. jpElementStart(1);
  1239. jpCheckEmpty(1);
  1240. $<str>$ = 0;
  1241. yyGetParser->SetCurrentCombine("");
  1242. }
  1243. |
  1244. Statement
  1245. {
  1246. jpElementStart(1);
  1247. jpCheckEmpty(1);
  1248. $<str>$ = 0;
  1249. yyGetParser->SetCurrentCombine("");
  1250. }
  1251. |
  1252. ClassDeclaration
  1253. {
  1254. jpElementStart(1);
  1255. jpCheckEmpty(1);
  1256. $<str>$ = 0;
  1257. yyGetParser->SetCurrentCombine("");
  1258. }
  1259. LocalVariableDeclarationStatement:
  1260. LocalVariableDeclaration jp_SEMICOL
  1261. {
  1262. jpElementStart(1);
  1263. jpCheckEmpty(2);
  1264. $<str>$ = 0;
  1265. yyGetParser->SetCurrentCombine("");
  1266. }
  1267. LocalVariableDeclaration:
  1268. Modifiers Type VariableDeclarators
  1269. {
  1270. jpElementStart(1);
  1271. jpCheckEmpty(3);
  1272. $<str>$ = 0;
  1273. yyGetParser->SetCurrentCombine("");
  1274. }
  1275. |
  1276. Type VariableDeclarators
  1277. {
  1278. jpElementStart(1);
  1279. jpCheckEmpty(2);
  1280. $<str>$ = 0;
  1281. yyGetParser->SetCurrentCombine("");
  1282. }
  1283. Statement:
  1284. StatementWithoutTrailingSubstatement
  1285. {
  1286. jpElementStart(1);
  1287. jpCheckEmpty(1);
  1288. $<str>$ = 0;
  1289. yyGetParser->SetCurrentCombine("");
  1290. }
  1291. |
  1292. LabeledStatement
  1293. {
  1294. jpElementStart(1);
  1295. jpCheckEmpty(1);
  1296. $<str>$ = 0;
  1297. yyGetParser->SetCurrentCombine("");
  1298. }
  1299. |
  1300. IfThenStatement
  1301. {
  1302. jpElementStart(1);
  1303. jpCheckEmpty(1);
  1304. $<str>$ = 0;
  1305. yyGetParser->SetCurrentCombine("");
  1306. }
  1307. |
  1308. IfThenElseStatement
  1309. {
  1310. jpElementStart(1);
  1311. jpCheckEmpty(1);
  1312. $<str>$ = 0;
  1313. yyGetParser->SetCurrentCombine("");
  1314. }
  1315. |
  1316. WhileStatement
  1317. {
  1318. jpElementStart(1);
  1319. jpCheckEmpty(1);
  1320. $<str>$ = 0;
  1321. yyGetParser->SetCurrentCombine("");
  1322. }
  1323. |
  1324. ForStatement
  1325. {
  1326. jpElementStart(1);
  1327. jpCheckEmpty(1);
  1328. $<str>$ = 0;
  1329. yyGetParser->SetCurrentCombine("");
  1330. }
  1331. StatementNoShortIf:
  1332. StatementWithoutTrailingSubstatement
  1333. {
  1334. jpElementStart(1);
  1335. jpCheckEmpty(1);
  1336. $<str>$ = 0;
  1337. yyGetParser->SetCurrentCombine("");
  1338. }
  1339. |
  1340. LabeledStatementNoShortIf
  1341. {
  1342. jpElementStart(1);
  1343. jpCheckEmpty(1);
  1344. $<str>$ = 0;
  1345. yyGetParser->SetCurrentCombine("");
  1346. }
  1347. |
  1348. IfThenElseStatementNoShortIf
  1349. {
  1350. jpElementStart(1);
  1351. jpCheckEmpty(1);
  1352. $<str>$ = 0;
  1353. yyGetParser->SetCurrentCombine("");
  1354. }
  1355. |
  1356. WhileStatementNoShortIf
  1357. {
  1358. jpElementStart(1);
  1359. jpCheckEmpty(1);
  1360. $<str>$ = 0;
  1361. yyGetParser->SetCurrentCombine("");
  1362. }
  1363. |
  1364. ForStatementNoShortIf
  1365. {
  1366. jpElementStart(1);
  1367. jpCheckEmpty(1);
  1368. $<str>$ = 0;
  1369. yyGetParser->SetCurrentCombine("");
  1370. }
  1371. StatementWithoutTrailingSubstatement:
  1372. Block
  1373. {
  1374. jpElementStart(1);
  1375. jpCheckEmpty(1);
  1376. $<str>$ = 0;
  1377. yyGetParser->SetCurrentCombine("");
  1378. }
  1379. |
  1380. EmptyStatement
  1381. {
  1382. jpElementStart(1);
  1383. jpCheckEmpty(1);
  1384. $<str>$ = 0;
  1385. yyGetParser->SetCurrentCombine("");
  1386. }
  1387. |
  1388. ExpressionStatement
  1389. {
  1390. jpElementStart(1);
  1391. jpCheckEmpty(1);
  1392. $<str>$ = 0;
  1393. yyGetParser->SetCurrentCombine("");
  1394. }
  1395. |
  1396. SwitchStatement
  1397. {
  1398. jpElementStart(1);
  1399. jpCheckEmpty(1);
  1400. $<str>$ = 0;
  1401. yyGetParser->SetCurrentCombine("");
  1402. }
  1403. |
  1404. DoStatement
  1405. {
  1406. jpElementStart(1);
  1407. jpCheckEmpty(1);
  1408. $<str>$ = 0;
  1409. yyGetParser->SetCurrentCombine("");
  1410. }
  1411. |
  1412. BreakStatement
  1413. {
  1414. jpElementStart(1);
  1415. jpCheckEmpty(1);
  1416. $<str>$ = 0;
  1417. yyGetParser->SetCurrentCombine("");
  1418. }
  1419. |
  1420. ContinueStatement
  1421. {
  1422. jpElementStart(1);
  1423. jpCheckEmpty(1);
  1424. $<str>$ = 0;
  1425. yyGetParser->SetCurrentCombine("");
  1426. }
  1427. |
  1428. ReturnStatement
  1429. {
  1430. jpElementStart(1);
  1431. jpCheckEmpty(1);
  1432. $<str>$ = 0;
  1433. yyGetParser->SetCurrentCombine("");
  1434. }
  1435. |
  1436. SynchronizedStatement
  1437. {
  1438. jpElementStart(1);
  1439. jpCheckEmpty(1);
  1440. $<str>$ = 0;
  1441. yyGetParser->SetCurrentCombine("");
  1442. }
  1443. |
  1444. ThrowStatement
  1445. {
  1446. jpElementStart(1);
  1447. jpCheckEmpty(1);
  1448. $<str>$ = 0;
  1449. yyGetParser->SetCurrentCombine("");
  1450. }
  1451. |
  1452. TryStatement
  1453. {
  1454. jpElementStart(1);
  1455. jpCheckEmpty(1);
  1456. $<str>$ = 0;
  1457. yyGetParser->SetCurrentCombine("");
  1458. }
  1459. |
  1460. AssertStatement
  1461. {
  1462. jpElementStart(1);
  1463. jpCheckEmpty(1);
  1464. $<str>$ = 0;
  1465. yyGetParser->SetCurrentCombine("");
  1466. }
  1467. EmptyStatement:
  1468. jp_SEMICOL
  1469. {
  1470. jpElementStart(1);
  1471. jpCheckEmpty(1);
  1472. $<str>$ = 0;
  1473. yyGetParser->SetCurrentCombine("");
  1474. }
  1475. LabeledStatement:
  1476. Identifier jp_COLON Statement
  1477. {
  1478. jpElementStart(3);
  1479. yyGetParser->DeallocateParserType(&($<str>1));
  1480. jpCheckEmpty(3);
  1481. $<str>$ = 0;
  1482. yyGetParser->SetCurrentCombine("");
  1483. }
  1484. LabeledStatementNoShortIf:
  1485. Identifier jp_COLON StatementNoShortIf
  1486. {
  1487. jpElementStart(3);
  1488. jpCheckEmpty(3);
  1489. $<str>$ = 0;
  1490. yyGetParser->SetCurrentCombine("");
  1491. }
  1492. ExpressionStatement:
  1493. StatementExpression jp_SEMICOL
  1494. {
  1495. jpElementStart(2);
  1496. jpCheckEmpty(2);
  1497. $<str>$ = 0;
  1498. yyGetParser->SetCurrentCombine("");
  1499. }
  1500. StatementExpression:
  1501. Assignment
  1502. {
  1503. jpElementStart(1);
  1504. jpCheckEmpty(1);
  1505. $<str>$ = 0;
  1506. yyGetParser->SetCurrentCombine("");
  1507. }
  1508. |
  1509. PreIncrementExpression
  1510. {
  1511. jpElementStart(1);
  1512. jpCheckEmpty(1);
  1513. $<str>$ = 0;
  1514. yyGetParser->SetCurrentCombine("");
  1515. }
  1516. |
  1517. PreDecrementExpression
  1518. {
  1519. jpElementStart(1);
  1520. jpCheckEmpty(1);
  1521. $<str>$ = 0;
  1522. yyGetParser->SetCurrentCombine("");
  1523. }
  1524. |
  1525. PostIncrementExpression
  1526. {
  1527. jpElementStart(1);
  1528. jpCheckEmpty(1);
  1529. $<str>$ = 0;
  1530. yyGetParser->SetCurrentCombine("");
  1531. }
  1532. |
  1533. PostDecrementExpression
  1534. {
  1535. jpElementStart(1);
  1536. jpCheckEmpty(1);
  1537. $<str>$ = 0;
  1538. yyGetParser->SetCurrentCombine("");
  1539. }
  1540. |
  1541. MethodInvocation
  1542. {
  1543. jpElementStart(1);
  1544. jpCheckEmpty(1);
  1545. $<str>$ = 0;
  1546. yyGetParser->SetCurrentCombine("");
  1547. }
  1548. |
  1549. ClassInstanceCreationExpression
  1550. {
  1551. jpElementStart(1);
  1552. jpCheckEmpty(1);
  1553. $<str>$ = 0;
  1554. yyGetParser->SetCurrentCombine("");
  1555. }
  1556. IfThenStatement:
  1557. jp_IF jp_PARESTART Expression jp_PAREEND Statement
  1558. {
  1559. jpElementStart(5);
  1560. jpCheckEmpty(5);
  1561. $<str>$ = 0;
  1562. yyGetParser->SetCurrentCombine("");
  1563. }
  1564. IfThenElseStatement:
  1565. jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE Statement
  1566. {
  1567. jpElementStart(7);
  1568. jpCheckEmpty(7);
  1569. $<str>$ = 0;
  1570. yyGetParser->SetCurrentCombine("");
  1571. }
  1572. IfThenElseStatementNoShortIf:
  1573. jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE StatementNoShortIf
  1574. {
  1575. jpElementStart(7);
  1576. jpCheckEmpty(7);
  1577. $<str>$ = 0;
  1578. yyGetParser->SetCurrentCombine("");
  1579. }
  1580. SwitchStatement:
  1581. jp_SWITCH jp_PARESTART Expression jp_PAREEND SwitchBlock
  1582. {
  1583. jpElementStart(5);
  1584. }
  1585. SwitchBlock:
  1586. jp_CURLYSTART SwitchBlockStatementGroups SwitchLabelsopt jp_CURLYEND
  1587. {
  1588. jpElementStart(4);
  1589. }
  1590. SwitchLabelsopt:
  1591. {
  1592. jpElementStart(0);
  1593. $<str>$ = 0;
  1594. yyGetParser->SetCurrentCombine("");
  1595. }
  1596. |
  1597. SwitchLabels
  1598. {
  1599. jpElementStart(1);
  1600. jpCheckEmpty(1);
  1601. $<str>$ = 0;
  1602. yyGetParser->SetCurrentCombine("");
  1603. }
  1604. SwitchBlockStatementGroups:
  1605. {
  1606. jpElementStart(0);
  1607. $<str>$ = 0;
  1608. yyGetParser->SetCurrentCombine("");
  1609. }
  1610. |
  1611. SwitchBlockStatementGroups SwitchBlockStatementGroup
  1612. {
  1613. jpElementStart(2);
  1614. jpCheckEmpty(2);
  1615. $<str>$ = 0;
  1616. yyGetParser->SetCurrentCombine("");
  1617. }
  1618. SwitchBlockStatementGroup:
  1619. SwitchLabels BlockStatements
  1620. {
  1621. jpElementStart(2);
  1622. jpCheckEmpty(2);
  1623. $<str>$ = 0;
  1624. yyGetParser->SetCurrentCombine("");
  1625. }
  1626. SwitchLabels:
  1627. SwitchLabel
  1628. {
  1629. jpElementStart(1);
  1630. jpCheckEmpty(1);
  1631. $<str>$ = 0;
  1632. yyGetParser->SetCurrentCombine("");
  1633. }
  1634. |
  1635. SwitchLabels SwitchLabel
  1636. {
  1637. jpElementStart(2);
  1638. jpCheckEmpty(2);
  1639. $<str>$ = 0;
  1640. yyGetParser->SetCurrentCombine("");
  1641. }
  1642. SwitchLabel:
  1643. jp_CASE ConstantExpression jp_COLON
  1644. {
  1645. jpElementStart(3);
  1646. jpCheckEmpty(3);
  1647. $<str>$ = 0;
  1648. yyGetParser->SetCurrentCombine("");
  1649. }
  1650. |
  1651. jp_DEFAULT jp_COLON
  1652. {
  1653. jpElementStart(2);
  1654. jpCheckEmpty(2);
  1655. $<str>$ = 0;
  1656. yyGetParser->SetCurrentCombine("");
  1657. }
  1658. WhileStatement:
  1659. jp_WHILE jp_PARESTART Expression jp_PAREEND Statement
  1660. {
  1661. jpElementStart(5);
  1662. }
  1663. WhileStatementNoShortIf:
  1664. jp_WHILE jp_PARESTART Expression jp_PAREEND StatementNoShortIf
  1665. {
  1666. jpElementStart(5);
  1667. }
  1668. DoStatement:
  1669. jp_DO Statement jp_WHILE jp_PARESTART Expression jp_PAREEND jp_SEMICOL
  1670. {
  1671. jpElementStart(7);
  1672. }
  1673. ForStatement:
  1674. jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND
  1675. Statement
  1676. {
  1677. jpElementStart(9);
  1678. }
  1679. ForUpdateopt:
  1680. {
  1681. jpElementStart(1);
  1682. $<str>$ = 0;
  1683. yyGetParser->SetCurrentCombine("");
  1684. }
  1685. |
  1686. ForUpdate
  1687. {
  1688. jpElementStart(1);
  1689. jpCheckEmpty(1);
  1690. $<str>$ = 0;
  1691. yyGetParser->SetCurrentCombine("");
  1692. }
  1693. ForInitopt:
  1694. {
  1695. jpElementStart(0);
  1696. $<str>$ = 0;
  1697. yyGetParser->SetCurrentCombine("");
  1698. }
  1699. |
  1700. ForInit
  1701. {
  1702. jpElementStart(1);
  1703. jpCheckEmpty(1);
  1704. $<str>$ = 0;
  1705. yyGetParser->SetCurrentCombine("");
  1706. }
  1707. ForStatementNoShortIf:
  1708. jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND
  1709. StatementNoShortIf
  1710. {
  1711. jpElementStart(9);
  1712. $<str>$ = 0;
  1713. yyGetParser->SetCurrentCombine("");
  1714. }
  1715. Expressionopt:
  1716. {
  1717. jpElementStart(0);
  1718. $<str>$ = 0;
  1719. yyGetParser->SetCurrentCombine("");
  1720. }
  1721. |
  1722. Expression
  1723. {
  1724. jpElementStart(1);
  1725. jpCheckEmpty(1);
  1726. $<str>$ = 0;
  1727. yyGetParser->SetCurrentCombine("");
  1728. }
  1729. ForInit:
  1730. StatementExpressionList
  1731. {
  1732. jpElementStart(1);
  1733. jpCheckEmpty(1);
  1734. $<str>$ = 0;
  1735. yyGetParser->SetCurrentCombine("");
  1736. }
  1737. |
  1738. LocalVariableDeclaration
  1739. {
  1740. jpElementStart(1);
  1741. jpCheckEmpty(1);
  1742. $<str>$ = 0;
  1743. yyGetParser->SetCurrentCombine("");
  1744. }
  1745. ForUpdate:
  1746. StatementExpressionList
  1747. {
  1748. jpElementStart(1);
  1749. jpCheckEmpty(1);
  1750. $<str>$ = 0;
  1751. yyGetParser->SetCurrentCombine("");
  1752. }
  1753. StatementExpressionList:
  1754. StatementExpression
  1755. {
  1756. jpElementStart(1);
  1757. jpCheckEmpty(1);
  1758. $<str>$ = 0;
  1759. yyGetParser->SetCurrentCombine("");
  1760. }
  1761. |
  1762. StatementExpressionList jp_COMMA StatementExpression
  1763. {
  1764. jpElementStart(3);
  1765. jpCheckEmpty(3);
  1766. $<str>$ = 0;
  1767. yyGetParser->SetCurrentCombine("");
  1768. }
  1769. AssertStatement:
  1770. jp_ASSERT Expression jp_SEMICOL
  1771. {
  1772. jpElementStart(3);
  1773. jpCheckEmpty(3);
  1774. $<str>$ = 0;
  1775. yyGetParser->SetCurrentCombine("");
  1776. }
  1777. |
  1778. jp_ASSERT Expression jp_COLON Expression jp_SEMICOL
  1779. {
  1780. jpElementStart(5);
  1781. jpCheckEmpty(5);
  1782. $<str>$ = 0;
  1783. yyGetParser->SetCurrentCombine("");
  1784. }
  1785. BreakStatement:
  1786. jp_BREAK Identifieropt jp_SEMICOL
  1787. {
  1788. jpElementStart(3);
  1789. yyGetParser->DeallocateParserType(&($<str>2));
  1790. jpCheckEmpty(3);
  1791. $<str>$ = 0;
  1792. yyGetParser->SetCurrentCombine("");
  1793. }
  1794. Identifieropt:
  1795. {
  1796. jpElementStart(0);
  1797. $<str>$ = 0;
  1798. yyGetParser->SetCurrentCombine("");
  1799. }
  1800. |
  1801. Identifier
  1802. {
  1803. jpElementStart(1);
  1804. }
  1805. ContinueStatement:
  1806. jp_CONTINUE Identifieropt jp_SEMICOL
  1807. {
  1808. jpElementStart(3);
  1809. yyGetParser->DeallocateParserType(&($<str>2));
  1810. jpCheckEmpty(3);
  1811. $<str>$ = 0;
  1812. yyGetParser->SetCurrentCombine("");
  1813. }
  1814. ReturnStatement:
  1815. jp_RETURN Expressionopt jp_SEMICOL
  1816. {
  1817. jpElementStart(3);
  1818. jpCheckEmpty(3);
  1819. $<str>$ = 0;
  1820. yyGetParser->SetCurrentCombine("");
  1821. }
  1822. ThrowStatement:
  1823. jp_THROW Expression jp_SEMICOL
  1824. {
  1825. jpElementStart(3);
  1826. jpCheckEmpty(3);
  1827. $<str>$ = 0;
  1828. yyGetParser->SetCurrentCombine("");
  1829. }
  1830. SynchronizedStatement:
  1831. jp_SYNCHRONIZED jp_PARESTART Expression jp_PAREEND Block
  1832. {
  1833. jpElementStart(5);
  1834. jpCheckEmpty(5);
  1835. $<str>$ = 0;
  1836. yyGetParser->SetCurrentCombine("");
  1837. }
  1838. TryStatement:
  1839. jp_TRY Block Catches
  1840. {
  1841. jpElementStart(3);
  1842. jpCheckEmpty(3);
  1843. $<str>$ = 0;
  1844. yyGetParser->SetCurrentCombine("");
  1845. }
  1846. |
  1847. jp_TRY Block Catchesopt Finally
  1848. {
  1849. jpElementStart(4);
  1850. jpCheckEmpty(4);
  1851. $<str>$ = 0;
  1852. yyGetParser->SetCurrentCombine("");
  1853. }
  1854. Catchesopt:
  1855. {
  1856. jpElementStart(1);
  1857. $<str>$ = 0;
  1858. yyGetParser->SetCurrentCombine("");
  1859. }
  1860. |
  1861. Catches
  1862. {
  1863. jpElementStart(1);
  1864. jpCheckEmpty(1);
  1865. $<str>$ = 0;
  1866. yyGetParser->SetCurrentCombine("");
  1867. }
  1868. Catches:
  1869. CatchClause
  1870. {
  1871. jpElementStart(1);
  1872. jpCheckEmpty(1);
  1873. $<str>$ = 0;
  1874. yyGetParser->SetCurrentCombine("");
  1875. }
  1876. |
  1877. Catches CatchClause
  1878. {
  1879. jpElementStart(2);
  1880. jpCheckEmpty(2);
  1881. $<str>$ = 0;
  1882. yyGetParser->SetCurrentCombine("");
  1883. }
  1884. CatchClause:
  1885. jp_CATCH jp_PARESTART FormalParameter jp_PAREEND Block
  1886. {
  1887. jpElementStart(5);
  1888. }
  1889. Finally:
  1890. jp_FINALLY Block
  1891. {
  1892. jpElementStart(2);
  1893. jpCheckEmpty(2);
  1894. $<str>$ = 0;
  1895. yyGetParser->SetCurrentCombine("");
  1896. }
  1897. Primary:
  1898. PrimaryNoNewArray
  1899. {
  1900. jpElementStart(1);
  1901. jpCheckEmpty(1);
  1902. $<str>$ = 0;
  1903. yyGetParser->SetCurrentCombine("");
  1904. }
  1905. |
  1906. ArrayCreationExpression
  1907. {
  1908. jpElementStart(1);
  1909. jpCheckEmpty(1);
  1910. $<str>$ = 0;
  1911. yyGetParser->SetCurrentCombine("");
  1912. }
  1913. PrimaryNoNewArray:
  1914. Literal
  1915. {
  1916. jpElementStart(1);
  1917. jpCheckEmpty(1);
  1918. $<str>$ = 0;
  1919. yyGetParser->SetCurrentCombine("");
  1920. }
  1921. |
  1922. jp_THIS
  1923. {
  1924. jpElementStart(1);
  1925. }
  1926. |
  1927. jp_PARESTART Expression jp_PAREEND
  1928. {
  1929. jpElementStart(3);
  1930. jpCheckEmpty(3);
  1931. $<str>$ = 0;
  1932. yyGetParser->SetCurrentCombine("");
  1933. }
  1934. |
  1935. ClassInstanceCreationExpression
  1936. {
  1937. jpElementStart(1);
  1938. jpCheckEmpty(1);
  1939. $<str>$ = 0;
  1940. yyGetParser->SetCurrentCombine("");
  1941. }
  1942. |
  1943. FieldAccess
  1944. {
  1945. jpElementStart(1);
  1946. jpCheckEmpty(1);
  1947. $<str>$ = 0;
  1948. yyGetParser->SetCurrentCombine("");
  1949. }
  1950. |
  1951. MethodInvocation
  1952. {
  1953. jpElementStart(1);
  1954. jpCheckEmpty(1);
  1955. $<str>$ = 0;
  1956. yyGetParser->SetCurrentCombine("");
  1957. }
  1958. |
  1959. ArrayAccess
  1960. {
  1961. jpElementStart(1);
  1962. jpCheckEmpty(1);
  1963. $<str>$ = 0;
  1964. yyGetParser->SetCurrentCombine("");
  1965. }
  1966. ClassInstanceCreationExpression:
  1967. New ClassType jp_PARESTART ArgumentListopt jp_PAREEND ClassBodyOpt
  1968. {
  1969. jpElementStart(6);
  1970. jpCheckEmpty(6);
  1971. $<str>$ = 0;
  1972. yyGetParser->SetCurrentCombine("");
  1973. }
  1974. ClassBodyOpt:
  1975. {
  1976. jpElementStart(0);
  1977. $<str>$ = 0;
  1978. yyGetParser->SetCurrentCombine("");
  1979. }
  1980. |
  1981. ClassBody
  1982. {
  1983. jpElementStart(1);
  1984. jpCheckEmpty(1);
  1985. $<str>$ = 0;
  1986. yyGetParser->SetCurrentCombine("");
  1987. }
  1988. ArgumentListopt:
  1989. {
  1990. jpElementStart(0);
  1991. $<str>$ = 0;
  1992. yyGetParser->SetCurrentCombine("");
  1993. }
  1994. |
  1995. ArgumentList
  1996. {
  1997. jpElementStart(1);
  1998. jpCheckEmpty(1);
  1999. $<str>$ = 0;
  2000. yyGetParser->SetCurrentCombine("");
  2001. }
  2002. ArgumentList:
  2003. Expression
  2004. {
  2005. jpElementStart(1);
  2006. jpCheckEmpty(1);
  2007. $<str>$ = 0;
  2008. yyGetParser->SetCurrentCombine("");
  2009. }
  2010. |
  2011. ArgumentList jp_COMMA Expression
  2012. {
  2013. jpElementStart(3);
  2014. jpCheckEmpty(3);
  2015. $<str>$ = 0;
  2016. yyGetParser->SetCurrentCombine("");
  2017. }
  2018. ArrayCreationExpression:
  2019. New PrimitiveType DimExprs Dimsopt
  2020. {
  2021. jpElementStart(4);
  2022. jpCheckEmpty(4);
  2023. $<str>$ = 0;
  2024. yyGetParser->SetCurrentCombine("");
  2025. }
  2026. |
  2027. New ClassOrInterfaceType DimExprs Dimsopt
  2028. {
  2029. jpElementStart(4);
  2030. jpCheckEmpty(4);
  2031. $<str>$ = 0;
  2032. yyGetParser->SetCurrentCombine("");
  2033. }
  2034. |
  2035. New PrimitiveType Dims ArrayInitializer
  2036. {
  2037. jpElementStart(4);
  2038. jpCheckEmpty(4);
  2039. $<str>$ = 0;
  2040. yyGetParser->SetCurrentCombine("");
  2041. }
  2042. |
  2043. New ClassOrInterfaceType Dims ArrayInitializer
  2044. {
  2045. jpElementStart(4);
  2046. jpCheckEmpty(4);
  2047. $<str>$ = 0;
  2048. yyGetParser->SetCurrentCombine("");
  2049. }
  2050. Dimsopt:
  2051. {
  2052. jpElementStart(0);
  2053. $<str>$ = 0;
  2054. yyGetParser->SetCurrentCombine("");
  2055. }
  2056. |
  2057. Dims
  2058. {
  2059. jpElementStart(1);
  2060. jpCheckEmpty(1);
  2061. $<str>$ = 0;
  2062. yyGetParser->SetCurrentCombine("");
  2063. }
  2064. DimExprs:
  2065. DimExpr
  2066. {
  2067. jpElementStart(1);
  2068. jpCheckEmpty(1);
  2069. $<str>$ = 0;
  2070. yyGetParser->SetCurrentCombine("");
  2071. }
  2072. |
  2073. DimExprs DimExpr
  2074. {
  2075. jpElementStart(2);
  2076. jpCheckEmpty(2);
  2077. $<str>$ = 0;
  2078. yyGetParser->SetCurrentCombine("");
  2079. }
  2080. DimExpr:
  2081. jp_BRACKETSTART Expression jp_BRACKETEND
  2082. {
  2083. jpElementStart(3);
  2084. jpCheckEmpty(3);
  2085. $<str>$ = 0;
  2086. yyGetParser->SetCurrentCombine("");
  2087. }
  2088. Dims:
  2089. jp_BRACKETSTART jp_BRACKETEND
  2090. {
  2091. jpElementStart(2);
  2092. }
  2093. |
  2094. Dims jp_BRACKETSTART jp_BRACKETEND
  2095. {
  2096. jpElementStart(3);
  2097. }
  2098. FieldAccess:
  2099. Primary jp_DOT Identifier
  2100. {
  2101. jpElementStart(3);
  2102. yyGetParser->DeallocateParserType(&($<str>3));
  2103. jpCheckEmpty(3);
  2104. $<str>$ = 0;
  2105. yyGetParser->SetCurrentCombine("");
  2106. }
  2107. |
  2108. jp_SUPER jp_DOT Identifier
  2109. {
  2110. jpElementStart(3);
  2111. yyGetParser->DeallocateParserType(&($<str>3));
  2112. jpCheckEmpty(3);
  2113. $<str>$ = 0;
  2114. yyGetParser->SetCurrentCombine("");
  2115. }
  2116. |
  2117. jp_THIS jp_DOT Identifier
  2118. {
  2119. jpElementStart(3);
  2120. yyGetParser->DeallocateParserType(&($<str>3));
  2121. jpCheckEmpty(3);
  2122. $<str>$ = 0;
  2123. yyGetParser->SetCurrentCombine("");
  2124. }
  2125. |
  2126. Primary jp_DOT jp_THIS
  2127. {
  2128. jpElementStart(3);
  2129. yyGetParser->DeallocateParserType(&($<str>3));
  2130. jpCheckEmpty(3);
  2131. $<str>$ = 0;
  2132. yyGetParser->SetCurrentCombine("");
  2133. }
  2134. MethodInvocation:
  2135. Name jp_PARESTART ArgumentListopt jp_PAREEND
  2136. {
  2137. jpElementStart(4);
  2138. yyGetParser->DeallocateParserType(&($<str>1));
  2139. jpCheckEmpty(4);
  2140. $<str>$ = 0;
  2141. yyGetParser->SetCurrentCombine("");
  2142. }
  2143. |
  2144. Primary jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
  2145. {
  2146. jpElementStart(6);
  2147. yyGetParser->DeallocateParserType(&($<str>1));
  2148. yyGetParser->DeallocateParserType(&($<str>3));
  2149. jpCheckEmpty(6);
  2150. $<str>$ = 0;
  2151. yyGetParser->SetCurrentCombine("");
  2152. }
  2153. |
  2154. jp_SUPER jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
  2155. {
  2156. jpElementStart(6);
  2157. yyGetParser->DeallocateParserType(&($<str>3));
  2158. jpCheckEmpty(6);
  2159. $<str>$ = 0;
  2160. yyGetParser->SetCurrentCombine("");
  2161. }
  2162. |
  2163. jp_THIS jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
  2164. {
  2165. jpElementStart(6);
  2166. yyGetParser->DeallocateParserType(&($<str>3));
  2167. jpCheckEmpty(6);
  2168. $<str>$ = 0;
  2169. yyGetParser->SetCurrentCombine("");
  2170. }
  2171. ArrayAccess:
  2172. Name jp_BRACKETSTART Expression jp_BRACKETEND
  2173. {
  2174. jpElementStart(4);
  2175. yyGetParser->DeallocateParserType(&($<str>1));
  2176. jpCheckEmpty(4);
  2177. $<str>$ = 0;
  2178. yyGetParser->SetCurrentCombine("");
  2179. }
  2180. |
  2181. PrimaryNoNewArray jp_BRACKETSTART Expression jp_BRACKETEND
  2182. {
  2183. jpElementStart(4);
  2184. jpCheckEmpty(4);
  2185. $<str>$ = 0;
  2186. yyGetParser->SetCurrentCombine("");
  2187. }
  2188. PostfixExpression:
  2189. Primary
  2190. {
  2191. jpElementStart(1);
  2192. jpCheckEmpty(1);
  2193. $<str>$ = 0;
  2194. yyGetParser->SetCurrentCombine("");
  2195. }
  2196. |
  2197. Name
  2198. {
  2199. jpElementStart(1);
  2200. yyGetParser->DeallocateParserType(&($<str>1));
  2201. $<str>$ = 0;
  2202. yyGetParser->SetCurrentCombine("");
  2203. }
  2204. |
  2205. ArrayType jp_DOT jp_CLASS
  2206. {
  2207. jpElementStart(3);
  2208. jpCheckEmpty(3);
  2209. $<str>$ = 0;
  2210. yyGetParser->SetCurrentCombine("");
  2211. }
  2212. |
  2213. PostIncrementExpression
  2214. {
  2215. jpElementStart(1);
  2216. jpCheckEmpty(1);
  2217. $<str>$ = 0;
  2218. yyGetParser->SetCurrentCombine("");
  2219. }
  2220. |
  2221. PostDecrementExpression
  2222. {
  2223. jpElementStart(1);
  2224. jpCheckEmpty(1);
  2225. $<str>$ = 0;
  2226. yyGetParser->SetCurrentCombine("");
  2227. }
  2228. PostIncrementExpression:
  2229. PostfixExpression jp_PLUSPLUS
  2230. {
  2231. jpElementStart(2);
  2232. jpCheckEmpty(2);
  2233. $<str>$ = 0;
  2234. yyGetParser->SetCurrentCombine("");
  2235. }
  2236. PostDecrementExpression:
  2237. PostfixExpression jp_MINUSMINUS
  2238. {
  2239. jpElementStart(2);
  2240. jpCheckEmpty(2);
  2241. $<str>$ = 0;
  2242. yyGetParser->SetCurrentCombine("");
  2243. }
  2244. UnaryExpression:
  2245. PreIncrementExpression
  2246. {
  2247. jpElementStart(1);
  2248. jpCheckEmpty(1);
  2249. $<str>$ = 0;
  2250. yyGetParser->SetCurrentCombine("");
  2251. }
  2252. |
  2253. PreDecrementExpression
  2254. {
  2255. jpElementStart(1);
  2256. jpCheckEmpty(1);
  2257. $<str>$ = 0;
  2258. yyGetParser->SetCurrentCombine("");
  2259. }
  2260. |
  2261. jp_PLUS UnaryExpression
  2262. {
  2263. jpElementStart(2);
  2264. jpCheckEmpty(2);
  2265. $<str>$ = 0;
  2266. yyGetParser->SetCurrentCombine("");
  2267. }
  2268. |
  2269. jp_MINUS UnaryExpression
  2270. {
  2271. jpElementStart(2);
  2272. jpCheckEmpty(2);
  2273. $<str>$ = 0;
  2274. yyGetParser->SetCurrentCombine("");
  2275. }
  2276. |
  2277. UnaryExpressionNotPlusMinus
  2278. {
  2279. jpElementStart(1);
  2280. jpCheckEmpty(1);
  2281. $<str>$ = 0;
  2282. yyGetParser->SetCurrentCombine("");
  2283. }
  2284. PreIncrementExpression:
  2285. jp_PLUSPLUS UnaryExpression
  2286. {
  2287. jpElementStart(2);
  2288. jpCheckEmpty(2);
  2289. $<str>$ = 0;
  2290. yyGetParser->SetCurrentCombine("");
  2291. }
  2292. PreDecrementExpression:
  2293. jp_MINUSMINUS UnaryExpression
  2294. {
  2295. jpElementStart(2);
  2296. jpCheckEmpty(2);
  2297. $<str>$ = 0;
  2298. yyGetParser->SetCurrentCombine("");
  2299. }
  2300. UnaryExpressionNotPlusMinus:
  2301. PostfixExpression
  2302. {
  2303. jpElementStart(1);
  2304. jpCheckEmpty(1);
  2305. $<str>$ = 0;
  2306. yyGetParser->SetCurrentCombine("");
  2307. }
  2308. |
  2309. jp_TILDE UnaryExpression
  2310. {
  2311. jpElementStart(2);
  2312. jpCheckEmpty(2);
  2313. $<str>$ = 0;
  2314. yyGetParser->SetCurrentCombine("");
  2315. }
  2316. |
  2317. jp_EXCLAMATION UnaryExpression
  2318. {
  2319. jpElementStart(2);
  2320. jpCheckEmpty(2);
  2321. $<str>$ = 0;
  2322. yyGetParser->SetCurrentCombine("");
  2323. }
  2324. |
  2325. CastExpression
  2326. {
  2327. jpElementStart(1);
  2328. jpCheckEmpty(1);
  2329. $<str>$ = 0;
  2330. yyGetParser->SetCurrentCombine("");
  2331. }
  2332. CastExpression:
  2333. jp_PARESTART PrimitiveType Dimsopt jp_PAREEND UnaryExpression
  2334. {
  2335. jpElementStart(5);
  2336. jpCheckEmpty(5);
  2337. $<str>$ = 0;
  2338. yyGetParser->SetCurrentCombine("");
  2339. }
  2340. |
  2341. jp_PARESTART Expression jp_PAREEND UnaryExpressionNotPlusMinus
  2342. {
  2343. jpElementStart(4);
  2344. jpCheckEmpty(4);
  2345. $<str>$ = 0;
  2346. yyGetParser->SetCurrentCombine("");
  2347. }
  2348. |
  2349. jp_PARESTART Name Dims jp_PAREEND UnaryExpressionNotPlusMinus
  2350. {
  2351. jpElementStart(5);
  2352. }
  2353. MultiplicativeExpression:
  2354. UnaryExpression
  2355. {
  2356. jpElementStart(1);
  2357. jpCheckEmpty(1);
  2358. $<str>$ = 0;
  2359. yyGetParser->SetCurrentCombine("");
  2360. }
  2361. |
  2362. MultiplicativeExpression jp_TIMES UnaryExpression
  2363. {
  2364. jpElementStart(3);
  2365. jpCheckEmpty(3);
  2366. $<str>$ = 0;
  2367. yyGetParser->SetCurrentCombine("");
  2368. }
  2369. |
  2370. MultiplicativeExpression jp_DIVIDE UnaryExpression
  2371. {
  2372. jpElementStart(3);
  2373. jpCheckEmpty(3);
  2374. $<str>$ = 0;
  2375. yyGetParser->SetCurrentCombine("");
  2376. }
  2377. |
  2378. MultiplicativeExpression jp_PERCENT UnaryExpression
  2379. {
  2380. jpElementStart(3);
  2381. jpCheckEmpty(3);
  2382. $<str>$ = 0;
  2383. yyGetParser->SetCurrentCombine("");
  2384. }
  2385. AdditiveExpression:
  2386. MultiplicativeExpression
  2387. {
  2388. jpElementStart(1);
  2389. jpCheckEmpty(1);
  2390. $<str>$ = 0;
  2391. yyGetParser->SetCurrentCombine("");
  2392. }
  2393. |
  2394. AdditiveExpression jp_PLUS MultiplicativeExpression
  2395. {
  2396. jpElementStart(3);
  2397. jpCheckEmpty(3);
  2398. $<str>$ = 0;
  2399. yyGetParser->SetCurrentCombine("");
  2400. }
  2401. |
  2402. AdditiveExpression jp_MINUS MultiplicativeExpression
  2403. {
  2404. jpElementStart(3);
  2405. jpCheckEmpty(3);
  2406. $<str>$ = 0;
  2407. yyGetParser->SetCurrentCombine("");
  2408. }
  2409. ShiftExpression:
  2410. AdditiveExpression
  2411. {
  2412. jpElementStart(1);
  2413. jpCheckEmpty(1);
  2414. $<str>$ = 0;
  2415. yyGetParser->SetCurrentCombine("");
  2416. }
  2417. |
  2418. ShiftExpression jp_LTLT AdditiveExpression
  2419. {
  2420. jpElementStart(3);
  2421. jpCheckEmpty(3);
  2422. $<str>$ = 0;
  2423. yyGetParser->SetCurrentCombine("");
  2424. }
  2425. |
  2426. ShiftExpression jp_GTGT AdditiveExpression
  2427. {
  2428. jpElementStart(3);
  2429. jpCheckEmpty(3);
  2430. $<str>$ = 0;
  2431. yyGetParser->SetCurrentCombine("");
  2432. }
  2433. |
  2434. ShiftExpression jp_GTGTGT AdditiveExpression
  2435. {
  2436. jpElementStart(3);
  2437. jpCheckEmpty(3);
  2438. $<str>$ = 0;
  2439. yyGetParser->SetCurrentCombine("");
  2440. }
  2441. RelationalExpression:
  2442. ShiftExpression
  2443. {
  2444. jpElementStart(1);
  2445. jpCheckEmpty(1);
  2446. $<str>$ = 0;
  2447. yyGetParser->SetCurrentCombine("");
  2448. }
  2449. |
  2450. RelationalExpression jp_LESSTHAN ShiftExpression
  2451. {
  2452. jpElementStart(3);
  2453. jpCheckEmpty(3);
  2454. $<str>$ = 0;
  2455. yyGetParser->SetCurrentCombine("");
  2456. }
  2457. |
  2458. RelationalExpression jp_GREATER ShiftExpression
  2459. {
  2460. jpElementStart(3);
  2461. jpCheckEmpty(3);
  2462. $<str>$ = 0;
  2463. yyGetParser->SetCurrentCombine("");
  2464. }
  2465. |
  2466. RelationalExpression jp_LTEQUALS ShiftExpression
  2467. {
  2468. jpElementStart(3);
  2469. jpCheckEmpty(3);
  2470. $<str>$ = 0;
  2471. yyGetParser->SetCurrentCombine("");
  2472. }
  2473. |
  2474. RelationalExpression jp_GTEQUALS ShiftExpression
  2475. {
  2476. jpElementStart(3);
  2477. jpCheckEmpty(3);
  2478. $<str>$ = 0;
  2479. yyGetParser->SetCurrentCombine("");
  2480. }
  2481. |
  2482. RelationalExpression jp_INSTANCEOF ReferenceType
  2483. {
  2484. jpElementStart(3);
  2485. jpCheckEmpty(3);
  2486. $<str>$ = 0;
  2487. yyGetParser->SetCurrentCombine("");
  2488. }
  2489. EqualityExpression:
  2490. RelationalExpression
  2491. {
  2492. jpElementStart(1);
  2493. jpCheckEmpty(1);
  2494. $<str>$ = 0;
  2495. yyGetParser->SetCurrentCombine("");
  2496. }
  2497. |
  2498. EqualityExpression jp_EQUALSEQUALS RelationalExpression
  2499. {
  2500. jpElementStart(3);
  2501. jpCheckEmpty(3);
  2502. $<str>$ = 0;
  2503. yyGetParser->SetCurrentCombine("");
  2504. }
  2505. |
  2506. EqualityExpression jp_EXCLAMATIONEQUALS RelationalExpression
  2507. {
  2508. jpElementStart(3);
  2509. jpCheckEmpty(3);
  2510. $<str>$ = 0;
  2511. yyGetParser->SetCurrentCombine("");
  2512. }
  2513. AndExpression:
  2514. EqualityExpression
  2515. {
  2516. jpElementStart(1);
  2517. jpCheckEmpty(1);
  2518. $<str>$ = 0;
  2519. yyGetParser->SetCurrentCombine("");
  2520. }
  2521. |
  2522. AndExpression jp_AND EqualityExpression
  2523. {
  2524. jpElementStart(3);
  2525. jpCheckEmpty(3);
  2526. $<str>$ = 0;
  2527. yyGetParser->SetCurrentCombine("");
  2528. }
  2529. ExclusiveOrExpression:
  2530. AndExpression
  2531. {
  2532. jpElementStart(1);
  2533. jpCheckEmpty(1);
  2534. $<str>$ = 0;
  2535. yyGetParser->SetCurrentCombine("");
  2536. }
  2537. |
  2538. ExclusiveOrExpression jp_CARROT AndExpression
  2539. {
  2540. jpElementStart(3);
  2541. jpCheckEmpty(3);
  2542. $<str>$ = 0;
  2543. yyGetParser->SetCurrentCombine("");
  2544. }
  2545. InclusiveOrExpression:
  2546. ExclusiveOrExpression
  2547. {
  2548. jpElementStart(1);
  2549. jpCheckEmpty(1);
  2550. $<str>$ = 0;
  2551. yyGetParser->SetCurrentCombine("");
  2552. }
  2553. |
  2554. InclusiveOrExpression jp_PIPE ExclusiveOrExpression
  2555. {
  2556. jpElementStart(3);
  2557. jpCheckEmpty(3);
  2558. $<str>$ = 0;
  2559. yyGetParser->SetCurrentCombine("");
  2560. }
  2561. ConditionalAndExpression:
  2562. InclusiveOrExpression
  2563. {
  2564. jpElementStart(1);
  2565. jpCheckEmpty(1);
  2566. $<str>$ = 0;
  2567. yyGetParser->SetCurrentCombine("");
  2568. }
  2569. |
  2570. ConditionalAndExpression jp_ANDAND InclusiveOrExpression
  2571. {
  2572. jpElementStart(3);
  2573. jpCheckEmpty(3);
  2574. $<str>$ = 0;
  2575. yyGetParser->SetCurrentCombine("");
  2576. }
  2577. ConditionalOrExpression:
  2578. ConditionalAndExpression
  2579. {
  2580. jpElementStart(1);
  2581. jpCheckEmpty(1);
  2582. $<str>$ = 0;
  2583. yyGetParser->SetCurrentCombine("");
  2584. }
  2585. |
  2586. ConditionalOrExpression jp_PIPEPIPE ConditionalAndExpression
  2587. {
  2588. jpElementStart(3);
  2589. jpCheckEmpty(3);
  2590. $<str>$ = 0;
  2591. yyGetParser->SetCurrentCombine("");
  2592. }
  2593. ConditionalExpression:
  2594. ConditionalOrExpression
  2595. {
  2596. jpElementStart(1);
  2597. jpCheckEmpty(1);
  2598. $<str>$ = 0;
  2599. yyGetParser->SetCurrentCombine("");
  2600. }
  2601. |
  2602. ConditionalOrExpression jp_QUESTION Expression jp_COLON ConditionalExpression
  2603. {
  2604. jpElementStart(5);
  2605. jpCheckEmpty(5);
  2606. $<str>$ = 0;
  2607. yyGetParser->SetCurrentCombine("");
  2608. }
  2609. AssignmentExpression:
  2610. ConditionalExpression
  2611. {
  2612. jpElementStart(1);
  2613. jpCheckEmpty(1);
  2614. $<str>$ = 0;
  2615. yyGetParser->SetCurrentCombine("");
  2616. }
  2617. |
  2618. Assignment
  2619. {
  2620. jpElementStart(1);
  2621. jpCheckEmpty(1);
  2622. $<str>$ = 0;
  2623. yyGetParser->SetCurrentCombine("");
  2624. }
  2625. Assignment:
  2626. LeftHandSide AssignmentOperator AssignmentExpression
  2627. {
  2628. jpElementStart(3);
  2629. jpCheckEmpty(3);
  2630. $<str>$ = 0;
  2631. yyGetParser->SetCurrentCombine("");
  2632. }
  2633. LeftHandSide:
  2634. Name
  2635. {
  2636. jpElementStart(1);
  2637. yyGetParser->DeallocateParserType(&($<str>1));
  2638. jpCheckEmpty(1);
  2639. $<str>$ = 0;
  2640. yyGetParser->SetCurrentCombine("");
  2641. }
  2642. |
  2643. FieldAccess
  2644. {
  2645. jpElementStart(1);
  2646. jpCheckEmpty(1);
  2647. $<str>$ = 0;
  2648. yyGetParser->SetCurrentCombine("");
  2649. }
  2650. |
  2651. ArrayAccess
  2652. {
  2653. jpElementStart(1);
  2654. jpCheckEmpty(1);
  2655. $<str>$ = 0;
  2656. yyGetParser->SetCurrentCombine("");
  2657. }
  2658. AssignmentOperator:
  2659. jp_EQUALS
  2660. {
  2661. jpElementStart(1);
  2662. jpCheckEmpty(1);
  2663. $<str>$ = 0;
  2664. yyGetParser->SetCurrentCombine("");
  2665. }
  2666. |
  2667. jp_TIMESEQUALS
  2668. {
  2669. jpElementStart(1);
  2670. jpCheckEmpty(1);
  2671. $<str>$ = 0;
  2672. yyGetParser->SetCurrentCombine("");
  2673. }
  2674. |
  2675. jp_DIVIDEEQUALS
  2676. {
  2677. jpElementStart(1);
  2678. jpCheckEmpty(1);
  2679. $<str>$ = 0;
  2680. yyGetParser->SetCurrentCombine("");
  2681. }
  2682. |
  2683. jp_PERCENTEQUALS
  2684. {
  2685. jpElementStart(1);
  2686. jpCheckEmpty(1);
  2687. $<str>$ = 0;
  2688. yyGetParser->SetCurrentCombine("");
  2689. }
  2690. |
  2691. jp_PLUSEQUALS
  2692. {
  2693. jpElementStart(1);
  2694. jpCheckEmpty(1);
  2695. $<str>$ = 0;
  2696. yyGetParser->SetCurrentCombine("");
  2697. }
  2698. |
  2699. jp_MINUSEQUALS
  2700. {
  2701. jpElementStart(1);
  2702. jpCheckEmpty(1);
  2703. $<str>$ = 0;
  2704. yyGetParser->SetCurrentCombine("");
  2705. }
  2706. |
  2707. jp_LESLESEQUALS
  2708. {
  2709. jpElementStart(1);
  2710. jpCheckEmpty(1);
  2711. $<str>$ = 0;
  2712. yyGetParser->SetCurrentCombine("");
  2713. }
  2714. |
  2715. jp_GTGTEQUALS
  2716. {
  2717. jpElementStart(1);
  2718. jpCheckEmpty(1);
  2719. $<str>$ = 0;
  2720. yyGetParser->SetCurrentCombine("");
  2721. }
  2722. |
  2723. jp_GTGTGTEQUALS
  2724. {
  2725. jpElementStart(1);
  2726. jpCheckEmpty(1);
  2727. $<str>$ = 0;
  2728. yyGetParser->SetCurrentCombine("");
  2729. }
  2730. |
  2731. jp_ANDEQUALS
  2732. {
  2733. jpElementStart(1);
  2734. jpCheckEmpty(1);
  2735. $<str>$ = 0;
  2736. yyGetParser->SetCurrentCombine("");
  2737. }
  2738. |
  2739. jp_CARROTEQUALS
  2740. {
  2741. jpElementStart(1);
  2742. jpCheckEmpty(1);
  2743. $<str>$ = 0;
  2744. yyGetParser->SetCurrentCombine("");
  2745. }
  2746. |
  2747. jp_PIPEEQUALS
  2748. {
  2749. jpElementStart(1);
  2750. jpCheckEmpty(1);
  2751. $<str>$ = 0;
  2752. yyGetParser->SetCurrentCombine("");
  2753. }
  2754. Expression:
  2755. AssignmentExpression
  2756. {
  2757. jpElementStart(1);
  2758. jpCheckEmpty(1);
  2759. $<str>$ = 0;
  2760. yyGetParser->SetCurrentCombine("");
  2761. }
  2762. ConstantExpression:
  2763. Expression
  2764. {
  2765. jpElementStart(1);
  2766. jpCheckEmpty(1);
  2767. $<str>$ = 0;
  2768. yyGetParser->SetCurrentCombine("");
  2769. }
  2770. New:
  2771. jp_NEW
  2772. {
  2773. jpElementStart(1);
  2774. jpCheckEmpty(1);
  2775. $<str>$ = 0;
  2776. yyGetParser->SetCurrentCombine("");
  2777. }
  2778. |
  2779. Name jp_DOT jp_NEW
  2780. {
  2781. jpElementStart(3);
  2782. jpStoreClass($<str>1);
  2783. jpCheckEmpty(3);
  2784. $<str>$ = 0;
  2785. yyGetParser->SetCurrentCombine("");
  2786. }
  2787. %%
  2788. /* End of grammar */
  2789. /*--------------------------------------------------------------------------*/
  2790. void cmDependsJavaError(yyscan_t yyscanner, const char* message)
  2791. {
  2792. yyGetParser->Error(message);
  2793. }