cmDependsJavaParser.y 49 KB

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