cmDependsJavaParser.y 48 KB

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