cmDependsJavaParser.y 48 KB

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