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