cmDependsJavaParser.y 49 KB

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