cmDependsJavaParser.y 48 KB

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