nasm-token.c 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217
  1. /* Generated by re2c
  2. */
  3. /*
  4. * NASM-compatible re2c lexer
  5. *
  6. * Copyright (C) 2001-2007 Peter Johnson
  7. *
  8. * Portions based on re2c's example code.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
  20. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
  23. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  29. * POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. #include <util.h>
  32. #include <libyasm.h>
  33. #include "modules/parsers/nasm/nasm-parser.h"
  34. #include "modules/preprocs/nasm/nasm.h"
  35. #define YYCURSOR cursor
  36. #define YYLIMIT (s->lim)
  37. #define YYMARKER (s->ptr)
  38. #define YYFILL(n) {}
  39. #define RETURN(i) {s->cur = cursor; parser_nasm->tokch = s->tok[0]; \
  40. return i;}
  41. #define SCANINIT() {s->tok = cursor;}
  42. #define TOK ((char *)s->tok)
  43. #define TOKLEN (size_t)(cursor-s->tok)
  44. /* starting size of string buffer */
  45. #define STRBUF_ALLOC_SIZE 128
  46. /* string buffer used when parsing strings/character constants */
  47. static YYCTYPE *strbuf = NULL;
  48. /* length of strbuf (including terminating NULL character) */
  49. static size_t strbuf_size = 0;
  50. static int linechg_numcount;
  51. static int
  52. handle_dot_label(YYSTYPE *lvalp, char *tok, size_t toklen, size_t zeropos,
  53. yasm_parser_nasm *parser_nasm)
  54. {
  55. /* check for special non-local labels like ..start */
  56. if (tok[zeropos+1] == '.') {
  57. lvalp->str_val = yasm__xstrndup(tok+zeropos+(parser_nasm->tasm?2:0),
  58. toklen-zeropos-(parser_nasm->tasm?2:0));
  59. /* check for special non-local ..@label */
  60. if (lvalp->str_val[zeropos+2] == '@')
  61. return NONLOCAL_ID;
  62. return SPECIAL_ID;
  63. }
  64. if (parser_nasm->masm && tok[zeropos] == '.') {
  65. lvalp->str_val = yasm__xstrndup(tok + zeropos, toklen - zeropos);
  66. return SPECIAL_ID;
  67. }
  68. if (parser_nasm->tasm && (!tasm_locals ||
  69. (tok[zeropos] == '.' &&
  70. tok[zeropos+1] != '@' && tok[zeropos+2] != '@'))) {
  71. /* no locals on Tasm without the 'locals' directive */
  72. /* .foo is never local either, but .@@foo may be (local structure
  73. * members) */
  74. lvalp->str_val = yasm__xstrndup(tok + zeropos, toklen - zeropos);
  75. return SPECIAL_ID;
  76. }
  77. if (!parser_nasm->locallabel_base) {
  78. lvalp->str_val = yasm__xstrndup(tok+zeropos, toklen-zeropos);
  79. yasm_warn_set(YASM_WARN_GENERAL,
  80. N_("no non-local label before `%s'"),
  81. lvalp->str_val);
  82. } else {
  83. size_t len = toklen - zeropos + parser_nasm->locallabel_base_len;
  84. lvalp->str_val = yasm_xmalloc(len + 1);
  85. strcpy(lvalp->str_val, parser_nasm->locallabel_base);
  86. strncat(lvalp->str_val, tok+zeropos, toklen-zeropos);
  87. lvalp->str_val[len] = '\0';
  88. }
  89. return LOCAL_ID;
  90. }
  91. int
  92. nasm_parser_lex(YYSTYPE *lvalp, yasm_parser_nasm *parser_nasm)
  93. {
  94. yasm_scanner *s = &parser_nasm->s;
  95. YYCTYPE *cursor = s->cur;
  96. YYCTYPE endch;
  97. size_t count;
  98. YYCTYPE savech;
  99. /* Handle one token of lookahead */
  100. if (parser_nasm->peek_token != NONE) {
  101. int tok = parser_nasm->peek_token;
  102. *lvalp = parser_nasm->peek_tokval; /* structure copy */
  103. parser_nasm->tokch = parser_nasm->peek_tokch;
  104. parser_nasm->peek_token = NONE;
  105. return tok;
  106. }
  107. /* Catch EOL (EOF from the scanner perspective) */
  108. if (s->eof && cursor == s->eof)
  109. return 0;
  110. /* Jump to proper "exclusive" states */
  111. switch (parser_nasm->state) {
  112. case DIRECTIVE:
  113. goto directive;
  114. case SECTION_DIRECTIVE:
  115. goto section_directive;
  116. case DIRECTIVE2:
  117. goto directive2;
  118. case LINECHG:
  119. goto linechg;
  120. case LINECHG2:
  121. goto linechg2;
  122. default:
  123. break;
  124. }
  125. scan:
  126. SCANINIT();
  127. if (*cursor == '\0')
  128. goto endofinput;
  129. {
  130. static unsigned char yybm[] = {
  131. 0, 1, 1, 1, 1, 1, 1, 1,
  132. 1, 1, 1, 1, 1, 1, 1, 1,
  133. 1, 1, 1, 1, 1, 1, 1, 1,
  134. 1, 1, 1, 1, 1, 1, 1, 1,
  135. 1, 1, 1, 3, 3, 1, 1, 1,
  136. 1, 1, 1, 1, 1, 1, 3, 1,
  137. 255, 255, 63, 63, 63, 63, 63, 63,
  138. 15, 15, 1, 1, 1, 1, 1, 3,
  139. 3, 7, 7, 7, 7, 7, 7, 3,
  140. 3, 3, 3, 3, 3, 3, 3, 3,
  141. 3, 3, 3, 3, 3, 3, 3, 3,
  142. 3, 3, 3, 1, 1, 1, 1, 167,
  143. 1, 7, 7, 7, 7, 7, 7, 3,
  144. 3, 3, 3, 3, 3, 3, 3, 3,
  145. 3, 3, 3, 3, 3, 3, 3, 3,
  146. 3, 3, 3, 1, 1, 1, 3, 1,
  147. 1, 1, 1, 1, 1, 1, 1, 1,
  148. 1, 1, 1, 1, 1, 1, 1, 1,
  149. 1, 1, 1, 1, 1, 1, 1, 1,
  150. 1, 1, 1, 1, 1, 1, 1, 1,
  151. 1, 1, 1, 1, 1, 1, 1, 1,
  152. 1, 1, 1, 1, 1, 1, 1, 1,
  153. 1, 1, 1, 1, 1, 1, 1, 1,
  154. 1, 1, 1, 1, 1, 1, 1, 1,
  155. 1, 1, 1, 1, 1, 1, 1, 1,
  156. 1, 1, 1, 1, 1, 1, 1, 1,
  157. 1, 1, 1, 1, 1, 1, 1, 1,
  158. 1, 1, 1, 1, 1, 1, 1, 1,
  159. 1, 1, 1, 1, 1, 1, 1, 1,
  160. 1, 1, 1, 1, 1, 1, 1, 1,
  161. 1, 1, 1, 1, 1, 1, 1, 1,
  162. 1, 1, 1, 1, 1, 1, 1, 1,
  163. 0, 0, 0, 0, 0, 0, 0, 0,
  164. 0, 128, 0, 0, 0, 128, 0, 0,
  165. 0, 0, 0, 0, 0, 0, 0, 0,
  166. 0, 0, 0, 0, 0, 0, 0, 0,
  167. 128, 0, 0, 0, 0, 0, 0, 0,
  168. 0, 0, 0, 0, 0, 0, 0, 0,
  169. 0, 0, 0, 0, 0, 0, 0, 0,
  170. 0, 0, 0, 0, 0, 0, 0, 0,
  171. 0, 0, 0, 0, 0, 0, 0, 0,
  172. 0, 0, 0, 0, 0, 0, 0, 0,
  173. 0, 0, 0, 0, 0, 0, 0, 0,
  174. 0, 0, 0, 0, 0, 0, 0, 0,
  175. 0, 0, 0, 0, 0, 0, 0, 0,
  176. 0, 0, 0, 0, 0, 0, 0, 0,
  177. 0, 0, 0, 0, 0, 0, 0, 0,
  178. 0, 0, 0, 0, 0, 0, 0, 0,
  179. 0, 0, 0, 0, 0, 0, 0, 0,
  180. 0, 0, 0, 0, 0, 0, 0, 0,
  181. 0, 0, 0, 0, 0, 0, 0, 0,
  182. 0, 0, 0, 0, 0, 0, 0, 0,
  183. 0, 0, 0, 0, 0, 0, 0, 0,
  184. 0, 0, 0, 0, 0, 0, 0, 0,
  185. 0, 0, 0, 0, 0, 0, 0, 0,
  186. 0, 0, 0, 0, 0, 0, 0, 0,
  187. 0, 0, 0, 0, 0, 0, 0, 0,
  188. 0, 0, 0, 0, 0, 0, 0, 0,
  189. 0, 0, 0, 0, 0, 0, 0, 0,
  190. 0, 0, 0, 0, 0, 0, 0, 0,
  191. 0, 0, 0, 0, 0, 0, 0, 0,
  192. 0, 0, 0, 0, 0, 0, 0, 0,
  193. 0, 0, 0, 0, 0, 0, 0, 0,
  194. 0, 0, 0, 0, 0, 0, 0, 0,
  195. };
  196. {
  197. YYCTYPE yych;
  198. unsigned int yyaccept;
  199. goto yy0;
  200. ++YYCURSOR;
  201. yy0:
  202. if((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
  203. yych = *YYCURSOR;
  204. switch(yych){
  205. case '\000': goto yy43;
  206. case '\t': case '\r': case ' ': goto yy41;
  207. case '"': case '\'': goto yy9;
  208. case '$': goto yy7;
  209. case '%': goto yy11;
  210. case '&': case '(':
  211. case ')':
  212. case '*':
  213. case '+':
  214. case ',':
  215. case '-': case ':': case '=': case '[': case '^': case '|': case '~': goto yy32;
  216. case '.': goto yy36;
  217. case '/': goto yy31;
  218. case '0': goto yy2;
  219. case '1': goto yy4;
  220. case '2':
  221. case '3':
  222. case '4':
  223. case '5':
  224. case '6':
  225. case '7': goto yy5;
  226. case '8':
  227. case '9': goto yy6;
  228. case ';': goto yy39;
  229. case '<': goto yy28;
  230. case '>': goto yy30;
  231. case '?': goto yy33;
  232. case '@': goto yy37;
  233. case 'A': case 'a': goto yy26;
  234. case 'B': case 'b': goto yy12;
  235. case 'C': case 'F':
  236. case 'G': case 'J':
  237. case 'K': case 'M': case 'P': case 'U':
  238. case 'V': case 'X': case 'Z': case '_': case 'c': case 'f':
  239. case 'g': case 'j':
  240. case 'k': case 'm': case 'p': case 'u':
  241. case 'v': case 'x': case 'z': goto yy38;
  242. case 'D': case 'd': goto yy16;
  243. case 'E': case 'e': goto yy24;
  244. case 'H': case 'h': goto yy14;
  245. case 'I': case 'i': goto yy23;
  246. case 'L': case 'l': goto yy17;
  247. case 'N': case 'n': goto yy27;
  248. case 'O': case 'o': goto yy20;
  249. case 'Q': case 'q': goto yy18;
  250. case 'R': case 'r': goto yy22;
  251. case 'S': case 's': goto yy25;
  252. case 'T': case 't': goto yy19;
  253. case 'W': case 'w': goto yy15;
  254. case 'Y': case 'y': goto yy21;
  255. case ']': goto yy34;
  256. default: goto yy45;
  257. }
  258. yy2: yyaccept = 0;
  259. yych = *(YYMARKER = ++YYCURSOR);
  260. if(yybm[0+yych] & 64) {
  261. goto yy222;
  262. }
  263. switch(yych){
  264. case '.': goto yy203;
  265. case '0':
  266. case '1':
  267. case '2':
  268. case '3':
  269. case '4':
  270. case '5':
  271. case '6':
  272. case '7': goto yy216;
  273. case '8':
  274. case '9': goto yy206;
  275. case 'A': case 'C':
  276. case 'D':
  277. case 'E':
  278. case 'F': case 'a': case 'c':
  279. case 'd':
  280. case 'e':
  281. case 'f': goto yy208;
  282. case 'B': case 'b': goto yy224;
  283. case 'H': case 'h': goto yy210;
  284. case 'O': case 'Q': case 'o': case 'q': goto yy220;
  285. case 'X': case 'x': goto yy228;
  286. case '_': goto yy226;
  287. default: goto yy3;
  288. }
  289. yy3:
  290. {
  291. savech = s->tok[TOKLEN];
  292. s->tok[TOKLEN] = '\0';
  293. lvalp->intn = yasm_intnum_create_dec(TOK);
  294. s->tok[TOKLEN] = savech;
  295. RETURN(INTNUM);
  296. }
  297. yy4: yyaccept = 0;
  298. yych = *(YYMARKER = ++YYCURSOR);
  299. if(yybm[0+yych] & 64) {
  300. goto yy222;
  301. }
  302. switch(yych){
  303. case '.': goto yy203;
  304. case '0':
  305. case '1':
  306. case '2':
  307. case '3':
  308. case '4':
  309. case '5':
  310. case '6':
  311. case '7': goto yy216;
  312. case '8':
  313. case '9': goto yy206;
  314. case 'A': case 'C':
  315. case 'D':
  316. case 'E':
  317. case 'F': case 'a': case 'c':
  318. case 'd':
  319. case 'e':
  320. case 'f': goto yy208;
  321. case 'B': case 'b': goto yy224;
  322. case 'H': case 'h': goto yy210;
  323. case 'O': case 'Q': case 'o': case 'q': goto yy220;
  324. case '_': goto yy226;
  325. default: goto yy3;
  326. }
  327. yy5: yyaccept = 0;
  328. yych = *(YYMARKER = ++YYCURSOR);
  329. if(yybm[0+yych] & 16) {
  330. goto yy216;
  331. }
  332. if(yych <= 'P'){
  333. if(yych <= '@'){
  334. if(yych <= '.'){
  335. if(yych <= '-') goto yy3;
  336. goto yy203;
  337. } else {
  338. if(yych <= '/') goto yy3;
  339. if(yych <= '9') goto yy206;
  340. goto yy3;
  341. }
  342. } else {
  343. if(yych <= 'H'){
  344. if(yych <= 'F') goto yy208;
  345. if(yych <= 'G') goto yy3;
  346. goto yy210;
  347. } else {
  348. if(yych == 'O') goto yy220;
  349. goto yy3;
  350. }
  351. }
  352. } else {
  353. if(yych <= 'g'){
  354. if(yych <= '_'){
  355. if(yych <= 'Q') goto yy220;
  356. if(yych <= '^') goto yy3;
  357. goto yy218;
  358. } else {
  359. if(yych <= '`') goto yy3;
  360. if(yych <= 'f') goto yy208;
  361. goto yy3;
  362. }
  363. } else {
  364. if(yych <= 'o'){
  365. if(yych <= 'h') goto yy210;
  366. if(yych <= 'n') goto yy3;
  367. goto yy220;
  368. } else {
  369. if(yych == 'q') goto yy220;
  370. goto yy3;
  371. }
  372. }
  373. }
  374. yy6: yyaccept = 0;
  375. yych = *(YYMARKER = ++YYCURSOR);
  376. if(yych <= 'G'){
  377. if(yych <= '/'){
  378. if(yych == '.') goto yy203;
  379. goto yy3;
  380. } else {
  381. if(yych <= '9') goto yy206;
  382. if(yych <= '@') goto yy3;
  383. if(yych <= 'F') goto yy208;
  384. goto yy3;
  385. }
  386. } else {
  387. if(yych <= '`'){
  388. if(yych <= 'H') goto yy210;
  389. if(yych == '_') goto yy208;
  390. goto yy3;
  391. } else {
  392. if(yych <= 'f') goto yy208;
  393. if(yych == 'h') goto yy210;
  394. goto yy3;
  395. }
  396. }
  397. yy7: yych = *++YYCURSOR;
  398. if(yych <= '>'){
  399. if(yych <= '-'){
  400. if(yych <= '"') goto yy8;
  401. if(yych <= '#') goto yy194;
  402. if(yych <= '$') goto yy197;
  403. goto yy8;
  404. } else {
  405. if(yych <= '.') goto yy194;
  406. if(yych <= '/') goto yy8;
  407. if(yych <= '9') goto yy199;
  408. goto yy8;
  409. }
  410. } else {
  411. if(yych <= '`'){
  412. if(yych <= 'Z') goto yy194;
  413. if(yych == '_') goto yy194;
  414. goto yy8;
  415. } else {
  416. if(yych <= 'z') goto yy194;
  417. if(yych == '~') goto yy194;
  418. goto yy8;
  419. }
  420. }
  421. yy8:
  422. { RETURN(s->tok[0]); }
  423. yy9: yych = *++YYCURSOR;
  424. goto yy10;
  425. yy10:
  426. {
  427. endch = s->tok[0];
  428. goto stringconst;
  429. }
  430. yy11: yyaccept = 1;
  431. yych = *(YYMARKER = ++YYCURSOR);
  432. if(yych == '%') goto yy186;
  433. if(yych == 'l') goto yy188;
  434. goto yy8;
  435. yy12: yych = *++YYCURSOR;
  436. if(yych == 'Y') goto yy182;
  437. if(yych == 'y') goto yy182;
  438. goto yy51;
  439. yy13:
  440. {
  441. savech = s->tok[TOKLEN];
  442. s->tok[TOKLEN] = '\0';
  443. if (parser_nasm->state != INSTRUCTION) {
  444. uintptr_t prefix;
  445. switch (yasm_arch_parse_check_insnprefix
  446. (p_object->arch, TOK, TOKLEN, cur_line, &lvalp->bc,
  447. &prefix)) {
  448. case YASM_ARCH_INSN:
  449. parser_nasm->state = INSTRUCTION;
  450. s->tok[TOKLEN] = savech;
  451. RETURN(INSN);
  452. case YASM_ARCH_PREFIX:
  453. lvalp->arch_data = prefix;
  454. s->tok[TOKLEN] = savech;
  455. RETURN(PREFIX);
  456. default:
  457. break;
  458. }
  459. }
  460. switch (yasm_arch_parse_check_regtmod
  461. (p_object->arch, TOK, TOKLEN, &lvalp->arch_data)) {
  462. case YASM_ARCH_REG:
  463. s->tok[TOKLEN] = savech;
  464. RETURN(REG);
  465. case YASM_ARCH_SEGREG:
  466. s->tok[TOKLEN] = savech;
  467. RETURN(SEGREG);
  468. case YASM_ARCH_TARGETMOD:
  469. s->tok[TOKLEN] = savech;
  470. RETURN(TARGETMOD);
  471. case YASM_ARCH_REGGROUP:
  472. if (parser_nasm->masm) {
  473. s->tok[TOKLEN] = savech;
  474. RETURN(REGGROUP);
  475. }
  476. default:
  477. break;
  478. }
  479. if (parser_nasm->masm) {
  480. if (!yasm__strcasecmp(TOK, "offset")) {
  481. s->tok[TOKLEN] = savech;
  482. RETURN(OFFSET);
  483. }
  484. } else if (parser_nasm->tasm) {
  485. if (!yasm__strcasecmp(TOK, "shl")) {
  486. s->tok[TOKLEN] = savech;
  487. RETURN(LEFT_OP);
  488. }
  489. if (!yasm__strcasecmp(TOK, "shr")) {
  490. s->tok[TOKLEN] = savech;
  491. RETURN(RIGHT_OP);
  492. }
  493. if (!yasm__strcasecmp(TOK, "and")) {
  494. s->tok[TOKLEN] = savech;
  495. RETURN('&');
  496. }
  497. if (!yasm__strcasecmp(TOK, "or")) {
  498. s->tok[TOKLEN] = savech;
  499. RETURN('|');
  500. }
  501. if (!yasm__strcasecmp(TOK, "not")) {
  502. s->tok[TOKLEN] = savech;
  503. RETURN('~');
  504. }
  505. if (!yasm__strcasecmp(TOK, "low")) {
  506. s->tok[TOKLEN] = savech;
  507. RETURN(LOW);
  508. }
  509. if (!yasm__strcasecmp(TOK, "high")) {
  510. s->tok[TOKLEN] = savech;
  511. RETURN(HIGH);
  512. }
  513. if (!yasm__strcasecmp(TOK, "offset")) {
  514. s->tok[TOKLEN] = savech;
  515. RETURN(OFFSET);
  516. }
  517. if (!yasm__strcasecmp(TOK, "fword")) {
  518. s->tok[TOKLEN] = savech;
  519. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
  520. RETURN(SIZE_OVERRIDE);
  521. }
  522. if (!yasm__strcasecmp(TOK, "df")) {
  523. s->tok[TOKLEN] = savech;
  524. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*3;
  525. parser_nasm->state = INSTRUCTION;
  526. RETURN(DECLARE_DATA);
  527. }
  528. if (!yasm__strcasecmp(TOK, "label")) {
  529. s->tok[TOKLEN] = savech;
  530. RETURN(LABEL);
  531. }
  532. if (!yasm__strcasecmp(TOK, "dup")) {
  533. s->tok[TOKLEN] = savech;
  534. RETURN(DUP);
  535. }
  536. }
  537. /* Propagate errors in case we got a warning from the arch */
  538. yasm_errwarn_propagate(parser_nasm->errwarns, cur_line);
  539. /* Just an identifier, return as such. */
  540. s->tok[TOKLEN] = savech;
  541. lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
  542. RETURN(ID);
  543. }
  544. yy14: yych = *++YYCURSOR;
  545. if(yych == 'W') goto yy177;
  546. if(yych == 'w') goto yy177;
  547. goto yy51;
  548. yy15: yych = *++YYCURSOR;
  549. if(yych <= 'R'){
  550. if(yych == 'O') goto yy170;
  551. if(yych <= 'Q') goto yy51;
  552. goto yy171;
  553. } else {
  554. if(yych <= 'o'){
  555. if(yych <= 'n') goto yy51;
  556. goto yy170;
  557. } else {
  558. if(yych == 'r') goto yy171;
  559. goto yy51;
  560. }
  561. }
  562. yy16: yych = *++YYCURSOR;
  563. switch(yych){
  564. case 'B': case 'b': goto yy144;
  565. case 'D': case 'd': goto yy146;
  566. case 'H': case 'h': goto yy148;
  567. case 'O': case 'o': goto yy149;
  568. case 'Q': case 'q': goto yy151;
  569. case 'T': case 't': goto yy153;
  570. case 'W': case 'w': goto yy155;
  571. case 'Y': case 'y': goto yy157;
  572. default: goto yy51;
  573. }
  574. yy17: yych = *++YYCURSOR;
  575. if(yych == 'O') goto yy140;
  576. if(yych == 'o') goto yy140;
  577. goto yy51;
  578. yy18: yych = *++YYCURSOR;
  579. if(yych == 'W') goto yy135;
  580. if(yych == 'w') goto yy135;
  581. goto yy51;
  582. yy19: yych = *++YYCURSOR;
  583. if(yych <= 'W'){
  584. if(yych == 'I') goto yy125;
  585. if(yych <= 'V') goto yy51;
  586. goto yy126;
  587. } else {
  588. if(yych <= 'i'){
  589. if(yych <= 'h') goto yy51;
  590. goto yy125;
  591. } else {
  592. if(yych == 'w') goto yy126;
  593. goto yy51;
  594. }
  595. }
  596. yy20: yych = *++YYCURSOR;
  597. if(yych == 'W') goto yy120;
  598. if(yych == 'w') goto yy120;
  599. goto yy51;
  600. yy21: yych = *++YYCURSOR;
  601. if(yych == 'W') goto yy115;
  602. if(yych == 'w') goto yy115;
  603. goto yy51;
  604. yy22: yych = *++YYCURSOR;
  605. if(yych == 'E') goto yy92;
  606. if(yych == 'e') goto yy92;
  607. goto yy51;
  608. yy23: yych = *++YYCURSOR;
  609. if(yych == 'N') goto yy86;
  610. if(yych == 'n') goto yy86;
  611. goto yy51;
  612. yy24: yych = *++YYCURSOR;
  613. if(yych == 'Q') goto yy83;
  614. if(yych == 'q') goto yy83;
  615. goto yy51;
  616. yy25: yych = *++YYCURSOR;
  617. if(yych <= 'T'){
  618. if(yych == 'E') goto yy74;
  619. if(yych <= 'S') goto yy51;
  620. goto yy75;
  621. } else {
  622. if(yych <= 'e'){
  623. if(yych <= 'd') goto yy51;
  624. goto yy74;
  625. } else {
  626. if(yych == 't') goto yy75;
  627. goto yy51;
  628. }
  629. }
  630. yy26: yych = *++YYCURSOR;
  631. if(yych == 'B') goto yy71;
  632. if(yych == 'b') goto yy71;
  633. goto yy51;
  634. yy27: yych = *++YYCURSOR;
  635. if(yych == 'O') goto yy64;
  636. if(yych == 'o') goto yy64;
  637. goto yy51;
  638. yy28: yych = *++YYCURSOR;
  639. if(yych == '<') goto yy62;
  640. goto yy29;
  641. yy29:
  642. {
  643. yasm_warn_set(YASM_WARN_UNREC_CHAR,
  644. N_("ignoring unrecognized character `%s'"),
  645. yasm__conv_unprint(s->tok[0]));
  646. goto scan;
  647. }
  648. yy30: yych = *++YYCURSOR;
  649. if(yych == '>') goto yy60;
  650. goto yy29;
  651. yy31: yych = *++YYCURSOR;
  652. if(yych == '/') goto yy58;
  653. goto yy8;
  654. yy32: yych = *++YYCURSOR;
  655. goto yy8;
  656. yy33: yych = *++YYCURSOR;
  657. if(yybm[0+yych] & 2) {
  658. goto yy50;
  659. }
  660. goto yy8;
  661. yy34: yych = *++YYCURSOR;
  662. goto yy35;
  663. yy35:
  664. { RETURN(s->tok[0]); }
  665. yy36: yych = *++YYCURSOR;
  666. if(yych <= '>'){
  667. if(yych <= '-'){
  668. if(yych <= '"') goto yy29;
  669. if(yych <= '$') goto yy56;
  670. goto yy29;
  671. } else {
  672. if(yych == '/') goto yy29;
  673. if(yych <= '9') goto yy56;
  674. goto yy29;
  675. }
  676. } else {
  677. if(yych <= '`'){
  678. if(yych <= 'Z') goto yy56;
  679. if(yych == '_') goto yy56;
  680. goto yy29;
  681. } else {
  682. if(yych <= 'z') goto yy56;
  683. if(yych == '~') goto yy56;
  684. goto yy29;
  685. }
  686. }
  687. yy37: yych = *++YYCURSOR;
  688. if(yych == '@') goto yy52;
  689. goto yy51;
  690. yy38: yych = *++YYCURSOR;
  691. goto yy51;
  692. yy39: yych = *++YYCURSOR;
  693. goto yy49;
  694. yy40:
  695. { goto scan; }
  696. yy41: yych = *++YYCURSOR;
  697. goto yy47;
  698. yy42:
  699. { goto scan; }
  700. yy43: yych = *++YYCURSOR;
  701. goto yy44;
  702. yy44:
  703. { goto endofinput; }
  704. yy45: yych = *++YYCURSOR;
  705. goto yy29;
  706. yy46: ++YYCURSOR;
  707. if(YYLIMIT == YYCURSOR) YYFILL(1);
  708. yych = *YYCURSOR;
  709. goto yy47;
  710. yy47: if(yybm[256+yych] & 128) {
  711. goto yy46;
  712. }
  713. goto yy42;
  714. yy48: ++YYCURSOR;
  715. if(YYLIMIT == YYCURSOR) YYFILL(1);
  716. yych = *YYCURSOR;
  717. goto yy49;
  718. yy49: if(yybm[0+yych] & 1) {
  719. goto yy48;
  720. }
  721. goto yy40;
  722. yy50: ++YYCURSOR;
  723. if(YYLIMIT == YYCURSOR) YYFILL(1);
  724. yych = *YYCURSOR;
  725. goto yy51;
  726. yy51: if(yybm[0+yych] & 2) {
  727. goto yy50;
  728. }
  729. goto yy13;
  730. yy52: yych = *++YYCURSOR;
  731. if(yych <= '>'){
  732. if(yych <= '-'){
  733. if(yych <= '"') goto yy13;
  734. if(yych >= '%') goto yy13;
  735. goto yy53;
  736. } else {
  737. if(yych == '/') goto yy13;
  738. if(yych >= ':') goto yy13;
  739. goto yy53;
  740. }
  741. } else {
  742. if(yych <= '`'){
  743. if(yych <= 'Z') goto yy53;
  744. if(yych != '_') goto yy13;
  745. goto yy53;
  746. } else {
  747. if(yych <= 'z') goto yy53;
  748. if(yych != '~') goto yy13;
  749. goto yy53;
  750. }
  751. }
  752. yy53: ++YYCURSOR;
  753. if(YYLIMIT == YYCURSOR) YYFILL(1);
  754. yych = *YYCURSOR;
  755. goto yy54;
  756. yy54: if(yych <= '>'){
  757. if(yych <= '-'){
  758. if(yych <= '"') goto yy55;
  759. if(yych <= '$') goto yy53;
  760. goto yy55;
  761. } else {
  762. if(yych == '/') goto yy55;
  763. if(yych <= '9') goto yy53;
  764. goto yy55;
  765. }
  766. } else {
  767. if(yych <= '`'){
  768. if(yych <= 'Z') goto yy53;
  769. if(yych == '_') goto yy53;
  770. goto yy55;
  771. } else {
  772. if(yych <= 'z') goto yy53;
  773. if(yych == '~') goto yy53;
  774. goto yy55;
  775. }
  776. }
  777. yy55:
  778. {
  779. RETURN(handle_dot_label(lvalp, TOK, TOKLEN, 0, parser_nasm));
  780. }
  781. yy56: ++YYCURSOR;
  782. if(YYLIMIT == YYCURSOR) YYFILL(1);
  783. yych = *YYCURSOR;
  784. goto yy57;
  785. yy57: if(yych <= '>'){
  786. if(yych <= '-'){
  787. if(yych <= '"') goto yy55;
  788. if(yych <= '$') goto yy56;
  789. goto yy55;
  790. } else {
  791. if(yych == '/') goto yy55;
  792. if(yych <= '9') goto yy56;
  793. goto yy55;
  794. }
  795. } else {
  796. if(yych <= '`'){
  797. if(yych <= 'Z') goto yy56;
  798. if(yych == '_') goto yy56;
  799. goto yy55;
  800. } else {
  801. if(yych <= 'z') goto yy56;
  802. if(yych == '~') goto yy56;
  803. goto yy55;
  804. }
  805. }
  806. yy58: yych = *++YYCURSOR;
  807. goto yy59;
  808. yy59:
  809. { RETURN(SIGNDIV); }
  810. yy60: yych = *++YYCURSOR;
  811. goto yy61;
  812. yy61:
  813. { RETURN(RIGHT_OP); }
  814. yy62: yych = *++YYCURSOR;
  815. goto yy63;
  816. yy63:
  817. { RETURN(LEFT_OP); }
  818. yy64: yych = *++YYCURSOR;
  819. if(yych == 'S') goto yy65;
  820. if(yych != 's') goto yy51;
  821. goto yy65;
  822. yy65: yych = *++YYCURSOR;
  823. if(yych == 'P') goto yy66;
  824. if(yych != 'p') goto yy51;
  825. goto yy66;
  826. yy66: yych = *++YYCURSOR;
  827. if(yych == 'L') goto yy67;
  828. if(yych != 'l') goto yy51;
  829. goto yy67;
  830. yy67: yych = *++YYCURSOR;
  831. if(yych == 'I') goto yy68;
  832. if(yych != 'i') goto yy51;
  833. goto yy68;
  834. yy68: yych = *++YYCURSOR;
  835. if(yych == 'T') goto yy69;
  836. if(yych != 't') goto yy51;
  837. goto yy69;
  838. yy69: yych = *++YYCURSOR;
  839. if(yybm[0+yych] & 2) {
  840. goto yy50;
  841. }
  842. goto yy70;
  843. yy70:
  844. { RETURN(NOSPLIT); }
  845. yy71: yych = *++YYCURSOR;
  846. if(yych == 'S') goto yy72;
  847. if(yych != 's') goto yy51;
  848. goto yy72;
  849. yy72: yych = *++YYCURSOR;
  850. if(yybm[0+yych] & 2) {
  851. goto yy50;
  852. }
  853. goto yy73;
  854. yy73:
  855. { RETURN(ABS); }
  856. yy74: yych = *++YYCURSOR;
  857. if(yych == 'G') goto yy81;
  858. if(yych == 'g') goto yy81;
  859. goto yy51;
  860. yy75: yych = *++YYCURSOR;
  861. if(yych == 'R') goto yy76;
  862. if(yych != 'r') goto yy51;
  863. goto yy76;
  864. yy76: yych = *++YYCURSOR;
  865. if(yych == 'I') goto yy77;
  866. if(yych != 'i') goto yy51;
  867. goto yy77;
  868. yy77: yych = *++YYCURSOR;
  869. if(yych == 'C') goto yy78;
  870. if(yych != 'c') goto yy51;
  871. goto yy78;
  872. yy78: yych = *++YYCURSOR;
  873. if(yych == 'T') goto yy79;
  874. if(yych != 't') goto yy51;
  875. goto yy79;
  876. yy79: yych = *++YYCURSOR;
  877. if(yybm[0+yych] & 2) {
  878. goto yy50;
  879. }
  880. goto yy80;
  881. yy80:
  882. { RETURN(STRICT); }
  883. yy81: yych = *++YYCURSOR;
  884. if(yybm[0+yych] & 2) {
  885. goto yy50;
  886. }
  887. goto yy82;
  888. yy82:
  889. { RETURN(SEG); }
  890. yy83: yych = *++YYCURSOR;
  891. if(yych == 'U') goto yy84;
  892. if(yych != 'u') goto yy51;
  893. goto yy84;
  894. yy84: yych = *++YYCURSOR;
  895. if(yybm[0+yych] & 2) {
  896. goto yy50;
  897. }
  898. goto yy85;
  899. yy85:
  900. { RETURN(EQU); }
  901. yy86: yych = *++YYCURSOR;
  902. if(yych == 'C') goto yy87;
  903. if(yych != 'c') goto yy51;
  904. goto yy87;
  905. yy87: yych = *++YYCURSOR;
  906. if(yych == 'B') goto yy88;
  907. if(yych != 'b') goto yy51;
  908. goto yy88;
  909. yy88: yych = *++YYCURSOR;
  910. if(yych == 'I') goto yy89;
  911. if(yych != 'i') goto yy51;
  912. goto yy89;
  913. yy89: yych = *++YYCURSOR;
  914. if(yych == 'N') goto yy90;
  915. if(yych != 'n') goto yy51;
  916. goto yy90;
  917. yy90: yych = *++YYCURSOR;
  918. if(yybm[0+yych] & 2) {
  919. goto yy50;
  920. }
  921. goto yy91;
  922. yy91:
  923. { RETURN(INCBIN); }
  924. yy92: yych = *++YYCURSOR;
  925. if(yych <= 'S'){
  926. if(yych == 'L') goto yy94;
  927. if(yych <= 'R') goto yy51;
  928. goto yy93;
  929. } else {
  930. if(yych <= 'l'){
  931. if(yych <= 'k') goto yy51;
  932. goto yy94;
  933. } else {
  934. if(yych != 's') goto yy51;
  935. goto yy93;
  936. }
  937. }
  938. yy93: yych = *++YYCURSOR;
  939. switch(yych){
  940. case 'B': case 'b': goto yy96;
  941. case 'D': case 'd': goto yy98;
  942. case 'H': case 'h': goto yy100;
  943. case 'O': case 'o': goto yy101;
  944. case 'Q': case 'q': goto yy103;
  945. case 'T': case 't': goto yy105;
  946. case 'W': case 'w': goto yy107;
  947. case 'Y': case 'y': goto yy109;
  948. default: goto yy51;
  949. }
  950. yy94: yych = *++YYCURSOR;
  951. if(yybm[0+yych] & 2) {
  952. goto yy50;
  953. }
  954. goto yy95;
  955. yy95:
  956. { RETURN(REL); }
  957. yy96: yych = *++YYCURSOR;
  958. if(yybm[0+yych] & 2) {
  959. goto yy50;
  960. }
  961. goto yy97;
  962. yy97:
  963. {
  964. lvalp->int_info = 8;
  965. parser_nasm->state = INSTRUCTION;
  966. RETURN(RESERVE_SPACE);
  967. }
  968. yy98: yych = *++YYCURSOR;
  969. if(yych <= 'Q'){
  970. if(yych <= '.'){
  971. if(yych <= '"') goto yy99;
  972. if(yych <= '$') goto yy50;
  973. if(yych >= '.') goto yy50;
  974. goto yy99;
  975. } else {
  976. if(yych <= '9'){
  977. if(yych >= '0') goto yy50;
  978. goto yy99;
  979. } else {
  980. if(yych <= '>') goto yy99;
  981. if(yych <= 'P') goto yy50;
  982. goto yy113;
  983. }
  984. }
  985. } else {
  986. if(yych <= 'p'){
  987. if(yych <= '^'){
  988. if(yych <= 'Z') goto yy50;
  989. goto yy99;
  990. } else {
  991. if(yych != '`') goto yy50;
  992. goto yy99;
  993. }
  994. } else {
  995. if(yych <= 'z'){
  996. if(yych <= 'q') goto yy113;
  997. goto yy50;
  998. } else {
  999. if(yych == '~') goto yy50;
  1000. goto yy99;
  1001. }
  1002. }
  1003. }
  1004. yy99:
  1005. {
  1006. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
  1007. parser_nasm->state = INSTRUCTION;
  1008. RETURN(RESERVE_SPACE);
  1009. }
  1010. yy100: yych = *++YYCURSOR;
  1011. if(yych == 'W') goto yy111;
  1012. if(yych == 'w') goto yy111;
  1013. goto yy51;
  1014. yy101: yych = *++YYCURSOR;
  1015. if(yybm[0+yych] & 2) {
  1016. goto yy50;
  1017. }
  1018. goto yy102;
  1019. yy102:
  1020. {
  1021. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1022. parser_nasm->state = INSTRUCTION;
  1023. RETURN(RESERVE_SPACE);
  1024. }
  1025. yy103: yych = *++YYCURSOR;
  1026. if(yybm[0+yych] & 2) {
  1027. goto yy50;
  1028. }
  1029. goto yy104;
  1030. yy104:
  1031. {
  1032. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
  1033. parser_nasm->state = INSTRUCTION;
  1034. RETURN(RESERVE_SPACE);
  1035. }
  1036. yy105: yych = *++YYCURSOR;
  1037. if(yybm[0+yych] & 2) {
  1038. goto yy50;
  1039. }
  1040. goto yy106;
  1041. yy106:
  1042. {
  1043. lvalp->int_info = 80;
  1044. parser_nasm->state = INSTRUCTION;
  1045. RETURN(RESERVE_SPACE);
  1046. }
  1047. yy107: yych = *++YYCURSOR;
  1048. if(yybm[0+yych] & 2) {
  1049. goto yy50;
  1050. }
  1051. goto yy108;
  1052. yy108:
  1053. {
  1054. lvalp->int_info = yasm_arch_wordsize(p_object->arch);
  1055. parser_nasm->state = INSTRUCTION;
  1056. RETURN(RESERVE_SPACE);
  1057. }
  1058. yy109: yych = *++YYCURSOR;
  1059. if(yybm[0+yych] & 2) {
  1060. goto yy50;
  1061. }
  1062. goto yy110;
  1063. yy110:
  1064. {
  1065. lvalp->int_info = 256;
  1066. parser_nasm->state = INSTRUCTION;
  1067. RETURN(RESERVE_SPACE);
  1068. }
  1069. yy111: yych = *++YYCURSOR;
  1070. if(yybm[0+yych] & 2) {
  1071. goto yy50;
  1072. }
  1073. goto yy112;
  1074. yy112:
  1075. {
  1076. lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
  1077. parser_nasm->state = INSTRUCTION;
  1078. RETURN(RESERVE_SPACE);
  1079. }
  1080. yy113: yych = *++YYCURSOR;
  1081. if(yybm[0+yych] & 2) {
  1082. goto yy50;
  1083. }
  1084. goto yy114;
  1085. yy114:
  1086. {
  1087. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1088. parser_nasm->state = INSTRUCTION;
  1089. RETURN(RESERVE_SPACE);
  1090. }
  1091. yy115: yych = *++YYCURSOR;
  1092. if(yych == 'O') goto yy116;
  1093. if(yych != 'o') goto yy51;
  1094. goto yy116;
  1095. yy116: yych = *++YYCURSOR;
  1096. if(yych == 'R') goto yy117;
  1097. if(yych != 'r') goto yy51;
  1098. goto yy117;
  1099. yy117: yych = *++YYCURSOR;
  1100. if(yych == 'D') goto yy118;
  1101. if(yych != 'd') goto yy51;
  1102. goto yy118;
  1103. yy118: yych = *++YYCURSOR;
  1104. if(yybm[0+yych] & 2) {
  1105. goto yy50;
  1106. }
  1107. goto yy119;
  1108. yy119:
  1109. {
  1110. lvalp->int_info = 256;
  1111. RETURN(SIZE_OVERRIDE);
  1112. }
  1113. yy120: yych = *++YYCURSOR;
  1114. if(yych == 'O') goto yy121;
  1115. if(yych != 'o') goto yy51;
  1116. goto yy121;
  1117. yy121: yych = *++YYCURSOR;
  1118. if(yych == 'R') goto yy122;
  1119. if(yych != 'r') goto yy51;
  1120. goto yy122;
  1121. yy122: yych = *++YYCURSOR;
  1122. if(yych == 'D') goto yy123;
  1123. if(yych != 'd') goto yy51;
  1124. goto yy123;
  1125. yy123: yych = *++YYCURSOR;
  1126. if(yybm[0+yych] & 2) {
  1127. goto yy50;
  1128. }
  1129. goto yy124;
  1130. yy124:
  1131. {
  1132. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1133. RETURN(SIZE_OVERRIDE);
  1134. }
  1135. yy125: yych = *++YYCURSOR;
  1136. if(yych == 'M') goto yy131;
  1137. if(yych == 'm') goto yy131;
  1138. goto yy51;
  1139. yy126: yych = *++YYCURSOR;
  1140. if(yych == 'O') goto yy127;
  1141. if(yych != 'o') goto yy51;
  1142. goto yy127;
  1143. yy127: yych = *++YYCURSOR;
  1144. if(yych == 'R') goto yy128;
  1145. if(yych != 'r') goto yy51;
  1146. goto yy128;
  1147. yy128: yych = *++YYCURSOR;
  1148. if(yych == 'D') goto yy129;
  1149. if(yych != 'd') goto yy51;
  1150. goto yy129;
  1151. yy129: yych = *++YYCURSOR;
  1152. if(yybm[0+yych] & 2) {
  1153. goto yy50;
  1154. }
  1155. goto yy130;
  1156. yy130:
  1157. { lvalp->int_info = 80; RETURN(SIZE_OVERRIDE); }
  1158. yy131: yych = *++YYCURSOR;
  1159. if(yych == 'E') goto yy132;
  1160. if(yych != 'e') goto yy51;
  1161. goto yy132;
  1162. yy132: yych = *++YYCURSOR;
  1163. if(yych == 'S') goto yy133;
  1164. if(yych != 's') goto yy51;
  1165. goto yy133;
  1166. yy133: yych = *++YYCURSOR;
  1167. if(yybm[0+yych] & 2) {
  1168. goto yy50;
  1169. }
  1170. goto yy134;
  1171. yy134:
  1172. { RETURN(TIMES); }
  1173. yy135: yych = *++YYCURSOR;
  1174. if(yych == 'O') goto yy136;
  1175. if(yych != 'o') goto yy51;
  1176. goto yy136;
  1177. yy136: yych = *++YYCURSOR;
  1178. if(yych == 'R') goto yy137;
  1179. if(yych != 'r') goto yy51;
  1180. goto yy137;
  1181. yy137: yych = *++YYCURSOR;
  1182. if(yych == 'D') goto yy138;
  1183. if(yych != 'd') goto yy51;
  1184. goto yy138;
  1185. yy138: yych = *++YYCURSOR;
  1186. if(yybm[0+yych] & 2) {
  1187. goto yy50;
  1188. }
  1189. goto yy139;
  1190. yy139:
  1191. {
  1192. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
  1193. RETURN(SIZE_OVERRIDE);
  1194. }
  1195. yy140: yych = *++YYCURSOR;
  1196. if(yych == 'N') goto yy141;
  1197. if(yych != 'n') goto yy51;
  1198. goto yy141;
  1199. yy141: yych = *++YYCURSOR;
  1200. if(yych == 'G') goto yy142;
  1201. if(yych != 'g') goto yy51;
  1202. goto yy142;
  1203. yy142: yych = *++YYCURSOR;
  1204. if(yybm[0+yych] & 2) {
  1205. goto yy50;
  1206. }
  1207. goto yy143;
  1208. yy143:
  1209. {
  1210. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
  1211. RETURN(SIZE_OVERRIDE);
  1212. }
  1213. yy144: yych = *++YYCURSOR;
  1214. if(yybm[0+yych] & 2) {
  1215. goto yy50;
  1216. }
  1217. goto yy145;
  1218. yy145:
  1219. {
  1220. lvalp->int_info = 8;
  1221. parser_nasm->state = INSTRUCTION;
  1222. RETURN(DECLARE_DATA);
  1223. }
  1224. yy146: yych = *++YYCURSOR;
  1225. if(yych <= 'Q'){
  1226. if(yych <= '.'){
  1227. if(yych <= '"') goto yy147;
  1228. if(yych <= '$') goto yy50;
  1229. if(yych >= '.') goto yy50;
  1230. goto yy147;
  1231. } else {
  1232. if(yych <= '9'){
  1233. if(yych >= '0') goto yy50;
  1234. goto yy147;
  1235. } else {
  1236. if(yych <= '>') goto yy147;
  1237. if(yych <= 'P') goto yy50;
  1238. goto yy168;
  1239. }
  1240. }
  1241. } else {
  1242. if(yych <= 'p'){
  1243. if(yych <= '^'){
  1244. if(yych <= 'Z') goto yy50;
  1245. goto yy147;
  1246. } else {
  1247. if(yych != '`') goto yy50;
  1248. goto yy147;
  1249. }
  1250. } else {
  1251. if(yych <= 'z'){
  1252. if(yych <= 'q') goto yy168;
  1253. goto yy50;
  1254. } else {
  1255. if(yych == '~') goto yy50;
  1256. goto yy147;
  1257. }
  1258. }
  1259. }
  1260. yy147:
  1261. {
  1262. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
  1263. parser_nasm->state = INSTRUCTION;
  1264. RETURN(DECLARE_DATA);
  1265. }
  1266. yy148: yych = *++YYCURSOR;
  1267. if(yych == 'W') goto yy166;
  1268. if(yych == 'w') goto yy166;
  1269. goto yy51;
  1270. yy149: yych = *++YYCURSOR;
  1271. if(yybm[0+yych] & 2) {
  1272. goto yy50;
  1273. }
  1274. goto yy150;
  1275. yy150:
  1276. {
  1277. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1278. parser_nasm->state = INSTRUCTION;
  1279. RETURN(DECLARE_DATA);
  1280. }
  1281. yy151: yych = *++YYCURSOR;
  1282. if(yych <= 'W'){
  1283. if(yych <= '.'){
  1284. if(yych <= '"') goto yy152;
  1285. if(yych <= '$') goto yy50;
  1286. if(yych >= '.') goto yy50;
  1287. goto yy152;
  1288. } else {
  1289. if(yych <= '9'){
  1290. if(yych >= '0') goto yy50;
  1291. goto yy152;
  1292. } else {
  1293. if(yych <= '>') goto yy152;
  1294. if(yych <= 'V') goto yy50;
  1295. goto yy161;
  1296. }
  1297. }
  1298. } else {
  1299. if(yych <= 'v'){
  1300. if(yych <= '^'){
  1301. if(yych <= 'Z') goto yy50;
  1302. goto yy152;
  1303. } else {
  1304. if(yych != '`') goto yy50;
  1305. goto yy152;
  1306. }
  1307. } else {
  1308. if(yych <= 'z'){
  1309. if(yych <= 'w') goto yy161;
  1310. goto yy50;
  1311. } else {
  1312. if(yych == '~') goto yy50;
  1313. goto yy152;
  1314. }
  1315. }
  1316. }
  1317. yy152:
  1318. {
  1319. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
  1320. parser_nasm->state = INSTRUCTION;
  1321. RETURN(DECLARE_DATA);
  1322. }
  1323. yy153: yych = *++YYCURSOR;
  1324. if(yybm[0+yych] & 2) {
  1325. goto yy50;
  1326. }
  1327. goto yy154;
  1328. yy154:
  1329. {
  1330. lvalp->int_info = 80;
  1331. parser_nasm->state = INSTRUCTION;
  1332. RETURN(DECLARE_DATA);
  1333. }
  1334. yy155: yych = *++YYCURSOR;
  1335. if(yych <= 'O'){
  1336. if(yych <= '.'){
  1337. if(yych <= '"') goto yy156;
  1338. if(yych <= '$') goto yy50;
  1339. if(yych >= '.') goto yy50;
  1340. goto yy156;
  1341. } else {
  1342. if(yych <= '9'){
  1343. if(yych >= '0') goto yy50;
  1344. goto yy156;
  1345. } else {
  1346. if(yych <= '>') goto yy156;
  1347. if(yych <= 'N') goto yy50;
  1348. goto yy159;
  1349. }
  1350. }
  1351. } else {
  1352. if(yych <= 'n'){
  1353. if(yych <= '^'){
  1354. if(yych <= 'Z') goto yy50;
  1355. goto yy156;
  1356. } else {
  1357. if(yych != '`') goto yy50;
  1358. goto yy156;
  1359. }
  1360. } else {
  1361. if(yych <= 'z'){
  1362. if(yych <= 'o') goto yy159;
  1363. goto yy50;
  1364. } else {
  1365. if(yych == '~') goto yy50;
  1366. goto yy156;
  1367. }
  1368. }
  1369. }
  1370. yy156:
  1371. {
  1372. lvalp->int_info = yasm_arch_wordsize(p_object->arch);
  1373. parser_nasm->state = INSTRUCTION;
  1374. RETURN(DECLARE_DATA);
  1375. }
  1376. yy157: yych = *++YYCURSOR;
  1377. if(yybm[0+yych] & 2) {
  1378. goto yy50;
  1379. }
  1380. goto yy158;
  1381. yy158:
  1382. {
  1383. lvalp->int_info = 256;
  1384. parser_nasm->state = INSTRUCTION;
  1385. RETURN(DECLARE_DATA);
  1386. }
  1387. yy159: yych = *++YYCURSOR;
  1388. if(yych == 'R') goto yy160;
  1389. if(yych != 'r') goto yy51;
  1390. goto yy160;
  1391. yy160: yych = *++YYCURSOR;
  1392. if(yych == 'D') goto yy142;
  1393. if(yych == 'd') goto yy142;
  1394. goto yy51;
  1395. yy161: yych = *++YYCURSOR;
  1396. if(yych == 'O') goto yy162;
  1397. if(yych != 'o') goto yy51;
  1398. goto yy162;
  1399. yy162: yych = *++YYCURSOR;
  1400. if(yych == 'R') goto yy163;
  1401. if(yych != 'r') goto yy51;
  1402. goto yy163;
  1403. yy163: yych = *++YYCURSOR;
  1404. if(yych == 'D') goto yy164;
  1405. if(yych != 'd') goto yy51;
  1406. goto yy164;
  1407. yy164: yych = *++YYCURSOR;
  1408. if(yybm[0+yych] & 2) {
  1409. goto yy50;
  1410. }
  1411. goto yy165;
  1412. yy165:
  1413. {
  1414. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1415. RETURN(SIZE_OVERRIDE);
  1416. }
  1417. yy166: yych = *++YYCURSOR;
  1418. if(yybm[0+yych] & 2) {
  1419. goto yy50;
  1420. }
  1421. goto yy167;
  1422. yy167:
  1423. {
  1424. lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
  1425. parser_nasm->state = INSTRUCTION;
  1426. RETURN(DECLARE_DATA);
  1427. }
  1428. yy168: yych = *++YYCURSOR;
  1429. if(yybm[0+yych] & 2) {
  1430. goto yy50;
  1431. }
  1432. goto yy169;
  1433. yy169:
  1434. {
  1435. lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
  1436. parser_nasm->state = INSTRUCTION;
  1437. RETURN(DECLARE_DATA);
  1438. }
  1439. yy170: yych = *++YYCURSOR;
  1440. if(yych == 'R') goto yy174;
  1441. if(yych == 'r') goto yy174;
  1442. goto yy51;
  1443. yy171: yych = *++YYCURSOR;
  1444. if(yych == 'T') goto yy172;
  1445. if(yych != 't') goto yy51;
  1446. goto yy172;
  1447. yy172: yych = *++YYCURSOR;
  1448. if(yybm[0+yych] & 2) {
  1449. goto yy50;
  1450. }
  1451. goto yy173;
  1452. yy173:
  1453. { RETURN(WRT); }
  1454. yy174: yych = *++YYCURSOR;
  1455. if(yych == 'D') goto yy175;
  1456. if(yych != 'd') goto yy51;
  1457. goto yy175;
  1458. yy175: yych = *++YYCURSOR;
  1459. if(yybm[0+yych] & 2) {
  1460. goto yy50;
  1461. }
  1462. goto yy176;
  1463. yy176:
  1464. {
  1465. lvalp->int_info = yasm_arch_wordsize(p_object->arch);
  1466. RETURN(SIZE_OVERRIDE);
  1467. }
  1468. yy177: yych = *++YYCURSOR;
  1469. if(yych == 'O') goto yy178;
  1470. if(yych != 'o') goto yy51;
  1471. goto yy178;
  1472. yy178: yych = *++YYCURSOR;
  1473. if(yych == 'R') goto yy179;
  1474. if(yych != 'r') goto yy51;
  1475. goto yy179;
  1476. yy179: yych = *++YYCURSOR;
  1477. if(yych == 'D') goto yy180;
  1478. if(yych != 'd') goto yy51;
  1479. goto yy180;
  1480. yy180: yych = *++YYCURSOR;
  1481. if(yybm[0+yych] & 2) {
  1482. goto yy50;
  1483. }
  1484. goto yy181;
  1485. yy181:
  1486. {
  1487. lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
  1488. RETURN(SIZE_OVERRIDE);
  1489. }
  1490. yy182: yych = *++YYCURSOR;
  1491. if(yych == 'T') goto yy183;
  1492. if(yych != 't') goto yy51;
  1493. goto yy183;
  1494. yy183: yych = *++YYCURSOR;
  1495. if(yych == 'E') goto yy184;
  1496. if(yych != 'e') goto yy51;
  1497. goto yy184;
  1498. yy184: yych = *++YYCURSOR;
  1499. if(yybm[0+yych] & 2) {
  1500. goto yy50;
  1501. }
  1502. goto yy185;
  1503. yy185:
  1504. { lvalp->int_info = 8; RETURN(SIZE_OVERRIDE); }
  1505. yy186: yych = *++YYCURSOR;
  1506. goto yy187;
  1507. yy187:
  1508. { RETURN(SIGNMOD); }
  1509. yy188: yych = *++YYCURSOR;
  1510. if(yych == 'i') goto yy190;
  1511. goto yy189;
  1512. yy189: YYCURSOR = YYMARKER;
  1513. switch(yyaccept){
  1514. case 0: goto yy3;
  1515. case 3: goto yy225;
  1516. case 2: goto yy205;
  1517. case 1: goto yy8;
  1518. }
  1519. yy190: yych = *++YYCURSOR;
  1520. if(yych != 'n') goto yy189;
  1521. goto yy191;
  1522. yy191: yych = *++YYCURSOR;
  1523. if(yych != 'e') goto yy189;
  1524. goto yy192;
  1525. yy192: yych = *++YYCURSOR;
  1526. goto yy193;
  1527. yy193:
  1528. {
  1529. parser_nasm->state = LINECHG;
  1530. linechg_numcount = 0;
  1531. RETURN(LINE);
  1532. }
  1533. yy194: ++YYCURSOR;
  1534. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1535. yych = *YYCURSOR;
  1536. goto yy195;
  1537. yy195: if(yych <= '>'){
  1538. if(yych <= '-'){
  1539. if(yych <= '"') goto yy196;
  1540. if(yych <= '$') goto yy194;
  1541. goto yy196;
  1542. } else {
  1543. if(yych == '/') goto yy196;
  1544. if(yych <= '9') goto yy194;
  1545. goto yy196;
  1546. }
  1547. } else {
  1548. if(yych <= '`'){
  1549. if(yych <= 'Z') goto yy194;
  1550. if(yych == '_') goto yy194;
  1551. goto yy196;
  1552. } else {
  1553. if(yych <= 'z') goto yy194;
  1554. if(yych == '~') goto yy194;
  1555. goto yy196;
  1556. }
  1557. }
  1558. yy196:
  1559. {
  1560. if (TOK[1] == '.' ||
  1561. (parser_nasm->tasm && TOK[1] == '@' && TOK[2] == '@')) {
  1562. /* handle like .label */
  1563. RETURN(handle_dot_label(lvalp, TOK, TOKLEN, 1, parser_nasm));
  1564. }
  1565. lvalp->str_val = yasm__xstrndup(TOK+1, TOKLEN-1);
  1566. RETURN(ID);
  1567. }
  1568. yy197: yych = *++YYCURSOR;
  1569. if(yych <= '>'){
  1570. if(yych <= '-'){
  1571. if(yych <= '"') goto yy198;
  1572. if(yych <= '$') goto yy194;
  1573. goto yy198;
  1574. } else {
  1575. if(yych == '/') goto yy198;
  1576. if(yych <= '9') goto yy194;
  1577. goto yy198;
  1578. }
  1579. } else {
  1580. if(yych <= '`'){
  1581. if(yych <= 'Z') goto yy194;
  1582. if(yych == '_') goto yy194;
  1583. goto yy198;
  1584. } else {
  1585. if(yych <= 'z') goto yy194;
  1586. if(yych == '~') goto yy194;
  1587. goto yy198;
  1588. }
  1589. }
  1590. yy198:
  1591. { RETURN(START_SECTION_ID); }
  1592. yy199: yych = *++YYCURSOR;
  1593. if(yybm[0+yych] & 4) {
  1594. goto yy200;
  1595. }
  1596. goto yy195;
  1597. yy200: ++YYCURSOR;
  1598. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1599. yych = *YYCURSOR;
  1600. goto yy201;
  1601. yy201: if(yybm[0+yych] & 4) {
  1602. goto yy200;
  1603. }
  1604. if(yych <= '>'){
  1605. if(yych <= '$'){
  1606. if(yych >= '#') goto yy194;
  1607. goto yy202;
  1608. } else {
  1609. if(yych == '.') goto yy194;
  1610. goto yy202;
  1611. }
  1612. } else {
  1613. if(yych <= 'z'){
  1614. if(yych <= 'Z') goto yy194;
  1615. if(yych >= 'g') goto yy194;
  1616. goto yy202;
  1617. } else {
  1618. if(yych == '~') goto yy194;
  1619. goto yy202;
  1620. }
  1621. }
  1622. yy202:
  1623. {
  1624. savech = s->tok[TOKLEN];
  1625. s->tok[TOKLEN] = '\0';
  1626. if (s->tok[1] == 'x' || s->tok[1] == 'X')
  1627. /* skip 0 and x */
  1628. lvalp->intn = yasm_intnum_create_hex(TOK+2);
  1629. else
  1630. /* don't skip 0 */
  1631. lvalp->intn = yasm_intnum_create_hex(TOK+1);
  1632. s->tok[TOKLEN] = savech;
  1633. RETURN(INTNUM);
  1634. }
  1635. yy203: yyaccept = 2;
  1636. YYMARKER = ++YYCURSOR;
  1637. if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
  1638. yych = *YYCURSOR;
  1639. goto yy204;
  1640. yy204: if(yybm[0+yych] & 8) {
  1641. goto yy203;
  1642. }
  1643. if(yych == 'E') goto yy212;
  1644. if(yych == 'e') goto yy212;
  1645. goto yy205;
  1646. yy205:
  1647. {
  1648. savech = s->tok[TOKLEN];
  1649. s->tok[TOKLEN] = '\0';
  1650. lvalp->flt = yasm_floatnum_create(TOK);
  1651. s->tok[TOKLEN] = savech;
  1652. RETURN(FLTNUM);
  1653. }
  1654. yy206: yyaccept = 0;
  1655. YYMARKER = ++YYCURSOR;
  1656. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1657. yych = *YYCURSOR;
  1658. goto yy207;
  1659. yy207: if(yych <= 'G'){
  1660. if(yych <= '/'){
  1661. if(yych == '.') goto yy203;
  1662. goto yy3;
  1663. } else {
  1664. if(yych <= '9') goto yy206;
  1665. if(yych <= '@') goto yy3;
  1666. if(yych >= 'G') goto yy3;
  1667. goto yy208;
  1668. }
  1669. } else {
  1670. if(yych <= '`'){
  1671. if(yych <= 'H') goto yy210;
  1672. if(yych != '_') goto yy3;
  1673. goto yy208;
  1674. } else {
  1675. if(yych <= 'f') goto yy208;
  1676. if(yych == 'h') goto yy210;
  1677. goto yy3;
  1678. }
  1679. }
  1680. yy208: ++YYCURSOR;
  1681. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1682. yych = *YYCURSOR;
  1683. goto yy209;
  1684. yy209: if(yych <= 'H'){
  1685. if(yych <= '@'){
  1686. if(yych <= '/') goto yy189;
  1687. if(yych <= '9') goto yy208;
  1688. goto yy189;
  1689. } else {
  1690. if(yych <= 'F') goto yy208;
  1691. if(yych <= 'G') goto yy189;
  1692. goto yy210;
  1693. }
  1694. } else {
  1695. if(yych <= '`'){
  1696. if(yych == '_') goto yy208;
  1697. goto yy189;
  1698. } else {
  1699. if(yych <= 'f') goto yy208;
  1700. if(yych != 'h') goto yy189;
  1701. goto yy210;
  1702. }
  1703. }
  1704. yy210: yych = *++YYCURSOR;
  1705. goto yy211;
  1706. yy211:
  1707. {
  1708. s->tok[TOKLEN-1] = '\0'; /* strip off 'h' */
  1709. lvalp->intn = yasm_intnum_create_hex(TOK);
  1710. RETURN(INTNUM);
  1711. }
  1712. yy212: yych = *++YYCURSOR;
  1713. if(yych <= ','){
  1714. if(yych != '+') goto yy189;
  1715. goto yy213;
  1716. } else {
  1717. if(yych <= '-') goto yy213;
  1718. if(yych <= '/') goto yy189;
  1719. if(yych <= '9') goto yy214;
  1720. goto yy189;
  1721. }
  1722. yy213: yych = *++YYCURSOR;
  1723. if(yych <= '/') goto yy189;
  1724. if(yych >= ':') goto yy189;
  1725. goto yy214;
  1726. yy214: ++YYCURSOR;
  1727. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1728. yych = *YYCURSOR;
  1729. goto yy215;
  1730. yy215: if(yych <= '/') goto yy205;
  1731. if(yych <= '9') goto yy214;
  1732. goto yy205;
  1733. yy216: yyaccept = 0;
  1734. YYMARKER = ++YYCURSOR;
  1735. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1736. yych = *YYCURSOR;
  1737. goto yy217;
  1738. yy217: if(yybm[0+yych] & 16) {
  1739. goto yy216;
  1740. }
  1741. if(yych <= 'P'){
  1742. if(yych <= '@'){
  1743. if(yych <= '.'){
  1744. if(yych <= '-') goto yy3;
  1745. goto yy203;
  1746. } else {
  1747. if(yych <= '/') goto yy3;
  1748. if(yych <= '9') goto yy206;
  1749. goto yy3;
  1750. }
  1751. } else {
  1752. if(yych <= 'H'){
  1753. if(yych <= 'F') goto yy208;
  1754. if(yych <= 'G') goto yy3;
  1755. goto yy210;
  1756. } else {
  1757. if(yych == 'O') goto yy220;
  1758. goto yy3;
  1759. }
  1760. }
  1761. } else {
  1762. if(yych <= 'g'){
  1763. if(yych <= '_'){
  1764. if(yych <= 'Q') goto yy220;
  1765. if(yych <= '^') goto yy3;
  1766. goto yy218;
  1767. } else {
  1768. if(yych <= '`') goto yy3;
  1769. if(yych <= 'f') goto yy208;
  1770. goto yy3;
  1771. }
  1772. } else {
  1773. if(yych <= 'o'){
  1774. if(yych <= 'h') goto yy210;
  1775. if(yych <= 'n') goto yy3;
  1776. goto yy220;
  1777. } else {
  1778. if(yych == 'q') goto yy220;
  1779. goto yy3;
  1780. }
  1781. }
  1782. }
  1783. yy218: ++YYCURSOR;
  1784. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1785. yych = *YYCURSOR;
  1786. goto yy219;
  1787. yy219: if(yybm[0+yych] & 32) {
  1788. goto yy218;
  1789. }
  1790. if(yych <= 'P'){
  1791. if(yych <= 'F'){
  1792. if(yych <= '7') goto yy189;
  1793. if(yych <= '9') goto yy208;
  1794. if(yych <= '@') goto yy189;
  1795. goto yy208;
  1796. } else {
  1797. if(yych <= 'H'){
  1798. if(yych <= 'G') goto yy189;
  1799. goto yy210;
  1800. } else {
  1801. if(yych != 'O') goto yy189;
  1802. goto yy220;
  1803. }
  1804. }
  1805. } else {
  1806. if(yych <= 'h'){
  1807. if(yych <= '`'){
  1808. if(yych >= 'R') goto yy189;
  1809. goto yy220;
  1810. } else {
  1811. if(yych <= 'f') goto yy208;
  1812. if(yych <= 'g') goto yy189;
  1813. goto yy210;
  1814. }
  1815. } else {
  1816. if(yych <= 'o'){
  1817. if(yych <= 'n') goto yy189;
  1818. goto yy220;
  1819. } else {
  1820. if(yych != 'q') goto yy189;
  1821. goto yy220;
  1822. }
  1823. }
  1824. }
  1825. yy220: yych = *++YYCURSOR;
  1826. goto yy221;
  1827. yy221:
  1828. {
  1829. s->tok[TOKLEN-1] = '\0'; /* strip off 'q' or 'o' */
  1830. lvalp->intn = yasm_intnum_create_oct(TOK);
  1831. RETURN(INTNUM);
  1832. }
  1833. yy222: yyaccept = 0;
  1834. YYMARKER = ++YYCURSOR;
  1835. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  1836. yych = *YYCURSOR;
  1837. goto yy223;
  1838. yy223: if(yybm[0+yych] & 64) {
  1839. goto yy222;
  1840. }
  1841. switch(yych){
  1842. case '.': goto yy203;
  1843. case '0':
  1844. case '1':
  1845. case '2':
  1846. case '3':
  1847. case '4':
  1848. case '5':
  1849. case '6':
  1850. case '7': goto yy216;
  1851. case '8':
  1852. case '9': goto yy206;
  1853. case 'A': case 'C':
  1854. case 'D':
  1855. case 'E':
  1856. case 'F': case 'a': case 'c':
  1857. case 'd':
  1858. case 'e':
  1859. case 'f': goto yy208;
  1860. case 'B': case 'b': goto yy224;
  1861. case 'H': case 'h': goto yy210;
  1862. case 'O': case 'Q': case 'o': case 'q': goto yy220;
  1863. case '_': goto yy226;
  1864. default: goto yy3;
  1865. }
  1866. yy224: yyaccept = 3;
  1867. yych = *(YYMARKER = ++YYCURSOR);
  1868. if(yych <= 'H'){
  1869. if(yych <= '@'){
  1870. if(yych <= '/') goto yy225;
  1871. if(yych <= '9') goto yy208;
  1872. goto yy225;
  1873. } else {
  1874. if(yych <= 'F') goto yy208;
  1875. if(yych >= 'H') goto yy210;
  1876. goto yy225;
  1877. }
  1878. } else {
  1879. if(yych <= '`'){
  1880. if(yych == '_') goto yy208;
  1881. goto yy225;
  1882. } else {
  1883. if(yych <= 'f') goto yy208;
  1884. if(yych == 'h') goto yy210;
  1885. goto yy225;
  1886. }
  1887. }
  1888. yy225:
  1889. {
  1890. s->tok[TOKLEN-1] = '\0'; /* strip off 'b' */
  1891. lvalp->intn = yasm_intnum_create_bin(TOK);
  1892. RETURN(INTNUM);
  1893. }
  1894. yy226: ++YYCURSOR;
  1895. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  1896. yych = *YYCURSOR;
  1897. goto yy227;
  1898. yy227: if(yybm[0+yych] & 128) {
  1899. goto yy226;
  1900. }
  1901. switch(yych){
  1902. case '2':
  1903. case '3':
  1904. case '4':
  1905. case '5':
  1906. case '6':
  1907. case '7': goto yy218;
  1908. case '8':
  1909. case '9': case 'A': case 'C':
  1910. case 'D':
  1911. case 'E':
  1912. case 'F': case 'a': case 'c':
  1913. case 'd':
  1914. case 'e':
  1915. case 'f': goto yy208;
  1916. case 'B': case 'b': goto yy224;
  1917. case 'H': case 'h': goto yy210;
  1918. case 'O': case 'Q': case 'o': case 'q': goto yy220;
  1919. default: goto yy189;
  1920. }
  1921. yy228: yych = *++YYCURSOR;
  1922. if(yych <= 'F'){
  1923. if(yych <= '/') goto yy189;
  1924. if(yych <= '9') goto yy229;
  1925. if(yych <= '@') goto yy189;
  1926. goto yy229;
  1927. } else {
  1928. if(yych <= '_'){
  1929. if(yych <= '^') goto yy189;
  1930. goto yy229;
  1931. } else {
  1932. if(yych <= '`') goto yy189;
  1933. if(yych >= 'g') goto yy189;
  1934. goto yy229;
  1935. }
  1936. }
  1937. yy229: ++YYCURSOR;
  1938. if(YYLIMIT == YYCURSOR) YYFILL(1);
  1939. yych = *YYCURSOR;
  1940. goto yy230;
  1941. yy230: if(yych <= 'F'){
  1942. if(yych <= '/') goto yy202;
  1943. if(yych <= '9') goto yy229;
  1944. if(yych <= '@') goto yy202;
  1945. goto yy229;
  1946. } else {
  1947. if(yych <= '_'){
  1948. if(yych <= '^') goto yy202;
  1949. goto yy229;
  1950. } else {
  1951. if(yych <= '`') goto yy202;
  1952. if(yych <= 'f') goto yy229;
  1953. goto yy202;
  1954. }
  1955. }
  1956. }
  1957. }
  1958. /* %line linenum+lineinc filename */
  1959. linechg:
  1960. SCANINIT();
  1961. if (*cursor == '\0')
  1962. goto endofinput;
  1963. {
  1964. static unsigned char yybm[] = {
  1965. 0, 0, 0, 0, 0, 0, 0, 0,
  1966. 0, 64, 0, 0, 0, 64, 0, 0,
  1967. 0, 0, 0, 0, 0, 0, 0, 0,
  1968. 0, 0, 0, 0, 0, 0, 0, 0,
  1969. 64, 0, 0, 0, 0, 0, 0, 0,
  1970. 0, 0, 0, 0, 0, 0, 0, 0,
  1971. 128, 128, 128, 128, 128, 128, 128, 128,
  1972. 128, 128, 0, 0, 0, 0, 0, 0,
  1973. 0, 0, 0, 0, 0, 0, 0, 0,
  1974. 0, 0, 0, 0, 0, 0, 0, 0,
  1975. 0, 0, 0, 0, 0, 0, 0, 0,
  1976. 0, 0, 0, 0, 0, 0, 0, 0,
  1977. 0, 0, 0, 0, 0, 0, 0, 0,
  1978. 0, 0, 0, 0, 0, 0, 0, 0,
  1979. 0, 0, 0, 0, 0, 0, 0, 0,
  1980. 0, 0, 0, 0, 0, 0, 0, 0,
  1981. 0, 0, 0, 0, 0, 0, 0, 0,
  1982. 0, 0, 0, 0, 0, 0, 0, 0,
  1983. 0, 0, 0, 0, 0, 0, 0, 0,
  1984. 0, 0, 0, 0, 0, 0, 0, 0,
  1985. 0, 0, 0, 0, 0, 0, 0, 0,
  1986. 0, 0, 0, 0, 0, 0, 0, 0,
  1987. 0, 0, 0, 0, 0, 0, 0, 0,
  1988. 0, 0, 0, 0, 0, 0, 0, 0,
  1989. 0, 0, 0, 0, 0, 0, 0, 0,
  1990. 0, 0, 0, 0, 0, 0, 0, 0,
  1991. 0, 0, 0, 0, 0, 0, 0, 0,
  1992. 0, 0, 0, 0, 0, 0, 0, 0,
  1993. 0, 0, 0, 0, 0, 0, 0, 0,
  1994. 0, 0, 0, 0, 0, 0, 0, 0,
  1995. 0, 0, 0, 0, 0, 0, 0, 0,
  1996. 0, 0, 0, 0, 0, 0, 0, 0,
  1997. };
  1998. {
  1999. YYCTYPE yych;
  2000. goto yy231;
  2001. ++YYCURSOR;
  2002. yy231:
  2003. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  2004. yych = *YYCURSOR;
  2005. if(yych <= '\037'){
  2006. if(yych <= '\t'){
  2007. if(yych <= '\000') goto yy235;
  2008. if(yych <= '\b') goto yy241;
  2009. goto yy239;
  2010. } else {
  2011. if(yych == '\r') goto yy239;
  2012. goto yy241;
  2013. }
  2014. } else {
  2015. if(yych <= '+'){
  2016. if(yych <= ' ') goto yy239;
  2017. if(yych <= '*') goto yy241;
  2018. goto yy237;
  2019. } else {
  2020. if(yych <= '/') goto yy241;
  2021. if(yych >= ':') goto yy241;
  2022. goto yy233;
  2023. }
  2024. }
  2025. yy233: yych = *++YYCURSOR;
  2026. goto yy246;
  2027. yy234:
  2028. {
  2029. linechg_numcount++;
  2030. savech = s->tok[TOKLEN];
  2031. s->tok[TOKLEN] = '\0';
  2032. lvalp->intn = yasm_intnum_create_dec(TOK);
  2033. s->tok[TOKLEN] = savech;
  2034. RETURN(INTNUM);
  2035. }
  2036. yy235: yych = *++YYCURSOR;
  2037. goto yy236;
  2038. yy236:
  2039. { goto endofinput; }
  2040. yy237: yych = *++YYCURSOR;
  2041. goto yy238;
  2042. yy238:
  2043. {
  2044. RETURN(s->tok[0]);
  2045. }
  2046. yy239: yych = *++YYCURSOR;
  2047. goto yy244;
  2048. yy240:
  2049. {
  2050. if (linechg_numcount == 2) {
  2051. parser_nasm->state = LINECHG2;
  2052. goto linechg2;
  2053. }
  2054. goto linechg;
  2055. }
  2056. yy241: yych = *++YYCURSOR;
  2057. goto yy242;
  2058. yy242:
  2059. {
  2060. yasm_warn_set(YASM_WARN_UNREC_CHAR,
  2061. N_("ignoring unrecognized character `%s'"),
  2062. yasm__conv_unprint(s->tok[0]));
  2063. goto linechg;
  2064. }
  2065. yy243: ++YYCURSOR;
  2066. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2067. yych = *YYCURSOR;
  2068. goto yy244;
  2069. yy244: if(yybm[0+yych] & 64) {
  2070. goto yy243;
  2071. }
  2072. goto yy240;
  2073. yy245: ++YYCURSOR;
  2074. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2075. yych = *YYCURSOR;
  2076. goto yy246;
  2077. yy246: if(yybm[0+yych] & 128) {
  2078. goto yy245;
  2079. }
  2080. goto yy234;
  2081. }
  2082. }
  2083. linechg2:
  2084. SCANINIT();
  2085. if (*cursor == '\0')
  2086. goto endofinput;
  2087. {
  2088. static unsigned char yybm[] = {
  2089. 0, 128, 128, 128, 128, 128, 128, 128,
  2090. 128, 128, 128, 128, 128, 128, 128, 128,
  2091. 128, 128, 128, 128, 128, 128, 128, 128,
  2092. 128, 128, 128, 128, 128, 128, 128, 128,
  2093. 128, 128, 128, 128, 128, 128, 128, 128,
  2094. 128, 128, 128, 128, 128, 128, 128, 128,
  2095. 128, 128, 128, 128, 128, 128, 128, 128,
  2096. 128, 128, 128, 128, 128, 128, 128, 128,
  2097. 128, 128, 128, 128, 128, 128, 128, 128,
  2098. 128, 128, 128, 128, 128, 128, 128, 128,
  2099. 128, 128, 128, 128, 128, 128, 128, 128,
  2100. 128, 128, 128, 128, 128, 128, 128, 128,
  2101. 128, 128, 128, 128, 128, 128, 128, 128,
  2102. 128, 128, 128, 128, 128, 128, 128, 128,
  2103. 128, 128, 128, 128, 128, 128, 128, 128,
  2104. 128, 128, 128, 128, 128, 128, 128, 128,
  2105. 128, 128, 128, 128, 128, 128, 128, 128,
  2106. 128, 128, 128, 128, 128, 128, 128, 128,
  2107. 128, 128, 128, 128, 128, 128, 128, 128,
  2108. 128, 128, 128, 128, 128, 128, 128, 128,
  2109. 128, 128, 128, 128, 128, 128, 128, 128,
  2110. 128, 128, 128, 128, 128, 128, 128, 128,
  2111. 128, 128, 128, 128, 128, 128, 128, 128,
  2112. 128, 128, 128, 128, 128, 128, 128, 128,
  2113. 128, 128, 128, 128, 128, 128, 128, 128,
  2114. 128, 128, 128, 128, 128, 128, 128, 128,
  2115. 128, 128, 128, 128, 128, 128, 128, 128,
  2116. 128, 128, 128, 128, 128, 128, 128, 128,
  2117. 128, 128, 128, 128, 128, 128, 128, 128,
  2118. 128, 128, 128, 128, 128, 128, 128, 128,
  2119. 128, 128, 128, 128, 128, 128, 128, 128,
  2120. 128, 128, 128, 128, 128, 128, 128, 128,
  2121. };
  2122. {
  2123. YYCTYPE yych;
  2124. goto yy247;
  2125. ++YYCURSOR;
  2126. yy247:
  2127. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  2128. yych = *YYCURSOR;
  2129. if(yych <= '\000') goto yy249;
  2130. if(yych == '\r') goto yy251;
  2131. goto yy253;
  2132. yy249: yych = *++YYCURSOR;
  2133. goto yy250;
  2134. yy250:
  2135. { goto endofinput; }
  2136. yy251: yych = *++YYCURSOR;
  2137. if(yybm[0+yych] & 128) {
  2138. goto yy253;
  2139. }
  2140. goto yy252;
  2141. yy252:
  2142. { goto linechg2; }
  2143. yy253: ++YYCURSOR;
  2144. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2145. yych = *YYCURSOR;
  2146. goto yy254;
  2147. yy254: if(yybm[0+yych] & 128) {
  2148. goto yy253;
  2149. }
  2150. goto yy255;
  2151. yy255:
  2152. {
  2153. parser_nasm->state = LINECHG;
  2154. lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
  2155. RETURN(FILENAME);
  2156. }
  2157. }
  2158. }
  2159. /* directive: [name value] */
  2160. directive:
  2161. SCANINIT();
  2162. if (*cursor == '\0')
  2163. goto endofinput;
  2164. {
  2165. static unsigned char yybm[] = {
  2166. 0, 0, 0, 0, 0, 0, 0, 0,
  2167. 0, 0, 0, 0, 0, 0, 0, 0,
  2168. 0, 0, 0, 0, 0, 0, 0, 0,
  2169. 0, 0, 0, 0, 0, 0, 0, 0,
  2170. 0, 0, 0, 0, 0, 0, 0, 0,
  2171. 0, 0, 0, 0, 0, 0, 0, 0,
  2172. 128, 128, 128, 128, 128, 128, 128, 128,
  2173. 128, 128, 0, 0, 0, 0, 0, 0,
  2174. 0, 128, 128, 128, 128, 128, 128, 128,
  2175. 128, 128, 128, 128, 128, 128, 128, 128,
  2176. 128, 128, 128, 128, 128, 128, 128, 128,
  2177. 128, 128, 128, 0, 0, 0, 0, 128,
  2178. 0, 128, 128, 128, 128, 128, 128, 128,
  2179. 128, 128, 128, 128, 128, 128, 128, 128,
  2180. 128, 128, 128, 128, 128, 128, 128, 128,
  2181. 128, 128, 128, 0, 0, 0, 0, 0,
  2182. 0, 0, 0, 0, 0, 0, 0, 0,
  2183. 0, 0, 0, 0, 0, 0, 0, 0,
  2184. 0, 0, 0, 0, 0, 0, 0, 0,
  2185. 0, 0, 0, 0, 0, 0, 0, 0,
  2186. 0, 0, 0, 0, 0, 0, 0, 0,
  2187. 0, 0, 0, 0, 0, 0, 0, 0,
  2188. 0, 0, 0, 0, 0, 0, 0, 0,
  2189. 0, 0, 0, 0, 0, 0, 0, 0,
  2190. 0, 0, 0, 0, 0, 0, 0, 0,
  2191. 0, 0, 0, 0, 0, 0, 0, 0,
  2192. 0, 0, 0, 0, 0, 0, 0, 0,
  2193. 0, 0, 0, 0, 0, 0, 0, 0,
  2194. 0, 0, 0, 0, 0, 0, 0, 0,
  2195. 0, 0, 0, 0, 0, 0, 0, 0,
  2196. 0, 0, 0, 0, 0, 0, 0, 0,
  2197. 0, 0, 0, 0, 0, 0, 0, 0,
  2198. };
  2199. {
  2200. YYCTYPE yych;
  2201. goto yy256;
  2202. ++YYCURSOR;
  2203. yy256:
  2204. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  2205. yych = *YYCURSOR;
  2206. if(yych <= ']'){
  2207. if(yych <= '@'){
  2208. if(yych >= '\001') goto yy263;
  2209. goto yy258;
  2210. } else {
  2211. if(yych <= 'Z') goto yy261;
  2212. if(yych <= '\\') goto yy263;
  2213. goto yy260;
  2214. }
  2215. } else {
  2216. if(yych <= '_'){
  2217. if(yych <= '^') goto yy263;
  2218. goto yy261;
  2219. } else {
  2220. if(yych <= '`') goto yy263;
  2221. if(yych <= 'z') goto yy261;
  2222. goto yy263;
  2223. }
  2224. }
  2225. yy258: yych = *++YYCURSOR;
  2226. goto yy259;
  2227. yy259:
  2228. { goto endofinput; }
  2229. yy260: yych = *++YYCURSOR;
  2230. goto yy259;
  2231. yy261: yych = *++YYCURSOR;
  2232. goto yy266;
  2233. yy262:
  2234. {
  2235. lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
  2236. if (yasm__strcasecmp(lvalp->str_val, "section") == 0 ||
  2237. yasm__strcasecmp(lvalp->str_val, "segment") == 0)
  2238. parser_nasm->state = SECTION_DIRECTIVE;
  2239. else
  2240. parser_nasm->state = DIRECTIVE2;
  2241. RETURN(DIRECTIVE_NAME);
  2242. }
  2243. yy263: yych = *++YYCURSOR;
  2244. goto yy264;
  2245. yy264:
  2246. {
  2247. yasm_warn_set(YASM_WARN_UNREC_CHAR,
  2248. N_("ignoring unrecognized character `%s'"),
  2249. yasm__conv_unprint(s->tok[0]));
  2250. goto directive;
  2251. }
  2252. yy265: ++YYCURSOR;
  2253. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2254. yych = *YYCURSOR;
  2255. goto yy266;
  2256. yy266: if(yybm[0+yych] & 128) {
  2257. goto yy265;
  2258. }
  2259. goto yy262;
  2260. }
  2261. }
  2262. /* section directive (the section name portion thereof) */
  2263. section_directive:
  2264. SCANINIT();
  2265. if (*cursor == '\0')
  2266. goto endofinput;
  2267. {
  2268. static unsigned char yybm[] = {
  2269. 0, 0, 0, 0, 0, 0, 0, 0,
  2270. 0, 64, 0, 0, 0, 64, 0, 0,
  2271. 0, 0, 0, 0, 0, 0, 0, 0,
  2272. 0, 0, 0, 0, 0, 0, 0, 0,
  2273. 64, 0, 0, 128, 128, 0, 0, 0,
  2274. 0, 0, 0, 0, 0, 128, 128, 0,
  2275. 128, 128, 128, 128, 128, 128, 128, 128,
  2276. 128, 128, 0, 0, 0, 0, 0, 128,
  2277. 128, 128, 128, 128, 128, 128, 128, 128,
  2278. 128, 128, 128, 128, 128, 128, 128, 128,
  2279. 128, 128, 128, 128, 128, 128, 128, 128,
  2280. 128, 128, 128, 0, 0, 0, 0, 128,
  2281. 0, 128, 128, 128, 128, 128, 128, 128,
  2282. 128, 128, 128, 128, 128, 128, 128, 128,
  2283. 128, 128, 128, 128, 128, 128, 128, 128,
  2284. 128, 128, 128, 0, 0, 0, 128, 0,
  2285. 0, 0, 0, 0, 0, 0, 0, 0,
  2286. 0, 0, 0, 0, 0, 0, 0, 0,
  2287. 0, 0, 0, 0, 0, 0, 0, 0,
  2288. 0, 0, 0, 0, 0, 0, 0, 0,
  2289. 0, 0, 0, 0, 0, 0, 0, 0,
  2290. 0, 0, 0, 0, 0, 0, 0, 0,
  2291. 0, 0, 0, 0, 0, 0, 0, 0,
  2292. 0, 0, 0, 0, 0, 0, 0, 0,
  2293. 0, 0, 0, 0, 0, 0, 0, 0,
  2294. 0, 0, 0, 0, 0, 0, 0, 0,
  2295. 0, 0, 0, 0, 0, 0, 0, 0,
  2296. 0, 0, 0, 0, 0, 0, 0, 0,
  2297. 0, 0, 0, 0, 0, 0, 0, 0,
  2298. 0, 0, 0, 0, 0, 0, 0, 0,
  2299. 0, 0, 0, 0, 0, 0, 0, 0,
  2300. 0, 0, 0, 0, 0, 0, 0, 0,
  2301. };
  2302. {
  2303. YYCTYPE yych;
  2304. goto yy267;
  2305. ++YYCURSOR;
  2306. yy267:
  2307. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  2308. yych = *YYCURSOR;
  2309. if(yych <= ','){
  2310. if(yych <= '\037'){
  2311. if(yych <= '\t'){
  2312. if(yych <= '\000') goto yy275;
  2313. if(yych <= '\b') goto yy278;
  2314. goto yy273;
  2315. } else {
  2316. if(yych == '\r') goto yy273;
  2317. goto yy278;
  2318. }
  2319. } else {
  2320. if(yych <= '"'){
  2321. if(yych <= ' ') goto yy273;
  2322. if(yych <= '!') goto yy278;
  2323. goto yy271;
  2324. } else {
  2325. if(yych <= '$') goto yy269;
  2326. if(yych == '\'') goto yy271;
  2327. goto yy278;
  2328. }
  2329. }
  2330. } else {
  2331. if(yych <= ']'){
  2332. if(yych <= '9'){
  2333. if(yych == '/') goto yy278;
  2334. goto yy269;
  2335. } else {
  2336. if(yych <= '>') goto yy278;
  2337. if(yych <= 'Z') goto yy269;
  2338. if(yych <= '\\') goto yy278;
  2339. goto yy277;
  2340. }
  2341. } else {
  2342. if(yych <= '`'){
  2343. if(yych != '_') goto yy278;
  2344. goto yy269;
  2345. } else {
  2346. if(yych <= 'z') goto yy269;
  2347. if(yych != '~') goto yy278;
  2348. goto yy269;
  2349. }
  2350. }
  2351. }
  2352. yy269: yych = *++YYCURSOR;
  2353. goto yy283;
  2354. yy270:
  2355. {
  2356. lvalp->str.contents = yasm__xstrndup(TOK, TOKLEN);
  2357. lvalp->str.len = TOKLEN;
  2358. parser_nasm->state = DIRECTIVE2;
  2359. RETURN(STRING);
  2360. }
  2361. yy271: yych = *++YYCURSOR;
  2362. goto yy272;
  2363. yy272:
  2364. {
  2365. parser_nasm->state = DIRECTIVE2;
  2366. endch = s->tok[0];
  2367. goto stringconst;
  2368. }
  2369. yy273: yych = *++YYCURSOR;
  2370. goto yy281;
  2371. yy274:
  2372. {
  2373. parser_nasm->state = DIRECTIVE2;
  2374. goto section_directive;
  2375. }
  2376. yy275: yych = *++YYCURSOR;
  2377. goto yy276;
  2378. yy276:
  2379. { goto endofinput; }
  2380. yy277: yych = *++YYCURSOR;
  2381. goto yy276;
  2382. yy278: yych = *++YYCURSOR;
  2383. goto yy279;
  2384. yy279:
  2385. {
  2386. yasm_warn_set(YASM_WARN_UNREC_CHAR,
  2387. N_("ignoring unrecognized character `%s'"),
  2388. yasm__conv_unprint(s->tok[0]));
  2389. goto section_directive;
  2390. }
  2391. yy280: ++YYCURSOR;
  2392. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2393. yych = *YYCURSOR;
  2394. goto yy281;
  2395. yy281: if(yybm[0+yych] & 64) {
  2396. goto yy280;
  2397. }
  2398. goto yy274;
  2399. yy282: ++YYCURSOR;
  2400. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2401. yych = *YYCURSOR;
  2402. goto yy283;
  2403. yy283: if(yybm[0+yych] & 128) {
  2404. goto yy282;
  2405. }
  2406. goto yy270;
  2407. }
  2408. }
  2409. /* inner part of directive */
  2410. directive2:
  2411. SCANINIT();
  2412. if (*cursor == '\0')
  2413. goto endofinput;
  2414. {
  2415. static unsigned char yybm[] = {
  2416. 0, 1, 1, 1, 1, 1, 1, 1,
  2417. 1, 1, 1, 1, 1, 1, 1, 1,
  2418. 1, 1, 1, 1, 1, 1, 1, 1,
  2419. 1, 1, 1, 1, 1, 1, 1, 1,
  2420. 1, 1, 1, 3, 3, 1, 1, 1,
  2421. 1, 1, 1, 1, 1, 1, 3, 1,
  2422. 255, 255, 63, 63, 63, 63, 63, 63,
  2423. 15, 15, 1, 1, 1, 1, 1, 3,
  2424. 3, 7, 7, 7, 7, 7, 7, 3,
  2425. 3, 3, 3, 3, 3, 3, 3, 3,
  2426. 3, 3, 3, 3, 3, 3, 3, 3,
  2427. 3, 3, 3, 1, 1, 1, 1, 167,
  2428. 1, 7, 7, 7, 7, 7, 7, 3,
  2429. 3, 3, 3, 3, 3, 3, 3, 3,
  2430. 3, 3, 3, 3, 3, 3, 3, 3,
  2431. 3, 3, 3, 1, 1, 1, 3, 1,
  2432. 1, 1, 1, 1, 1, 1, 1, 1,
  2433. 1, 1, 1, 1, 1, 1, 1, 1,
  2434. 1, 1, 1, 1, 1, 1, 1, 1,
  2435. 1, 1, 1, 1, 1, 1, 1, 1,
  2436. 1, 1, 1, 1, 1, 1, 1, 1,
  2437. 1, 1, 1, 1, 1, 1, 1, 1,
  2438. 1, 1, 1, 1, 1, 1, 1, 1,
  2439. 1, 1, 1, 1, 1, 1, 1, 1,
  2440. 1, 1, 1, 1, 1, 1, 1, 1,
  2441. 1, 1, 1, 1, 1, 1, 1, 1,
  2442. 1, 1, 1, 1, 1, 1, 1, 1,
  2443. 1, 1, 1, 1, 1, 1, 1, 1,
  2444. 1, 1, 1, 1, 1, 1, 1, 1,
  2445. 1, 1, 1, 1, 1, 1, 1, 1,
  2446. 1, 1, 1, 1, 1, 1, 1, 1,
  2447. 1, 1, 1, 1, 1, 1, 1, 1,
  2448. 0, 0, 0, 0, 0, 0, 0, 0,
  2449. 0, 128, 0, 0, 0, 128, 0, 0,
  2450. 0, 0, 0, 0, 0, 0, 0, 0,
  2451. 0, 0, 0, 0, 0, 0, 0, 0,
  2452. 128, 0, 0, 0, 0, 0, 0, 0,
  2453. 0, 0, 0, 0, 0, 0, 0, 0,
  2454. 0, 0, 0, 0, 0, 0, 0, 0,
  2455. 0, 0, 0, 0, 0, 0, 0, 0,
  2456. 0, 0, 0, 0, 0, 0, 0, 0,
  2457. 0, 0, 0, 0, 0, 0, 0, 0,
  2458. 0, 0, 0, 0, 0, 0, 0, 0,
  2459. 0, 0, 0, 0, 0, 0, 0, 0,
  2460. 0, 0, 0, 0, 0, 0, 0, 0,
  2461. 0, 0, 0, 0, 0, 0, 0, 0,
  2462. 0, 0, 0, 0, 0, 0, 0, 0,
  2463. 0, 0, 0, 0, 0, 0, 0, 0,
  2464. 0, 0, 0, 0, 0, 0, 0, 0,
  2465. 0, 0, 0, 0, 0, 0, 0, 0,
  2466. 0, 0, 0, 0, 0, 0, 0, 0,
  2467. 0, 0, 0, 0, 0, 0, 0, 0,
  2468. 0, 0, 0, 0, 0, 0, 0, 0,
  2469. 0, 0, 0, 0, 0, 0, 0, 0,
  2470. 0, 0, 0, 0, 0, 0, 0, 0,
  2471. 0, 0, 0, 0, 0, 0, 0, 0,
  2472. 0, 0, 0, 0, 0, 0, 0, 0,
  2473. 0, 0, 0, 0, 0, 0, 0, 0,
  2474. 0, 0, 0, 0, 0, 0, 0, 0,
  2475. 0, 0, 0, 0, 0, 0, 0, 0,
  2476. 0, 0, 0, 0, 0, 0, 0, 0,
  2477. 0, 0, 0, 0, 0, 0, 0, 0,
  2478. 0, 0, 0, 0, 0, 0, 0, 0,
  2479. 0, 0, 0, 0, 0, 0, 0, 0,
  2480. };
  2481. {
  2482. YYCTYPE yych;
  2483. unsigned int yyaccept;
  2484. goto yy284;
  2485. ++YYCURSOR;
  2486. yy284:
  2487. if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
  2488. yych = *YYCURSOR;
  2489. if(yych <= '7'){
  2490. if(yych <= '#'){
  2491. if(yych <= '\r'){
  2492. if(yych <= '\b'){
  2493. if(yych <= '\000') goto yy309;
  2494. goto yy311;
  2495. } else {
  2496. if(yych <= '\t') goto yy307;
  2497. if(yych <= '\f') goto yy311;
  2498. goto yy307;
  2499. }
  2500. } else {
  2501. if(yych <= ' '){
  2502. if(yych <= '\037') goto yy311;
  2503. goto yy307;
  2504. } else {
  2505. if(yych == '"') goto yy293;
  2506. goto yy311;
  2507. }
  2508. }
  2509. } else {
  2510. if(yych <= '-'){
  2511. if(yych <= '%'){
  2512. if(yych <= '$') goto yy291;
  2513. goto yy299;
  2514. } else {
  2515. if(yych == '\'') goto yy293;
  2516. goto yy300;
  2517. }
  2518. } else {
  2519. if(yych <= '/'){
  2520. if(yych <= '.') goto yy303;
  2521. goto yy298;
  2522. } else {
  2523. if(yych <= '0') goto yy286;
  2524. if(yych <= '1') goto yy288;
  2525. goto yy289;
  2526. }
  2527. }
  2528. }
  2529. } else {
  2530. if(yych <= '['){
  2531. if(yych <= '='){
  2532. if(yych <= ':'){
  2533. if(yych <= '9') goto yy290;
  2534. goto yy300;
  2535. } else {
  2536. if(yych <= ';') goto yy305;
  2537. if(yych <= '<') goto yy295;
  2538. goto yy300;
  2539. }
  2540. } else {
  2541. if(yych <= '?'){
  2542. if(yych <= '>') goto yy297;
  2543. goto yy303;
  2544. } else {
  2545. if(yych <= '@') goto yy311;
  2546. if(yych <= 'Z') goto yy303;
  2547. goto yy300;
  2548. }
  2549. }
  2550. } else {
  2551. if(yych <= '`'){
  2552. if(yych <= ']'){
  2553. if(yych <= '\\') goto yy311;
  2554. goto yy301;
  2555. } else {
  2556. if(yych <= '^') goto yy300;
  2557. if(yych <= '_') goto yy303;
  2558. goto yy311;
  2559. }
  2560. } else {
  2561. if(yych <= '|'){
  2562. if(yych <= 'z') goto yy303;
  2563. if(yych <= '{') goto yy311;
  2564. goto yy300;
  2565. } else {
  2566. if(yych == '~') goto yy300;
  2567. goto yy311;
  2568. }
  2569. }
  2570. }
  2571. }
  2572. yy286: yyaccept = 0;
  2573. yych = *(YYMARKER = ++YYCURSOR);
  2574. if(yych == 'X') goto yy352;
  2575. if(yych == 'x') goto yy352;
  2576. goto yy347;
  2577. yy287:
  2578. {
  2579. savech = s->tok[TOKLEN];
  2580. s->tok[TOKLEN] = '\0';
  2581. lvalp->intn = yasm_intnum_create_dec(TOK);
  2582. s->tok[TOKLEN] = savech;
  2583. RETURN(INTNUM);
  2584. }
  2585. yy288: yyaccept = 0;
  2586. yych = *(YYMARKER = ++YYCURSOR);
  2587. goto yy347;
  2588. yy289: yyaccept = 0;
  2589. yych = *(YYMARKER = ++YYCURSOR);
  2590. goto yy341;
  2591. yy290: yyaccept = 0;
  2592. yych = *(YYMARKER = ++YYCURSOR);
  2593. goto yy334;
  2594. yy291: yych = *++YYCURSOR;
  2595. if(yych <= '>'){
  2596. if(yych <= '-'){
  2597. if(yych <= '"') goto yy292;
  2598. if(yych <= '$') goto yy326;
  2599. goto yy292;
  2600. } else {
  2601. if(yych <= '.') goto yy326;
  2602. if(yych <= '/') goto yy292;
  2603. if(yych <= '9') goto yy329;
  2604. goto yy292;
  2605. }
  2606. } else {
  2607. if(yych <= '`'){
  2608. if(yych <= 'Z') goto yy326;
  2609. if(yych == '_') goto yy326;
  2610. goto yy292;
  2611. } else {
  2612. if(yych <= 'z') goto yy326;
  2613. if(yych == '~') goto yy326;
  2614. goto yy292;
  2615. }
  2616. }
  2617. yy292:
  2618. { RETURN(s->tok[0]); }
  2619. yy293: yych = *++YYCURSOR;
  2620. goto yy294;
  2621. yy294:
  2622. {
  2623. endch = s->tok[0];
  2624. goto stringconst;
  2625. }
  2626. yy295: yych = *++YYCURSOR;
  2627. if(yych == '<') goto yy324;
  2628. goto yy296;
  2629. yy296:
  2630. {
  2631. yasm_warn_set(YASM_WARN_UNREC_CHAR,
  2632. N_("ignoring unrecognized character `%s'"),
  2633. yasm__conv_unprint(s->tok[0]));
  2634. goto scan;
  2635. }
  2636. yy297: yych = *++YYCURSOR;
  2637. if(yych == '>') goto yy322;
  2638. goto yy296;
  2639. yy298: yych = *++YYCURSOR;
  2640. if(yych == '/') goto yy320;
  2641. goto yy292;
  2642. yy299: yych = *++YYCURSOR;
  2643. if(yych == '%') goto yy318;
  2644. goto yy292;
  2645. yy300: yych = *++YYCURSOR;
  2646. goto yy292;
  2647. yy301: yych = *++YYCURSOR;
  2648. goto yy302;
  2649. yy302:
  2650. { goto endofinput; }
  2651. yy303: yych = *++YYCURSOR;
  2652. goto yy317;
  2653. yy304:
  2654. {
  2655. savech = s->tok[TOKLEN];
  2656. s->tok[TOKLEN] = '\0';
  2657. switch (yasm_arch_parse_check_regtmod
  2658. (p_object->arch, TOK, TOKLEN, &lvalp->arch_data)) {
  2659. case YASM_ARCH_REG:
  2660. s->tok[TOKLEN] = savech;
  2661. RETURN(REG);
  2662. default:
  2663. s->tok[TOKLEN] = savech;
  2664. }
  2665. /* Propagate errors in case we got a warning from the arch */
  2666. yasm_errwarn_propagate(parser_nasm->errwarns, cur_line);
  2667. /* Just an identifier, return as such. */
  2668. lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
  2669. RETURN(ID);
  2670. }
  2671. yy305: yych = *++YYCURSOR;
  2672. goto yy315;
  2673. yy306:
  2674. { goto directive2; }
  2675. yy307: yych = *++YYCURSOR;
  2676. goto yy313;
  2677. yy308:
  2678. { goto directive2; }
  2679. yy309: yych = *++YYCURSOR;
  2680. goto yy310;
  2681. yy310:
  2682. { goto endofinput; }
  2683. yy311: yych = *++YYCURSOR;
  2684. goto yy296;
  2685. yy312: ++YYCURSOR;
  2686. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2687. yych = *YYCURSOR;
  2688. goto yy313;
  2689. yy313: if(yybm[256+yych] & 128) {
  2690. goto yy312;
  2691. }
  2692. goto yy308;
  2693. yy314: ++YYCURSOR;
  2694. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2695. yych = *YYCURSOR;
  2696. goto yy315;
  2697. yy315: if(yybm[0+yych] & 1) {
  2698. goto yy314;
  2699. }
  2700. goto yy306;
  2701. yy316: ++YYCURSOR;
  2702. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2703. yych = *YYCURSOR;
  2704. goto yy317;
  2705. yy317: if(yybm[0+yych] & 2) {
  2706. goto yy316;
  2707. }
  2708. goto yy304;
  2709. yy318: yych = *++YYCURSOR;
  2710. goto yy319;
  2711. yy319:
  2712. { RETURN(SIGNMOD); }
  2713. yy320: yych = *++YYCURSOR;
  2714. goto yy321;
  2715. yy321:
  2716. { RETURN(SIGNDIV); }
  2717. yy322: yych = *++YYCURSOR;
  2718. goto yy323;
  2719. yy323:
  2720. { RETURN(RIGHT_OP); }
  2721. yy324: yych = *++YYCURSOR;
  2722. goto yy325;
  2723. yy325:
  2724. { RETURN(LEFT_OP); }
  2725. yy326: ++YYCURSOR;
  2726. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2727. yych = *YYCURSOR;
  2728. goto yy327;
  2729. yy327: if(yych <= '>'){
  2730. if(yych <= '-'){
  2731. if(yych <= '"') goto yy328;
  2732. if(yych <= '$') goto yy326;
  2733. goto yy328;
  2734. } else {
  2735. if(yych == '/') goto yy328;
  2736. if(yych <= '9') goto yy326;
  2737. goto yy328;
  2738. }
  2739. } else {
  2740. if(yych <= '`'){
  2741. if(yych <= 'Z') goto yy326;
  2742. if(yych == '_') goto yy326;
  2743. goto yy328;
  2744. } else {
  2745. if(yych <= 'z') goto yy326;
  2746. if(yych == '~') goto yy326;
  2747. goto yy328;
  2748. }
  2749. }
  2750. yy328:
  2751. {
  2752. lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
  2753. RETURN(ID);
  2754. }
  2755. yy329: yych = *++YYCURSOR;
  2756. if(yybm[0+yych] & 4) {
  2757. goto yy330;
  2758. }
  2759. goto yy327;
  2760. yy330: ++YYCURSOR;
  2761. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2762. yych = *YYCURSOR;
  2763. goto yy331;
  2764. yy331: if(yybm[0+yych] & 4) {
  2765. goto yy330;
  2766. }
  2767. if(yych <= '>'){
  2768. if(yych <= '$'){
  2769. if(yych >= '#') goto yy326;
  2770. goto yy332;
  2771. } else {
  2772. if(yych == '.') goto yy326;
  2773. goto yy332;
  2774. }
  2775. } else {
  2776. if(yych <= 'z'){
  2777. if(yych <= 'Z') goto yy326;
  2778. if(yych >= 'g') goto yy326;
  2779. goto yy332;
  2780. } else {
  2781. if(yych == '~') goto yy326;
  2782. goto yy332;
  2783. }
  2784. }
  2785. yy332:
  2786. {
  2787. savech = s->tok[TOKLEN];
  2788. s->tok[TOKLEN] = '\0';
  2789. if (s->tok[1] == 'x' || s->tok[1] == 'X')
  2790. /* skip 0 and x */
  2791. lvalp->intn = yasm_intnum_create_hex(TOK+2);
  2792. else
  2793. /* don't skip 0 */
  2794. lvalp->intn = yasm_intnum_create_hex(TOK+1);
  2795. s->tok[TOKLEN] = savech;
  2796. RETURN(INTNUM);
  2797. }
  2798. yy333: yyaccept = 0;
  2799. YYMARKER = ++YYCURSOR;
  2800. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2801. yych = *YYCURSOR;
  2802. goto yy334;
  2803. yy334: if(yybm[0+yych] & 8) {
  2804. goto yy333;
  2805. }
  2806. if(yych <= '^'){
  2807. if(yych <= 'F'){
  2808. if(yych <= '@') goto yy287;
  2809. goto yy335;
  2810. } else {
  2811. if(yych == 'H') goto yy338;
  2812. goto yy287;
  2813. }
  2814. } else {
  2815. if(yych <= 'f'){
  2816. if(yych == '`') goto yy287;
  2817. goto yy335;
  2818. } else {
  2819. if(yych == 'h') goto yy338;
  2820. goto yy287;
  2821. }
  2822. }
  2823. yy335: ++YYCURSOR;
  2824. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2825. yych = *YYCURSOR;
  2826. goto yy336;
  2827. yy336: if(yych <= 'H'){
  2828. if(yych <= '@'){
  2829. if(yych <= '/') goto yy337;
  2830. if(yych <= '9') goto yy335;
  2831. goto yy337;
  2832. } else {
  2833. if(yych <= 'F') goto yy335;
  2834. if(yych >= 'H') goto yy338;
  2835. goto yy337;
  2836. }
  2837. } else {
  2838. if(yych <= '`'){
  2839. if(yych == '_') goto yy335;
  2840. goto yy337;
  2841. } else {
  2842. if(yych <= 'f') goto yy335;
  2843. if(yych == 'h') goto yy338;
  2844. goto yy337;
  2845. }
  2846. }
  2847. yy337: YYCURSOR = YYMARKER;
  2848. switch(yyaccept){
  2849. case 0: goto yy287;
  2850. case 1: goto yy349;
  2851. }
  2852. yy338: yych = *++YYCURSOR;
  2853. goto yy339;
  2854. yy339:
  2855. {
  2856. s->tok[TOKLEN-1] = '\0'; /* strip off 'h' */
  2857. lvalp->intn = yasm_intnum_create_hex(TOK);
  2858. RETURN(INTNUM);
  2859. }
  2860. yy340: yyaccept = 0;
  2861. YYMARKER = ++YYCURSOR;
  2862. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2863. yych = *YYCURSOR;
  2864. goto yy341;
  2865. yy341: if(yybm[0+yych] & 16) {
  2866. goto yy340;
  2867. }
  2868. if(yych <= 'Q'){
  2869. if(yych <= 'G'){
  2870. if(yych <= '9'){
  2871. if(yych <= '7') goto yy287;
  2872. goto yy333;
  2873. } else {
  2874. if(yych <= '@') goto yy287;
  2875. if(yych <= 'F') goto yy335;
  2876. goto yy287;
  2877. }
  2878. } else {
  2879. if(yych <= 'N'){
  2880. if(yych <= 'H') goto yy338;
  2881. goto yy287;
  2882. } else {
  2883. if(yych == 'P') goto yy287;
  2884. goto yy344;
  2885. }
  2886. }
  2887. } else {
  2888. if(yych <= 'g'){
  2889. if(yych <= '_'){
  2890. if(yych <= '^') goto yy287;
  2891. goto yy342;
  2892. } else {
  2893. if(yych <= '`') goto yy287;
  2894. if(yych <= 'f') goto yy335;
  2895. goto yy287;
  2896. }
  2897. } else {
  2898. if(yych <= 'o'){
  2899. if(yych <= 'h') goto yy338;
  2900. if(yych <= 'n') goto yy287;
  2901. goto yy344;
  2902. } else {
  2903. if(yych == 'q') goto yy344;
  2904. goto yy287;
  2905. }
  2906. }
  2907. }
  2908. yy342: ++YYCURSOR;
  2909. if(YYLIMIT == YYCURSOR) YYFILL(1);
  2910. yych = *YYCURSOR;
  2911. goto yy343;
  2912. yy343: if(yybm[0+yych] & 32) {
  2913. goto yy342;
  2914. }
  2915. if(yych <= 'P'){
  2916. if(yych <= 'F'){
  2917. if(yych <= '7') goto yy337;
  2918. if(yych <= '9') goto yy335;
  2919. if(yych <= '@') goto yy337;
  2920. goto yy335;
  2921. } else {
  2922. if(yych <= 'H'){
  2923. if(yych <= 'G') goto yy337;
  2924. goto yy338;
  2925. } else {
  2926. if(yych != 'O') goto yy337;
  2927. goto yy344;
  2928. }
  2929. }
  2930. } else {
  2931. if(yych <= 'h'){
  2932. if(yych <= '`'){
  2933. if(yych >= 'R') goto yy337;
  2934. goto yy344;
  2935. } else {
  2936. if(yych <= 'f') goto yy335;
  2937. if(yych <= 'g') goto yy337;
  2938. goto yy338;
  2939. }
  2940. } else {
  2941. if(yych <= 'o'){
  2942. if(yych <= 'n') goto yy337;
  2943. goto yy344;
  2944. } else {
  2945. if(yych != 'q') goto yy337;
  2946. goto yy344;
  2947. }
  2948. }
  2949. }
  2950. yy344: yych = *++YYCURSOR;
  2951. goto yy345;
  2952. yy345:
  2953. {
  2954. s->tok[TOKLEN-1] = '\0'; /* strip off 'q' or 'o' */
  2955. lvalp->intn = yasm_intnum_create_oct(TOK);
  2956. RETURN(INTNUM);
  2957. }
  2958. yy346: yyaccept = 0;
  2959. YYMARKER = ++YYCURSOR;
  2960. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  2961. yych = *YYCURSOR;
  2962. goto yy347;
  2963. yy347: if(yybm[0+yych] & 64) {
  2964. goto yy346;
  2965. }
  2966. switch(yych){
  2967. case '2':
  2968. case '3':
  2969. case '4':
  2970. case '5':
  2971. case '6':
  2972. case '7': goto yy340;
  2973. case '8':
  2974. case '9': goto yy333;
  2975. case 'A': case 'C':
  2976. case 'D':
  2977. case 'E':
  2978. case 'F': case 'a': case 'c':
  2979. case 'd':
  2980. case 'e':
  2981. case 'f': goto yy335;
  2982. case 'B': case 'b': goto yy348;
  2983. case 'H': case 'h': goto yy338;
  2984. case 'O': case 'Q': case 'o': case 'q': goto yy344;
  2985. case '_': goto yy350;
  2986. default: goto yy287;
  2987. }
  2988. yy348: yyaccept = 1;
  2989. yych = *(YYMARKER = ++YYCURSOR);
  2990. if(yych <= 'H'){
  2991. if(yych <= '@'){
  2992. if(yych <= '/') goto yy349;
  2993. if(yych <= '9') goto yy335;
  2994. goto yy349;
  2995. } else {
  2996. if(yych <= 'F') goto yy335;
  2997. if(yych >= 'H') goto yy338;
  2998. goto yy349;
  2999. }
  3000. } else {
  3001. if(yych <= '`'){
  3002. if(yych == '_') goto yy335;
  3003. goto yy349;
  3004. } else {
  3005. if(yych <= 'f') goto yy335;
  3006. if(yych == 'h') goto yy338;
  3007. goto yy349;
  3008. }
  3009. }
  3010. yy349:
  3011. {
  3012. s->tok[TOKLEN-1] = '\0'; /* strip off 'b' */
  3013. lvalp->intn = yasm_intnum_create_bin(TOK);
  3014. RETURN(INTNUM);
  3015. }
  3016. yy350: ++YYCURSOR;
  3017. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  3018. yych = *YYCURSOR;
  3019. goto yy351;
  3020. yy351: if(yybm[0+yych] & 128) {
  3021. goto yy350;
  3022. }
  3023. switch(yych){
  3024. case '2':
  3025. case '3':
  3026. case '4':
  3027. case '5':
  3028. case '6':
  3029. case '7': goto yy342;
  3030. case '8':
  3031. case '9': case 'A': case 'C':
  3032. case 'D':
  3033. case 'E':
  3034. case 'F': case 'a': case 'c':
  3035. case 'd':
  3036. case 'e':
  3037. case 'f': goto yy335;
  3038. case 'B': case 'b': goto yy348;
  3039. case 'H': case 'h': goto yy338;
  3040. case 'O': case 'Q': case 'o': case 'q': goto yy344;
  3041. default: goto yy337;
  3042. }
  3043. yy352: yych = *++YYCURSOR;
  3044. if(yych <= 'F'){
  3045. if(yych <= '/') goto yy337;
  3046. if(yych <= '9') goto yy353;
  3047. if(yych <= '@') goto yy337;
  3048. goto yy353;
  3049. } else {
  3050. if(yych <= '_'){
  3051. if(yych <= '^') goto yy337;
  3052. goto yy353;
  3053. } else {
  3054. if(yych <= '`') goto yy337;
  3055. if(yych >= 'g') goto yy337;
  3056. goto yy353;
  3057. }
  3058. }
  3059. yy353: ++YYCURSOR;
  3060. if(YYLIMIT == YYCURSOR) YYFILL(1);
  3061. yych = *YYCURSOR;
  3062. goto yy354;
  3063. yy354: if(yych <= 'F'){
  3064. if(yych <= '/') goto yy332;
  3065. if(yych <= '9') goto yy353;
  3066. if(yych <= '@') goto yy332;
  3067. goto yy353;
  3068. } else {
  3069. if(yych <= '_'){
  3070. if(yych <= '^') goto yy332;
  3071. goto yy353;
  3072. } else {
  3073. if(yych <= '`') goto yy332;
  3074. if(yych <= 'f') goto yy353;
  3075. goto yy332;
  3076. }
  3077. }
  3078. }
  3079. }
  3080. /* string/character constant values */
  3081. stringconst:
  3082. strbuf = yasm_xmalloc(STRBUF_ALLOC_SIZE);
  3083. strbuf_size = STRBUF_ALLOC_SIZE;
  3084. count = 0;
  3085. stringconst_scan:
  3086. SCANINIT();
  3087. if (*cursor == '\0')
  3088. goto stringconst_error;
  3089. {
  3090. {
  3091. YYCTYPE yych;
  3092. goto yy355;
  3093. ++YYCURSOR;
  3094. yy355:
  3095. if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
  3096. yych = *YYCURSOR;
  3097. if(yych <= '"'){
  3098. if(yych <= '\000') goto yy357;
  3099. if(yych <= '!') goto yy362;
  3100. goto yy361;
  3101. } else {
  3102. if(yych == '\'') goto yy359;
  3103. goto yy362;
  3104. }
  3105. yy357: yych = *++YYCURSOR;
  3106. goto yy358;
  3107. yy358:
  3108. { goto stringconst_error; }
  3109. yy359: yych = *++YYCURSOR;
  3110. if(yych == '\'') goto yy363;
  3111. goto yy360;
  3112. yy360:
  3113. {
  3114. if (s->tok[0] == endch)
  3115. goto stringconst_end;
  3116. strbuf[count++] = s->tok[0];
  3117. if (count >= strbuf_size) {
  3118. strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
  3119. strbuf_size += STRBUF_ALLOC_SIZE;
  3120. }
  3121. goto stringconst_scan;
  3122. }
  3123. yy361: yych = *++YYCURSOR;
  3124. if(yych == '"') goto yy363;
  3125. goto yy360;
  3126. yy362: yych = *++YYCURSOR;
  3127. goto yy360;
  3128. yy363: yych = *++YYCURSOR;
  3129. goto yy364;
  3130. yy364:
  3131. {
  3132. if (endch != s->tok[0]) {
  3133. strbuf[count++] = s->tok[0];
  3134. if (count >= strbuf_size) {
  3135. strbuf = yasm_xrealloc(strbuf,
  3136. strbuf_size + STRBUF_ALLOC_SIZE);
  3137. strbuf_size += STRBUF_ALLOC_SIZE;
  3138. }
  3139. } else if (!parser_nasm->tasm) {
  3140. YYCURSOR--;
  3141. goto stringconst_end;
  3142. }
  3143. strbuf[count++] = s->tok[0];
  3144. if (count >= strbuf_size) {
  3145. strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
  3146. strbuf_size += STRBUF_ALLOC_SIZE;
  3147. }
  3148. goto stringconst_scan;
  3149. }
  3150. }
  3151. }
  3152. stringconst_error:
  3153. yasm_error_set(YASM_ERROR_SYNTAX, N_("unterminated string"));
  3154. stringconst_end:
  3155. strbuf[count] = '\0';
  3156. lvalp->str.contents = (char *)strbuf;
  3157. lvalp->str.len = count;
  3158. RETURN(STRING);
  3159. endofinput:
  3160. parser_nasm->state = INITIAL;
  3161. RETURN(s->tok[0]);
  3162. }