cmDependsJavaParser.y 48 KB

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