cmDependsJavaParser.y 49 KB

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