1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217 |
- /* Generated by re2c
- */
- /*
- * NASM-compatible re2c lexer
- *
- * Copyright (C) 2001-2007 Peter Johnson
- *
- * Portions based on re2c's example code.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
- #include <util.h>
- #include <libyasm.h>
- #include "modules/parsers/nasm/nasm-parser.h"
- #include "modules/preprocs/nasm/nasm.h"
- #define YYCURSOR cursor
- #define YYLIMIT (s->lim)
- #define YYMARKER (s->ptr)
- #define YYFILL(n) {}
- #define RETURN(i) {s->cur = cursor; parser_nasm->tokch = s->tok[0]; \
- return i;}
- #define SCANINIT() {s->tok = cursor;}
- #define TOK ((char *)s->tok)
- #define TOKLEN (size_t)(cursor-s->tok)
- /* starting size of string buffer */
- #define STRBUF_ALLOC_SIZE 128
- /* string buffer used when parsing strings/character constants */
- static YYCTYPE *strbuf = NULL;
- /* length of strbuf (including terminating NULL character) */
- static size_t strbuf_size = 0;
- static int linechg_numcount;
- static int
- handle_dot_label(YYSTYPE *lvalp, char *tok, size_t toklen, size_t zeropos,
- yasm_parser_nasm *parser_nasm)
- {
- /* check for special non-local labels like ..start */
- if (tok[zeropos+1] == '.') {
- lvalp->str_val = yasm__xstrndup(tok+zeropos+(parser_nasm->tasm?2:0),
- toklen-zeropos-(parser_nasm->tasm?2:0));
- /* check for special non-local ..@label */
- if (lvalp->str_val[zeropos+2] == '@')
- return NONLOCAL_ID;
- return SPECIAL_ID;
- }
- if (parser_nasm->masm && tok[zeropos] == '.') {
- lvalp->str_val = yasm__xstrndup(tok + zeropos, toklen - zeropos);
- return SPECIAL_ID;
- }
- if (parser_nasm->tasm && (!tasm_locals ||
- (tok[zeropos] == '.' &&
- tok[zeropos+1] != '@' && tok[zeropos+2] != '@'))) {
- /* no locals on Tasm without the 'locals' directive */
- /* .foo is never local either, but .@@foo may be (local structure
- * members) */
- lvalp->str_val = yasm__xstrndup(tok + zeropos, toklen - zeropos);
- return SPECIAL_ID;
- }
- if (!parser_nasm->locallabel_base) {
- lvalp->str_val = yasm__xstrndup(tok+zeropos, toklen-zeropos);
- yasm_warn_set(YASM_WARN_GENERAL,
- N_("no non-local label before `%s'"),
- lvalp->str_val);
- } else {
- size_t len = toklen - zeropos + parser_nasm->locallabel_base_len;
- lvalp->str_val = yasm_xmalloc(len + 1);
- strcpy(lvalp->str_val, parser_nasm->locallabel_base);
- strncat(lvalp->str_val, tok+zeropos, toklen-zeropos);
- lvalp->str_val[len] = '\0';
- }
- return LOCAL_ID;
- }
- int
- nasm_parser_lex(YYSTYPE *lvalp, yasm_parser_nasm *parser_nasm)
- {
- yasm_scanner *s = &parser_nasm->s;
- YYCTYPE *cursor = s->cur;
- YYCTYPE endch;
- size_t count;
- YYCTYPE savech;
- /* Handle one token of lookahead */
- if (parser_nasm->peek_token != NONE) {
- int tok = parser_nasm->peek_token;
- *lvalp = parser_nasm->peek_tokval; /* structure copy */
- parser_nasm->tokch = parser_nasm->peek_tokch;
- parser_nasm->peek_token = NONE;
- return tok;
- }
- /* Catch EOL (EOF from the scanner perspective) */
- if (s->eof && cursor == s->eof)
- return 0;
- /* Jump to proper "exclusive" states */
- switch (parser_nasm->state) {
- case DIRECTIVE:
- goto directive;
- case SECTION_DIRECTIVE:
- goto section_directive;
- case DIRECTIVE2:
- goto directive2;
- case LINECHG:
- goto linechg;
- case LINECHG2:
- goto linechg2;
- default:
- break;
- }
- scan:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 1,
- 255, 255, 63, 63, 63, 63, 63, 63,
- 15, 15, 1, 1, 1, 1, 1, 3,
- 3, 7, 7, 7, 7, 7, 7, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 1, 1, 1, 1, 167,
- 1, 7, 7, 7, 7, 7, 7, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 1, 1, 1, 3, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 128, 0, 0, 0, 128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- {
- YYCTYPE yych;
- unsigned int yyaccept;
- goto yy0;
- ++YYCURSOR;
- yy0:
- if((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
- yych = *YYCURSOR;
- switch(yych){
- case '\000': goto yy43;
- case '\t': case '\r': case ' ': goto yy41;
- case '"': case '\'': goto yy9;
- case '$': goto yy7;
- case '%': goto yy11;
- case '&': case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-': case ':': case '=': case '[': case '^': case '|': case '~': goto yy32;
- case '.': goto yy36;
- case '/': goto yy31;
- case '0': goto yy2;
- case '1': goto yy4;
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy5;
- case '8':
- case '9': goto yy6;
- case ';': goto yy39;
- case '<': goto yy28;
- case '>': goto yy30;
- case '?': goto yy33;
- case '@': goto yy37;
- case 'A': case 'a': goto yy26;
- case 'B': case 'b': goto yy12;
- case 'C': case 'F':
- case 'G': case 'J':
- case 'K': case 'M': case 'P': case 'U':
- case 'V': case 'X': case 'Z': case '_': case 'c': case 'f':
- case 'g': case 'j':
- case 'k': case 'm': case 'p': case 'u':
- case 'v': case 'x': case 'z': goto yy38;
- case 'D': case 'd': goto yy16;
- case 'E': case 'e': goto yy24;
- case 'H': case 'h': goto yy14;
- case 'I': case 'i': goto yy23;
- case 'L': case 'l': goto yy17;
- case 'N': case 'n': goto yy27;
- case 'O': case 'o': goto yy20;
- case 'Q': case 'q': goto yy18;
- case 'R': case 'r': goto yy22;
- case 'S': case 's': goto yy25;
- case 'T': case 't': goto yy19;
- case 'W': case 'w': goto yy15;
- case 'Y': case 'y': goto yy21;
- case ']': goto yy34;
- default: goto yy45;
- }
- yy2: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 64) {
- goto yy222;
- }
- switch(yych){
- case '.': goto yy203;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy216;
- case '8':
- case '9': goto yy206;
- case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy208;
- case 'B': case 'b': goto yy224;
- case 'H': case 'h': goto yy210;
- case 'O': case 'Q': case 'o': case 'q': goto yy220;
- case 'X': case 'x': goto yy228;
- case '_': goto yy226;
- default: goto yy3;
- }
- yy3:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy4: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 64) {
- goto yy222;
- }
- switch(yych){
- case '.': goto yy203;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy216;
- case '8':
- case '9': goto yy206;
- case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy208;
- case 'B': case 'b': goto yy224;
- case 'H': case 'h': goto yy210;
- case 'O': case 'Q': case 'o': case 'q': goto yy220;
- case '_': goto yy226;
- default: goto yy3;
- }
- yy5: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 16) {
- goto yy216;
- }
- if(yych <= 'P'){
- if(yych <= '@'){
- if(yych <= '.'){
- if(yych <= '-') goto yy3;
- goto yy203;
- } else {
- if(yych <= '/') goto yy3;
- if(yych <= '9') goto yy206;
- goto yy3;
- }
- } else {
- if(yych <= 'H'){
- if(yych <= 'F') goto yy208;
- if(yych <= 'G') goto yy3;
- goto yy210;
- } else {
- if(yych == 'O') goto yy220;
- goto yy3;
- }
- }
- } else {
- if(yych <= 'g'){
- if(yych <= '_'){
- if(yych <= 'Q') goto yy220;
- if(yych <= '^') goto yy3;
- goto yy218;
- } else {
- if(yych <= '`') goto yy3;
- if(yych <= 'f') goto yy208;
- goto yy3;
- }
- } else {
- if(yych <= 'o'){
- if(yych <= 'h') goto yy210;
- if(yych <= 'n') goto yy3;
- goto yy220;
- } else {
- if(yych == 'q') goto yy220;
- goto yy3;
- }
- }
- }
- yy6: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= 'G'){
- if(yych <= '/'){
- if(yych == '.') goto yy203;
- goto yy3;
- } else {
- if(yych <= '9') goto yy206;
- if(yych <= '@') goto yy3;
- if(yych <= 'F') goto yy208;
- goto yy3;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'H') goto yy210;
- if(yych == '_') goto yy208;
- goto yy3;
- } else {
- if(yych <= 'f') goto yy208;
- if(yych == 'h') goto yy210;
- goto yy3;
- }
- }
- yy7: yych = *++YYCURSOR;
- if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy8;
- if(yych <= '#') goto yy194;
- if(yych <= '$') goto yy197;
- goto yy8;
- } else {
- if(yych <= '.') goto yy194;
- if(yych <= '/') goto yy8;
- if(yych <= '9') goto yy199;
- goto yy8;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy194;
- if(yych == '_') goto yy194;
- goto yy8;
- } else {
- if(yych <= 'z') goto yy194;
- if(yych == '~') goto yy194;
- goto yy8;
- }
- }
- yy8:
- { RETURN(s->tok[0]); }
- yy9: yych = *++YYCURSOR;
- goto yy10;
- yy10:
- {
- endch = s->tok[0];
- goto stringconst;
- }
- yy11: yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych == '%') goto yy186;
- if(yych == 'l') goto yy188;
- goto yy8;
- yy12: yych = *++YYCURSOR;
- if(yych == 'Y') goto yy182;
- if(yych == 'y') goto yy182;
- goto yy51;
- yy13:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- if (parser_nasm->state != INSTRUCTION) {
- uintptr_t prefix;
- switch (yasm_arch_parse_check_insnprefix
- (p_object->arch, TOK, TOKLEN, cur_line, &lvalp->bc,
- &prefix)) {
- case YASM_ARCH_INSN:
- parser_nasm->state = INSTRUCTION;
- s->tok[TOKLEN] = savech;
- RETURN(INSN);
- case YASM_ARCH_PREFIX:
- lvalp->arch_data = prefix;
- s->tok[TOKLEN] = savech;
- RETURN(PREFIX);
- default:
- break;
- }
- }
- switch (yasm_arch_parse_check_regtmod
- (p_object->arch, TOK, TOKLEN, &lvalp->arch_data)) {
- case YASM_ARCH_REG:
- s->tok[TOKLEN] = savech;
- RETURN(REG);
- case YASM_ARCH_SEGREG:
- s->tok[TOKLEN] = savech;
- RETURN(SEGREG);
- case YASM_ARCH_TARGETMOD:
- s->tok[TOKLEN] = savech;
- RETURN(TARGETMOD);
- case YASM_ARCH_REGGROUP:
- if (parser_nasm->masm) {
- s->tok[TOKLEN] = savech;
- RETURN(REGGROUP);
- }
- default:
- break;
- }
- if (parser_nasm->masm) {
- if (!yasm__strcasecmp(TOK, "offset")) {
- s->tok[TOKLEN] = savech;
- RETURN(OFFSET);
- }
- } else if (parser_nasm->tasm) {
- if (!yasm__strcasecmp(TOK, "shl")) {
- s->tok[TOKLEN] = savech;
- RETURN(LEFT_OP);
- }
- if (!yasm__strcasecmp(TOK, "shr")) {
- s->tok[TOKLEN] = savech;
- RETURN(RIGHT_OP);
- }
- if (!yasm__strcasecmp(TOK, "and")) {
- s->tok[TOKLEN] = savech;
- RETURN('&');
- }
- if (!yasm__strcasecmp(TOK, "or")) {
- s->tok[TOKLEN] = savech;
- RETURN('|');
- }
- if (!yasm__strcasecmp(TOK, "not")) {
- s->tok[TOKLEN] = savech;
- RETURN('~');
- }
- if (!yasm__strcasecmp(TOK, "low")) {
- s->tok[TOKLEN] = savech;
- RETURN(LOW);
- }
- if (!yasm__strcasecmp(TOK, "high")) {
- s->tok[TOKLEN] = savech;
- RETURN(HIGH);
- }
- if (!yasm__strcasecmp(TOK, "offset")) {
- s->tok[TOKLEN] = savech;
- RETURN(OFFSET);
- }
- if (!yasm__strcasecmp(TOK, "fword")) {
- s->tok[TOKLEN] = savech;
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
- RETURN(SIZE_OVERRIDE);
- }
- if (!yasm__strcasecmp(TOK, "df")) {
- s->tok[TOKLEN] = savech;
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*3;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- if (!yasm__strcasecmp(TOK, "label")) {
- s->tok[TOKLEN] = savech;
- RETURN(LABEL);
- }
- if (!yasm__strcasecmp(TOK, "dup")) {
- s->tok[TOKLEN] = savech;
- RETURN(DUP);
- }
- }
- /* Propagate errors in case we got a warning from the arch */
- yasm_errwarn_propagate(parser_nasm->errwarns, cur_line);
- /* Just an identifier, return as such. */
- s->tok[TOKLEN] = savech;
- lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
- RETURN(ID);
- }
- yy14: yych = *++YYCURSOR;
- if(yych == 'W') goto yy177;
- if(yych == 'w') goto yy177;
- goto yy51;
- yy15: yych = *++YYCURSOR;
- if(yych <= 'R'){
- if(yych == 'O') goto yy170;
- if(yych <= 'Q') goto yy51;
- goto yy171;
- } else {
- if(yych <= 'o'){
- if(yych <= 'n') goto yy51;
- goto yy170;
- } else {
- if(yych == 'r') goto yy171;
- goto yy51;
- }
- }
- yy16: yych = *++YYCURSOR;
- switch(yych){
- case 'B': case 'b': goto yy144;
- case 'D': case 'd': goto yy146;
- case 'H': case 'h': goto yy148;
- case 'O': case 'o': goto yy149;
- case 'Q': case 'q': goto yy151;
- case 'T': case 't': goto yy153;
- case 'W': case 'w': goto yy155;
- case 'Y': case 'y': goto yy157;
- default: goto yy51;
- }
- yy17: yych = *++YYCURSOR;
- if(yych == 'O') goto yy140;
- if(yych == 'o') goto yy140;
- goto yy51;
- yy18: yych = *++YYCURSOR;
- if(yych == 'W') goto yy135;
- if(yych == 'w') goto yy135;
- goto yy51;
- yy19: yych = *++YYCURSOR;
- if(yych <= 'W'){
- if(yych == 'I') goto yy125;
- if(yych <= 'V') goto yy51;
- goto yy126;
- } else {
- if(yych <= 'i'){
- if(yych <= 'h') goto yy51;
- goto yy125;
- } else {
- if(yych == 'w') goto yy126;
- goto yy51;
- }
- }
- yy20: yych = *++YYCURSOR;
- if(yych == 'W') goto yy120;
- if(yych == 'w') goto yy120;
- goto yy51;
- yy21: yych = *++YYCURSOR;
- if(yych == 'W') goto yy115;
- if(yych == 'w') goto yy115;
- goto yy51;
- yy22: yych = *++YYCURSOR;
- if(yych == 'E') goto yy92;
- if(yych == 'e') goto yy92;
- goto yy51;
- yy23: yych = *++YYCURSOR;
- if(yych == 'N') goto yy86;
- if(yych == 'n') goto yy86;
- goto yy51;
- yy24: yych = *++YYCURSOR;
- if(yych == 'Q') goto yy83;
- if(yych == 'q') goto yy83;
- goto yy51;
- yy25: yych = *++YYCURSOR;
- if(yych <= 'T'){
- if(yych == 'E') goto yy74;
- if(yych <= 'S') goto yy51;
- goto yy75;
- } else {
- if(yych <= 'e'){
- if(yych <= 'd') goto yy51;
- goto yy74;
- } else {
- if(yych == 't') goto yy75;
- goto yy51;
- }
- }
- yy26: yych = *++YYCURSOR;
- if(yych == 'B') goto yy71;
- if(yych == 'b') goto yy71;
- goto yy51;
- yy27: yych = *++YYCURSOR;
- if(yych == 'O') goto yy64;
- if(yych == 'o') goto yy64;
- goto yy51;
- yy28: yych = *++YYCURSOR;
- if(yych == '<') goto yy62;
- goto yy29;
- yy29:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto scan;
- }
- yy30: yych = *++YYCURSOR;
- if(yych == '>') goto yy60;
- goto yy29;
- yy31: yych = *++YYCURSOR;
- if(yych == '/') goto yy58;
- goto yy8;
- yy32: yych = *++YYCURSOR;
- goto yy8;
- yy33: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy8;
- yy34: yych = *++YYCURSOR;
- goto yy35;
- yy35:
- { RETURN(s->tok[0]); }
- yy36: yych = *++YYCURSOR;
- if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy29;
- if(yych <= '$') goto yy56;
- goto yy29;
- } else {
- if(yych == '/') goto yy29;
- if(yych <= '9') goto yy56;
- goto yy29;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy56;
- if(yych == '_') goto yy56;
- goto yy29;
- } else {
- if(yych <= 'z') goto yy56;
- if(yych == '~') goto yy56;
- goto yy29;
- }
- }
- yy37: yych = *++YYCURSOR;
- if(yych == '@') goto yy52;
- goto yy51;
- yy38: yych = *++YYCURSOR;
- goto yy51;
- yy39: yych = *++YYCURSOR;
- goto yy49;
- yy40:
- { goto scan; }
- yy41: yych = *++YYCURSOR;
- goto yy47;
- yy42:
- { goto scan; }
- yy43: yych = *++YYCURSOR;
- goto yy44;
- yy44:
- { goto endofinput; }
- yy45: yych = *++YYCURSOR;
- goto yy29;
- yy46: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy47;
- yy47: if(yybm[256+yych] & 128) {
- goto yy46;
- }
- goto yy42;
- yy48: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy49;
- yy49: if(yybm[0+yych] & 1) {
- goto yy48;
- }
- goto yy40;
- yy50: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy51;
- yy51: if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy13;
- yy52: yych = *++YYCURSOR;
- if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy13;
- if(yych >= '%') goto yy13;
- goto yy53;
- } else {
- if(yych == '/') goto yy13;
- if(yych >= ':') goto yy13;
- goto yy53;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy53;
- if(yych != '_') goto yy13;
- goto yy53;
- } else {
- if(yych <= 'z') goto yy53;
- if(yych != '~') goto yy13;
- goto yy53;
- }
- }
- yy53: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy54;
- yy54: if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy55;
- if(yych <= '$') goto yy53;
- goto yy55;
- } else {
- if(yych == '/') goto yy55;
- if(yych <= '9') goto yy53;
- goto yy55;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy53;
- if(yych == '_') goto yy53;
- goto yy55;
- } else {
- if(yych <= 'z') goto yy53;
- if(yych == '~') goto yy53;
- goto yy55;
- }
- }
- yy55:
- {
- RETURN(handle_dot_label(lvalp, TOK, TOKLEN, 0, parser_nasm));
- }
- yy56: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy57;
- yy57: if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy55;
- if(yych <= '$') goto yy56;
- goto yy55;
- } else {
- if(yych == '/') goto yy55;
- if(yych <= '9') goto yy56;
- goto yy55;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy56;
- if(yych == '_') goto yy56;
- goto yy55;
- } else {
- if(yych <= 'z') goto yy56;
- if(yych == '~') goto yy56;
- goto yy55;
- }
- }
- yy58: yych = *++YYCURSOR;
- goto yy59;
- yy59:
- { RETURN(SIGNDIV); }
- yy60: yych = *++YYCURSOR;
- goto yy61;
- yy61:
- { RETURN(RIGHT_OP); }
- yy62: yych = *++YYCURSOR;
- goto yy63;
- yy63:
- { RETURN(LEFT_OP); }
- yy64: yych = *++YYCURSOR;
- if(yych == 'S') goto yy65;
- if(yych != 's') goto yy51;
- goto yy65;
- yy65: yych = *++YYCURSOR;
- if(yych == 'P') goto yy66;
- if(yych != 'p') goto yy51;
- goto yy66;
- yy66: yych = *++YYCURSOR;
- if(yych == 'L') goto yy67;
- if(yych != 'l') goto yy51;
- goto yy67;
- yy67: yych = *++YYCURSOR;
- if(yych == 'I') goto yy68;
- if(yych != 'i') goto yy51;
- goto yy68;
- yy68: yych = *++YYCURSOR;
- if(yych == 'T') goto yy69;
- if(yych != 't') goto yy51;
- goto yy69;
- yy69: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy70;
- yy70:
- { RETURN(NOSPLIT); }
- yy71: yych = *++YYCURSOR;
- if(yych == 'S') goto yy72;
- if(yych != 's') goto yy51;
- goto yy72;
- yy72: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy73;
- yy73:
- { RETURN(ABS); }
- yy74: yych = *++YYCURSOR;
- if(yych == 'G') goto yy81;
- if(yych == 'g') goto yy81;
- goto yy51;
- yy75: yych = *++YYCURSOR;
- if(yych == 'R') goto yy76;
- if(yych != 'r') goto yy51;
- goto yy76;
- yy76: yych = *++YYCURSOR;
- if(yych == 'I') goto yy77;
- if(yych != 'i') goto yy51;
- goto yy77;
- yy77: yych = *++YYCURSOR;
- if(yych == 'C') goto yy78;
- if(yych != 'c') goto yy51;
- goto yy78;
- yy78: yych = *++YYCURSOR;
- if(yych == 'T') goto yy79;
- if(yych != 't') goto yy51;
- goto yy79;
- yy79: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy80;
- yy80:
- { RETURN(STRICT); }
- yy81: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy82;
- yy82:
- { RETURN(SEG); }
- yy83: yych = *++YYCURSOR;
- if(yych == 'U') goto yy84;
- if(yych != 'u') goto yy51;
- goto yy84;
- yy84: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy85;
- yy85:
- { RETURN(EQU); }
- yy86: yych = *++YYCURSOR;
- if(yych == 'C') goto yy87;
- if(yych != 'c') goto yy51;
- goto yy87;
- yy87: yych = *++YYCURSOR;
- if(yych == 'B') goto yy88;
- if(yych != 'b') goto yy51;
- goto yy88;
- yy88: yych = *++YYCURSOR;
- if(yych == 'I') goto yy89;
- if(yych != 'i') goto yy51;
- goto yy89;
- yy89: yych = *++YYCURSOR;
- if(yych == 'N') goto yy90;
- if(yych != 'n') goto yy51;
- goto yy90;
- yy90: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy91;
- yy91:
- { RETURN(INCBIN); }
- yy92: yych = *++YYCURSOR;
- if(yych <= 'S'){
- if(yych == 'L') goto yy94;
- if(yych <= 'R') goto yy51;
- goto yy93;
- } else {
- if(yych <= 'l'){
- if(yych <= 'k') goto yy51;
- goto yy94;
- } else {
- if(yych != 's') goto yy51;
- goto yy93;
- }
- }
- yy93: yych = *++YYCURSOR;
- switch(yych){
- case 'B': case 'b': goto yy96;
- case 'D': case 'd': goto yy98;
- case 'H': case 'h': goto yy100;
- case 'O': case 'o': goto yy101;
- case 'Q': case 'q': goto yy103;
- case 'T': case 't': goto yy105;
- case 'W': case 'w': goto yy107;
- case 'Y': case 'y': goto yy109;
- default: goto yy51;
- }
- yy94: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy95;
- yy95:
- { RETURN(REL); }
- yy96: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy97;
- yy97:
- {
- lvalp->int_info = 8;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy98: yych = *++YYCURSOR;
- if(yych <= 'Q'){
- if(yych <= '.'){
- if(yych <= '"') goto yy99;
- if(yych <= '$') goto yy50;
- if(yych >= '.') goto yy50;
- goto yy99;
- } else {
- if(yych <= '9'){
- if(yych >= '0') goto yy50;
- goto yy99;
- } else {
- if(yych <= '>') goto yy99;
- if(yych <= 'P') goto yy50;
- goto yy113;
- }
- }
- } else {
- if(yych <= 'p'){
- if(yych <= '^'){
- if(yych <= 'Z') goto yy50;
- goto yy99;
- } else {
- if(yych != '`') goto yy50;
- goto yy99;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'q') goto yy113;
- goto yy50;
- } else {
- if(yych == '~') goto yy50;
- goto yy99;
- }
- }
- }
- yy99:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy100: yych = *++YYCURSOR;
- if(yych == 'W') goto yy111;
- if(yych == 'w') goto yy111;
- goto yy51;
- yy101: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy102;
- yy102:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy103: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy104;
- yy104:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy105: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy106;
- yy106:
- {
- lvalp->int_info = 80;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy107: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy108;
- yy108:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch);
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy109: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy110;
- yy110:
- {
- lvalp->int_info = 256;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy111: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy112;
- yy112:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy113: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy114;
- yy114:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- parser_nasm->state = INSTRUCTION;
- RETURN(RESERVE_SPACE);
- }
- yy115: yych = *++YYCURSOR;
- if(yych == 'O') goto yy116;
- if(yych != 'o') goto yy51;
- goto yy116;
- yy116: yych = *++YYCURSOR;
- if(yych == 'R') goto yy117;
- if(yych != 'r') goto yy51;
- goto yy117;
- yy117: yych = *++YYCURSOR;
- if(yych == 'D') goto yy118;
- if(yych != 'd') goto yy51;
- goto yy118;
- yy118: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy119;
- yy119:
- {
- lvalp->int_info = 256;
- RETURN(SIZE_OVERRIDE);
- }
- yy120: yych = *++YYCURSOR;
- if(yych == 'O') goto yy121;
- if(yych != 'o') goto yy51;
- goto yy121;
- yy121: yych = *++YYCURSOR;
- if(yych == 'R') goto yy122;
- if(yych != 'r') goto yy51;
- goto yy122;
- yy122: yych = *++YYCURSOR;
- if(yych == 'D') goto yy123;
- if(yych != 'd') goto yy51;
- goto yy123;
- yy123: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy124;
- yy124:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- RETURN(SIZE_OVERRIDE);
- }
- yy125: yych = *++YYCURSOR;
- if(yych == 'M') goto yy131;
- if(yych == 'm') goto yy131;
- goto yy51;
- yy126: yych = *++YYCURSOR;
- if(yych == 'O') goto yy127;
- if(yych != 'o') goto yy51;
- goto yy127;
- yy127: yych = *++YYCURSOR;
- if(yych == 'R') goto yy128;
- if(yych != 'r') goto yy51;
- goto yy128;
- yy128: yych = *++YYCURSOR;
- if(yych == 'D') goto yy129;
- if(yych != 'd') goto yy51;
- goto yy129;
- yy129: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy130;
- yy130:
- { lvalp->int_info = 80; RETURN(SIZE_OVERRIDE); }
- yy131: yych = *++YYCURSOR;
- if(yych == 'E') goto yy132;
- if(yych != 'e') goto yy51;
- goto yy132;
- yy132: yych = *++YYCURSOR;
- if(yych == 'S') goto yy133;
- if(yych != 's') goto yy51;
- goto yy133;
- yy133: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy134;
- yy134:
- { RETURN(TIMES); }
- yy135: yych = *++YYCURSOR;
- if(yych == 'O') goto yy136;
- if(yych != 'o') goto yy51;
- goto yy136;
- yy136: yych = *++YYCURSOR;
- if(yych == 'R') goto yy137;
- if(yych != 'r') goto yy51;
- goto yy137;
- yy137: yych = *++YYCURSOR;
- if(yych == 'D') goto yy138;
- if(yych != 'd') goto yy51;
- goto yy138;
- yy138: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy139;
- yy139:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
- RETURN(SIZE_OVERRIDE);
- }
- yy140: yych = *++YYCURSOR;
- if(yych == 'N') goto yy141;
- if(yych != 'n') goto yy51;
- goto yy141;
- yy141: yych = *++YYCURSOR;
- if(yych == 'G') goto yy142;
- if(yych != 'g') goto yy51;
- goto yy142;
- yy142: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy143;
- yy143:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
- RETURN(SIZE_OVERRIDE);
- }
- yy144: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy145;
- yy145:
- {
- lvalp->int_info = 8;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy146: yych = *++YYCURSOR;
- if(yych <= 'Q'){
- if(yych <= '.'){
- if(yych <= '"') goto yy147;
- if(yych <= '$') goto yy50;
- if(yych >= '.') goto yy50;
- goto yy147;
- } else {
- if(yych <= '9'){
- if(yych >= '0') goto yy50;
- goto yy147;
- } else {
- if(yych <= '>') goto yy147;
- if(yych <= 'P') goto yy50;
- goto yy168;
- }
- }
- } else {
- if(yych <= 'p'){
- if(yych <= '^'){
- if(yych <= 'Z') goto yy50;
- goto yy147;
- } else {
- if(yych != '`') goto yy50;
- goto yy147;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'q') goto yy168;
- goto yy50;
- } else {
- if(yych == '~') goto yy50;
- goto yy147;
- }
- }
- }
- yy147:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*2;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy148: yych = *++YYCURSOR;
- if(yych == 'W') goto yy166;
- if(yych == 'w') goto yy166;
- goto yy51;
- yy149: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy150;
- yy150:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy151: yych = *++YYCURSOR;
- if(yych <= 'W'){
- if(yych <= '.'){
- if(yych <= '"') goto yy152;
- if(yych <= '$') goto yy50;
- if(yych >= '.') goto yy50;
- goto yy152;
- } else {
- if(yych <= '9'){
- if(yych >= '0') goto yy50;
- goto yy152;
- } else {
- if(yych <= '>') goto yy152;
- if(yych <= 'V') goto yy50;
- goto yy161;
- }
- }
- } else {
- if(yych <= 'v'){
- if(yych <= '^'){
- if(yych <= 'Z') goto yy50;
- goto yy152;
- } else {
- if(yych != '`') goto yy50;
- goto yy152;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'w') goto yy161;
- goto yy50;
- } else {
- if(yych == '~') goto yy50;
- goto yy152;
- }
- }
- }
- yy152:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*4;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy153: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy154;
- yy154:
- {
- lvalp->int_info = 80;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy155: yych = *++YYCURSOR;
- if(yych <= 'O'){
- if(yych <= '.'){
- if(yych <= '"') goto yy156;
- if(yych <= '$') goto yy50;
- if(yych >= '.') goto yy50;
- goto yy156;
- } else {
- if(yych <= '9'){
- if(yych >= '0') goto yy50;
- goto yy156;
- } else {
- if(yych <= '>') goto yy156;
- if(yych <= 'N') goto yy50;
- goto yy159;
- }
- }
- } else {
- if(yych <= 'n'){
- if(yych <= '^'){
- if(yych <= 'Z') goto yy50;
- goto yy156;
- } else {
- if(yych != '`') goto yy50;
- goto yy156;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'o') goto yy159;
- goto yy50;
- } else {
- if(yych == '~') goto yy50;
- goto yy156;
- }
- }
- }
- yy156:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch);
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy157: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy158;
- yy158:
- {
- lvalp->int_info = 256;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy159: yych = *++YYCURSOR;
- if(yych == 'R') goto yy160;
- if(yych != 'r') goto yy51;
- goto yy160;
- yy160: yych = *++YYCURSOR;
- if(yych == 'D') goto yy142;
- if(yych == 'd') goto yy142;
- goto yy51;
- yy161: yych = *++YYCURSOR;
- if(yych == 'O') goto yy162;
- if(yych != 'o') goto yy51;
- goto yy162;
- yy162: yych = *++YYCURSOR;
- if(yych == 'R') goto yy163;
- if(yych != 'r') goto yy51;
- goto yy163;
- yy163: yych = *++YYCURSOR;
- if(yych == 'D') goto yy164;
- if(yych != 'd') goto yy51;
- goto yy164;
- yy164: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy165;
- yy165:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- RETURN(SIZE_OVERRIDE);
- }
- yy166: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy167;
- yy167:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy168: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy169;
- yy169:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)*8;
- parser_nasm->state = INSTRUCTION;
- RETURN(DECLARE_DATA);
- }
- yy170: yych = *++YYCURSOR;
- if(yych == 'R') goto yy174;
- if(yych == 'r') goto yy174;
- goto yy51;
- yy171: yych = *++YYCURSOR;
- if(yych == 'T') goto yy172;
- if(yych != 't') goto yy51;
- goto yy172;
- yy172: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy173;
- yy173:
- { RETURN(WRT); }
- yy174: yych = *++YYCURSOR;
- if(yych == 'D') goto yy175;
- if(yych != 'd') goto yy51;
- goto yy175;
- yy175: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy176;
- yy176:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch);
- RETURN(SIZE_OVERRIDE);
- }
- yy177: yych = *++YYCURSOR;
- if(yych == 'O') goto yy178;
- if(yych != 'o') goto yy51;
- goto yy178;
- yy178: yych = *++YYCURSOR;
- if(yych == 'R') goto yy179;
- if(yych != 'r') goto yy51;
- goto yy179;
- yy179: yych = *++YYCURSOR;
- if(yych == 'D') goto yy180;
- if(yych != 'd') goto yy51;
- goto yy180;
- yy180: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy181;
- yy181:
- {
- lvalp->int_info = yasm_arch_wordsize(p_object->arch)/2;
- RETURN(SIZE_OVERRIDE);
- }
- yy182: yych = *++YYCURSOR;
- if(yych == 'T') goto yy183;
- if(yych != 't') goto yy51;
- goto yy183;
- yy183: yych = *++YYCURSOR;
- if(yych == 'E') goto yy184;
- if(yych != 'e') goto yy51;
- goto yy184;
- yy184: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy50;
- }
- goto yy185;
- yy185:
- { lvalp->int_info = 8; RETURN(SIZE_OVERRIDE); }
- yy186: yych = *++YYCURSOR;
- goto yy187;
- yy187:
- { RETURN(SIGNMOD); }
- yy188: yych = *++YYCURSOR;
- if(yych == 'i') goto yy190;
- goto yy189;
- yy189: YYCURSOR = YYMARKER;
- switch(yyaccept){
- case 0: goto yy3;
- case 3: goto yy225;
- case 2: goto yy205;
- case 1: goto yy8;
- }
- yy190: yych = *++YYCURSOR;
- if(yych != 'n') goto yy189;
- goto yy191;
- yy191: yych = *++YYCURSOR;
- if(yych != 'e') goto yy189;
- goto yy192;
- yy192: yych = *++YYCURSOR;
- goto yy193;
- yy193:
- {
- parser_nasm->state = LINECHG;
- linechg_numcount = 0;
- RETURN(LINE);
- }
- yy194: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy195;
- yy195: if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy196;
- if(yych <= '$') goto yy194;
- goto yy196;
- } else {
- if(yych == '/') goto yy196;
- if(yych <= '9') goto yy194;
- goto yy196;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy194;
- if(yych == '_') goto yy194;
- goto yy196;
- } else {
- if(yych <= 'z') goto yy194;
- if(yych == '~') goto yy194;
- goto yy196;
- }
- }
- yy196:
- {
- if (TOK[1] == '.' ||
- (parser_nasm->tasm && TOK[1] == '@' && TOK[2] == '@')) {
- /* handle like .label */
- RETURN(handle_dot_label(lvalp, TOK, TOKLEN, 1, parser_nasm));
- }
- lvalp->str_val = yasm__xstrndup(TOK+1, TOKLEN-1);
- RETURN(ID);
- }
- yy197: yych = *++YYCURSOR;
- if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy198;
- if(yych <= '$') goto yy194;
- goto yy198;
- } else {
- if(yych == '/') goto yy198;
- if(yych <= '9') goto yy194;
- goto yy198;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy194;
- if(yych == '_') goto yy194;
- goto yy198;
- } else {
- if(yych <= 'z') goto yy194;
- if(yych == '~') goto yy194;
- goto yy198;
- }
- }
- yy198:
- { RETURN(START_SECTION_ID); }
- yy199: yych = *++YYCURSOR;
- if(yybm[0+yych] & 4) {
- goto yy200;
- }
- goto yy195;
- yy200: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy201;
- yy201: if(yybm[0+yych] & 4) {
- goto yy200;
- }
- if(yych <= '>'){
- if(yych <= '$'){
- if(yych >= '#') goto yy194;
- goto yy202;
- } else {
- if(yych == '.') goto yy194;
- goto yy202;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'Z') goto yy194;
- if(yych >= 'g') goto yy194;
- goto yy202;
- } else {
- if(yych == '~') goto yy194;
- goto yy202;
- }
- }
- yy202:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- if (s->tok[1] == 'x' || s->tok[1] == 'X')
- /* skip 0 and x */
- lvalp->intn = yasm_intnum_create_hex(TOK+2);
- else
- /* don't skip 0 */
- lvalp->intn = yasm_intnum_create_hex(TOK+1);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy203: yyaccept = 2;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy204;
- yy204: if(yybm[0+yych] & 8) {
- goto yy203;
- }
- if(yych == 'E') goto yy212;
- if(yych == 'e') goto yy212;
- goto yy205;
- yy205:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(FLTNUM);
- }
- yy206: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy207;
- yy207: if(yych <= 'G'){
- if(yych <= '/'){
- if(yych == '.') goto yy203;
- goto yy3;
- } else {
- if(yych <= '9') goto yy206;
- if(yych <= '@') goto yy3;
- if(yych >= 'G') goto yy3;
- goto yy208;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'H') goto yy210;
- if(yych != '_') goto yy3;
- goto yy208;
- } else {
- if(yych <= 'f') goto yy208;
- if(yych == 'h') goto yy210;
- goto yy3;
- }
- }
- yy208: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy209;
- yy209: if(yych <= 'H'){
- if(yych <= '@'){
- if(yych <= '/') goto yy189;
- if(yych <= '9') goto yy208;
- goto yy189;
- } else {
- if(yych <= 'F') goto yy208;
- if(yych <= 'G') goto yy189;
- goto yy210;
- }
- } else {
- if(yych <= '`'){
- if(yych == '_') goto yy208;
- goto yy189;
- } else {
- if(yych <= 'f') goto yy208;
- if(yych != 'h') goto yy189;
- goto yy210;
- }
- }
- yy210: yych = *++YYCURSOR;
- goto yy211;
- yy211:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'h' */
- lvalp->intn = yasm_intnum_create_hex(TOK);
- RETURN(INTNUM);
- }
- yy212: yych = *++YYCURSOR;
- if(yych <= ','){
- if(yych != '+') goto yy189;
- goto yy213;
- } else {
- if(yych <= '-') goto yy213;
- if(yych <= '/') goto yy189;
- if(yych <= '9') goto yy214;
- goto yy189;
- }
- yy213: yych = *++YYCURSOR;
- if(yych <= '/') goto yy189;
- if(yych >= ':') goto yy189;
- goto yy214;
- yy214: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy215;
- yy215: if(yych <= '/') goto yy205;
- if(yych <= '9') goto yy214;
- goto yy205;
- yy216: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy217;
- yy217: if(yybm[0+yych] & 16) {
- goto yy216;
- }
- if(yych <= 'P'){
- if(yych <= '@'){
- if(yych <= '.'){
- if(yych <= '-') goto yy3;
- goto yy203;
- } else {
- if(yych <= '/') goto yy3;
- if(yych <= '9') goto yy206;
- goto yy3;
- }
- } else {
- if(yych <= 'H'){
- if(yych <= 'F') goto yy208;
- if(yych <= 'G') goto yy3;
- goto yy210;
- } else {
- if(yych == 'O') goto yy220;
- goto yy3;
- }
- }
- } else {
- if(yych <= 'g'){
- if(yych <= '_'){
- if(yych <= 'Q') goto yy220;
- if(yych <= '^') goto yy3;
- goto yy218;
- } else {
- if(yych <= '`') goto yy3;
- if(yych <= 'f') goto yy208;
- goto yy3;
- }
- } else {
- if(yych <= 'o'){
- if(yych <= 'h') goto yy210;
- if(yych <= 'n') goto yy3;
- goto yy220;
- } else {
- if(yych == 'q') goto yy220;
- goto yy3;
- }
- }
- }
- yy218: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy219;
- yy219: if(yybm[0+yych] & 32) {
- goto yy218;
- }
- if(yych <= 'P'){
- if(yych <= 'F'){
- if(yych <= '7') goto yy189;
- if(yych <= '9') goto yy208;
- if(yych <= '@') goto yy189;
- goto yy208;
- } else {
- if(yych <= 'H'){
- if(yych <= 'G') goto yy189;
- goto yy210;
- } else {
- if(yych != 'O') goto yy189;
- goto yy220;
- }
- }
- } else {
- if(yych <= 'h'){
- if(yych <= '`'){
- if(yych >= 'R') goto yy189;
- goto yy220;
- } else {
- if(yych <= 'f') goto yy208;
- if(yych <= 'g') goto yy189;
- goto yy210;
- }
- } else {
- if(yych <= 'o'){
- if(yych <= 'n') goto yy189;
- goto yy220;
- } else {
- if(yych != 'q') goto yy189;
- goto yy220;
- }
- }
- }
- yy220: yych = *++YYCURSOR;
- goto yy221;
- yy221:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'q' or 'o' */
- lvalp->intn = yasm_intnum_create_oct(TOK);
- RETURN(INTNUM);
- }
- yy222: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- goto yy223;
- yy223: if(yybm[0+yych] & 64) {
- goto yy222;
- }
- switch(yych){
- case '.': goto yy203;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy216;
- case '8':
- case '9': goto yy206;
- case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy208;
- case 'B': case 'b': goto yy224;
- case 'H': case 'h': goto yy210;
- case 'O': case 'Q': case 'o': case 'q': goto yy220;
- case '_': goto yy226;
- default: goto yy3;
- }
- yy224: yyaccept = 3;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= 'H'){
- if(yych <= '@'){
- if(yych <= '/') goto yy225;
- if(yych <= '9') goto yy208;
- goto yy225;
- } else {
- if(yych <= 'F') goto yy208;
- if(yych >= 'H') goto yy210;
- goto yy225;
- }
- } else {
- if(yych <= '`'){
- if(yych == '_') goto yy208;
- goto yy225;
- } else {
- if(yych <= 'f') goto yy208;
- if(yych == 'h') goto yy210;
- goto yy225;
- }
- }
- yy225:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'b' */
- lvalp->intn = yasm_intnum_create_bin(TOK);
- RETURN(INTNUM);
- }
- yy226: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- goto yy227;
- yy227: if(yybm[0+yych] & 128) {
- goto yy226;
- }
- switch(yych){
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy218;
- case '8':
- case '9': case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy208;
- case 'B': case 'b': goto yy224;
- case 'H': case 'h': goto yy210;
- case 'O': case 'Q': case 'o': case 'q': goto yy220;
- default: goto yy189;
- }
- yy228: yych = *++YYCURSOR;
- if(yych <= 'F'){
- if(yych <= '/') goto yy189;
- if(yych <= '9') goto yy229;
- if(yych <= '@') goto yy189;
- goto yy229;
- } else {
- if(yych <= '_'){
- if(yych <= '^') goto yy189;
- goto yy229;
- } else {
- if(yych <= '`') goto yy189;
- if(yych >= 'g') goto yy189;
- goto yy229;
- }
- }
- yy229: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy230;
- yy230: if(yych <= 'F'){
- if(yych <= '/') goto yy202;
- if(yych <= '9') goto yy229;
- if(yych <= '@') goto yy202;
- goto yy229;
- } else {
- if(yych <= '_'){
- if(yych <= '^') goto yy202;
- goto yy229;
- } else {
- if(yych <= '`') goto yy202;
- if(yych <= 'f') goto yy229;
- goto yy202;
- }
- }
- }
- }
- /* %line linenum+lineinc filename */
- linechg:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- {
- YYCTYPE yych;
- goto yy231;
- ++YYCURSOR;
- yy231:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= '\037'){
- if(yych <= '\t'){
- if(yych <= '\000') goto yy235;
- if(yych <= '\b') goto yy241;
- goto yy239;
- } else {
- if(yych == '\r') goto yy239;
- goto yy241;
- }
- } else {
- if(yych <= '+'){
- if(yych <= ' ') goto yy239;
- if(yych <= '*') goto yy241;
- goto yy237;
- } else {
- if(yych <= '/') goto yy241;
- if(yych >= ':') goto yy241;
- goto yy233;
- }
- }
- yy233: yych = *++YYCURSOR;
- goto yy246;
- yy234:
- {
- linechg_numcount++;
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy235: yych = *++YYCURSOR;
- goto yy236;
- yy236:
- { goto endofinput; }
- yy237: yych = *++YYCURSOR;
- goto yy238;
- yy238:
- {
- RETURN(s->tok[0]);
- }
- yy239: yych = *++YYCURSOR;
- goto yy244;
- yy240:
- {
- if (linechg_numcount == 2) {
- parser_nasm->state = LINECHG2;
- goto linechg2;
- }
- goto linechg;
- }
- yy241: yych = *++YYCURSOR;
- goto yy242;
- yy242:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto linechg;
- }
- yy243: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy244;
- yy244: if(yybm[0+yych] & 64) {
- goto yy243;
- }
- goto yy240;
- yy245: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy246;
- yy246: if(yybm[0+yych] & 128) {
- goto yy245;
- }
- goto yy234;
- }
- }
- linechg2:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- };
- {
- YYCTYPE yych;
- goto yy247;
- ++YYCURSOR;
- yy247:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= '\000') goto yy249;
- if(yych == '\r') goto yy251;
- goto yy253;
- yy249: yych = *++YYCURSOR;
- goto yy250;
- yy250:
- { goto endofinput; }
- yy251: yych = *++YYCURSOR;
- if(yybm[0+yych] & 128) {
- goto yy253;
- }
- goto yy252;
- yy252:
- { goto linechg2; }
- yy253: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy254;
- yy254: if(yybm[0+yych] & 128) {
- goto yy253;
- }
- goto yy255;
- yy255:
- {
- parser_nasm->state = LINECHG;
- lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
- RETURN(FILENAME);
- }
- }
- }
- /* directive: [name value] */
- directive:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 0, 0, 0, 0, 0, 0,
- 0, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
- 0, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- {
- YYCTYPE yych;
- goto yy256;
- ++YYCURSOR;
- yy256:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= ']'){
- if(yych <= '@'){
- if(yych >= '\001') goto yy263;
- goto yy258;
- } else {
- if(yych <= 'Z') goto yy261;
- if(yych <= '\\') goto yy263;
- goto yy260;
- }
- } else {
- if(yych <= '_'){
- if(yych <= '^') goto yy263;
- goto yy261;
- } else {
- if(yych <= '`') goto yy263;
- if(yych <= 'z') goto yy261;
- goto yy263;
- }
- }
- yy258: yych = *++YYCURSOR;
- goto yy259;
- yy259:
- { goto endofinput; }
- yy260: yych = *++YYCURSOR;
- goto yy259;
- yy261: yych = *++YYCURSOR;
- goto yy266;
- yy262:
- {
- lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
- if (yasm__strcasecmp(lvalp->str_val, "section") == 0 ||
- yasm__strcasecmp(lvalp->str_val, "segment") == 0)
- parser_nasm->state = SECTION_DIRECTIVE;
- else
- parser_nasm->state = DIRECTIVE2;
- RETURN(DIRECTIVE_NAME);
- }
- yy263: yych = *++YYCURSOR;
- goto yy264;
- yy264:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto directive;
- }
- yy265: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy266;
- yy266: if(yybm[0+yych] & 128) {
- goto yy265;
- }
- goto yy262;
- }
- }
- /* section directive (the section name portion thereof) */
- section_directive:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 0, 0, 128, 128, 0, 0, 0,
- 0, 0, 0, 0, 0, 128, 128, 0,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 0, 0, 0, 0, 0, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
- 0, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 128, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- {
- YYCTYPE yych;
- goto yy267;
- ++YYCURSOR;
- yy267:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= ','){
- if(yych <= '\037'){
- if(yych <= '\t'){
- if(yych <= '\000') goto yy275;
- if(yych <= '\b') goto yy278;
- goto yy273;
- } else {
- if(yych == '\r') goto yy273;
- goto yy278;
- }
- } else {
- if(yych <= '"'){
- if(yych <= ' ') goto yy273;
- if(yych <= '!') goto yy278;
- goto yy271;
- } else {
- if(yych <= '$') goto yy269;
- if(yych == '\'') goto yy271;
- goto yy278;
- }
- }
- } else {
- if(yych <= ']'){
- if(yych <= '9'){
- if(yych == '/') goto yy278;
- goto yy269;
- } else {
- if(yych <= '>') goto yy278;
- if(yych <= 'Z') goto yy269;
- if(yych <= '\\') goto yy278;
- goto yy277;
- }
- } else {
- if(yych <= '`'){
- if(yych != '_') goto yy278;
- goto yy269;
- } else {
- if(yych <= 'z') goto yy269;
- if(yych != '~') goto yy278;
- goto yy269;
- }
- }
- }
- yy269: yych = *++YYCURSOR;
- goto yy283;
- yy270:
- {
- lvalp->str.contents = yasm__xstrndup(TOK, TOKLEN);
- lvalp->str.len = TOKLEN;
- parser_nasm->state = DIRECTIVE2;
- RETURN(STRING);
- }
- yy271: yych = *++YYCURSOR;
- goto yy272;
- yy272:
- {
- parser_nasm->state = DIRECTIVE2;
- endch = s->tok[0];
- goto stringconst;
- }
- yy273: yych = *++YYCURSOR;
- goto yy281;
- yy274:
- {
- parser_nasm->state = DIRECTIVE2;
- goto section_directive;
- }
- yy275: yych = *++YYCURSOR;
- goto yy276;
- yy276:
- { goto endofinput; }
- yy277: yych = *++YYCURSOR;
- goto yy276;
- yy278: yych = *++YYCURSOR;
- goto yy279;
- yy279:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto section_directive;
- }
- yy280: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy281;
- yy281: if(yybm[0+yych] & 64) {
- goto yy280;
- }
- goto yy274;
- yy282: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy283;
- yy283: if(yybm[0+yych] & 128) {
- goto yy282;
- }
- goto yy270;
- }
- }
- /* inner part of directive */
- directive2:
- SCANINIT();
- if (*cursor == '\0')
- goto endofinput;
- {
- static unsigned char yybm[] = {
- 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 1,
- 255, 255, 63, 63, 63, 63, 63, 63,
- 15, 15, 1, 1, 1, 1, 1, 3,
- 3, 7, 7, 7, 7, 7, 7, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 1, 1, 1, 1, 167,
- 1, 7, 7, 7, 7, 7, 7, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 1, 1, 1, 3, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 128, 0, 0, 0, 128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- {
- YYCTYPE yych;
- unsigned int yyaccept;
- goto yy284;
- ++YYCURSOR;
- yy284:
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- if(yych <= '7'){
- if(yych <= '#'){
- if(yych <= '\r'){
- if(yych <= '\b'){
- if(yych <= '\000') goto yy309;
- goto yy311;
- } else {
- if(yych <= '\t') goto yy307;
- if(yych <= '\f') goto yy311;
- goto yy307;
- }
- } else {
- if(yych <= ' '){
- if(yych <= '\037') goto yy311;
- goto yy307;
- } else {
- if(yych == '"') goto yy293;
- goto yy311;
- }
- }
- } else {
- if(yych <= '-'){
- if(yych <= '%'){
- if(yych <= '$') goto yy291;
- goto yy299;
- } else {
- if(yych == '\'') goto yy293;
- goto yy300;
- }
- } else {
- if(yych <= '/'){
- if(yych <= '.') goto yy303;
- goto yy298;
- } else {
- if(yych <= '0') goto yy286;
- if(yych <= '1') goto yy288;
- goto yy289;
- }
- }
- }
- } else {
- if(yych <= '['){
- if(yych <= '='){
- if(yych <= ':'){
- if(yych <= '9') goto yy290;
- goto yy300;
- } else {
- if(yych <= ';') goto yy305;
- if(yych <= '<') goto yy295;
- goto yy300;
- }
- } else {
- if(yych <= '?'){
- if(yych <= '>') goto yy297;
- goto yy303;
- } else {
- if(yych <= '@') goto yy311;
- if(yych <= 'Z') goto yy303;
- goto yy300;
- }
- }
- } else {
- if(yych <= '`'){
- if(yych <= ']'){
- if(yych <= '\\') goto yy311;
- goto yy301;
- } else {
- if(yych <= '^') goto yy300;
- if(yych <= '_') goto yy303;
- goto yy311;
- }
- } else {
- if(yych <= '|'){
- if(yych <= 'z') goto yy303;
- if(yych <= '{') goto yy311;
- goto yy300;
- } else {
- if(yych == '~') goto yy300;
- goto yy311;
- }
- }
- }
- }
- yy286: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'X') goto yy352;
- if(yych == 'x') goto yy352;
- goto yy347;
- yy287:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy288: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- goto yy347;
- yy289: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- goto yy341;
- yy290: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- goto yy334;
- yy291: yych = *++YYCURSOR;
- if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy292;
- if(yych <= '$') goto yy326;
- goto yy292;
- } else {
- if(yych <= '.') goto yy326;
- if(yych <= '/') goto yy292;
- if(yych <= '9') goto yy329;
- goto yy292;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy326;
- if(yych == '_') goto yy326;
- goto yy292;
- } else {
- if(yych <= 'z') goto yy326;
- if(yych == '~') goto yy326;
- goto yy292;
- }
- }
- yy292:
- { RETURN(s->tok[0]); }
- yy293: yych = *++YYCURSOR;
- goto yy294;
- yy294:
- {
- endch = s->tok[0];
- goto stringconst;
- }
- yy295: yych = *++YYCURSOR;
- if(yych == '<') goto yy324;
- goto yy296;
- yy296:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto scan;
- }
- yy297: yych = *++YYCURSOR;
- if(yych == '>') goto yy322;
- goto yy296;
- yy298: yych = *++YYCURSOR;
- if(yych == '/') goto yy320;
- goto yy292;
- yy299: yych = *++YYCURSOR;
- if(yych == '%') goto yy318;
- goto yy292;
- yy300: yych = *++YYCURSOR;
- goto yy292;
- yy301: yych = *++YYCURSOR;
- goto yy302;
- yy302:
- { goto endofinput; }
- yy303: yych = *++YYCURSOR;
- goto yy317;
- yy304:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- switch (yasm_arch_parse_check_regtmod
- (p_object->arch, TOK, TOKLEN, &lvalp->arch_data)) {
- case YASM_ARCH_REG:
- s->tok[TOKLEN] = savech;
- RETURN(REG);
- default:
- s->tok[TOKLEN] = savech;
- }
- /* Propagate errors in case we got a warning from the arch */
- yasm_errwarn_propagate(parser_nasm->errwarns, cur_line);
- /* Just an identifier, return as such. */
- lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
- RETURN(ID);
- }
- yy305: yych = *++YYCURSOR;
- goto yy315;
- yy306:
- { goto directive2; }
- yy307: yych = *++YYCURSOR;
- goto yy313;
- yy308:
- { goto directive2; }
- yy309: yych = *++YYCURSOR;
- goto yy310;
- yy310:
- { goto endofinput; }
- yy311: yych = *++YYCURSOR;
- goto yy296;
- yy312: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy313;
- yy313: if(yybm[256+yych] & 128) {
- goto yy312;
- }
- goto yy308;
- yy314: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy315;
- yy315: if(yybm[0+yych] & 1) {
- goto yy314;
- }
- goto yy306;
- yy316: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy317;
- yy317: if(yybm[0+yych] & 2) {
- goto yy316;
- }
- goto yy304;
- yy318: yych = *++YYCURSOR;
- goto yy319;
- yy319:
- { RETURN(SIGNMOD); }
- yy320: yych = *++YYCURSOR;
- goto yy321;
- yy321:
- { RETURN(SIGNDIV); }
- yy322: yych = *++YYCURSOR;
- goto yy323;
- yy323:
- { RETURN(RIGHT_OP); }
- yy324: yych = *++YYCURSOR;
- goto yy325;
- yy325:
- { RETURN(LEFT_OP); }
- yy326: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy327;
- yy327: if(yych <= '>'){
- if(yych <= '-'){
- if(yych <= '"') goto yy328;
- if(yych <= '$') goto yy326;
- goto yy328;
- } else {
- if(yych == '/') goto yy328;
- if(yych <= '9') goto yy326;
- goto yy328;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy326;
- if(yych == '_') goto yy326;
- goto yy328;
- } else {
- if(yych <= 'z') goto yy326;
- if(yych == '~') goto yy326;
- goto yy328;
- }
- }
- yy328:
- {
- lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
- RETURN(ID);
- }
- yy329: yych = *++YYCURSOR;
- if(yybm[0+yych] & 4) {
- goto yy330;
- }
- goto yy327;
- yy330: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy331;
- yy331: if(yybm[0+yych] & 4) {
- goto yy330;
- }
- if(yych <= '>'){
- if(yych <= '$'){
- if(yych >= '#') goto yy326;
- goto yy332;
- } else {
- if(yych == '.') goto yy326;
- goto yy332;
- }
- } else {
- if(yych <= 'z'){
- if(yych <= 'Z') goto yy326;
- if(yych >= 'g') goto yy326;
- goto yy332;
- } else {
- if(yych == '~') goto yy326;
- goto yy332;
- }
- }
- yy332:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- if (s->tok[1] == 'x' || s->tok[1] == 'X')
- /* skip 0 and x */
- lvalp->intn = yasm_intnum_create_hex(TOK+2);
- else
- /* don't skip 0 */
- lvalp->intn = yasm_intnum_create_hex(TOK+1);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy333: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy334;
- yy334: if(yybm[0+yych] & 8) {
- goto yy333;
- }
- if(yych <= '^'){
- if(yych <= 'F'){
- if(yych <= '@') goto yy287;
- goto yy335;
- } else {
- if(yych == 'H') goto yy338;
- goto yy287;
- }
- } else {
- if(yych <= 'f'){
- if(yych == '`') goto yy287;
- goto yy335;
- } else {
- if(yych == 'h') goto yy338;
- goto yy287;
- }
- }
- yy335: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy336;
- yy336: if(yych <= 'H'){
- if(yych <= '@'){
- if(yych <= '/') goto yy337;
- if(yych <= '9') goto yy335;
- goto yy337;
- } else {
- if(yych <= 'F') goto yy335;
- if(yych >= 'H') goto yy338;
- goto yy337;
- }
- } else {
- if(yych <= '`'){
- if(yych == '_') goto yy335;
- goto yy337;
- } else {
- if(yych <= 'f') goto yy335;
- if(yych == 'h') goto yy338;
- goto yy337;
- }
- }
- yy337: YYCURSOR = YYMARKER;
- switch(yyaccept){
- case 0: goto yy287;
- case 1: goto yy349;
- }
- yy338: yych = *++YYCURSOR;
- goto yy339;
- yy339:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'h' */
- lvalp->intn = yasm_intnum_create_hex(TOK);
- RETURN(INTNUM);
- }
- yy340: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy341;
- yy341: if(yybm[0+yych] & 16) {
- goto yy340;
- }
- if(yych <= 'Q'){
- if(yych <= 'G'){
- if(yych <= '9'){
- if(yych <= '7') goto yy287;
- goto yy333;
- } else {
- if(yych <= '@') goto yy287;
- if(yych <= 'F') goto yy335;
- goto yy287;
- }
- } else {
- if(yych <= 'N'){
- if(yych <= 'H') goto yy338;
- goto yy287;
- } else {
- if(yych == 'P') goto yy287;
- goto yy344;
- }
- }
- } else {
- if(yych <= 'g'){
- if(yych <= '_'){
- if(yych <= '^') goto yy287;
- goto yy342;
- } else {
- if(yych <= '`') goto yy287;
- if(yych <= 'f') goto yy335;
- goto yy287;
- }
- } else {
- if(yych <= 'o'){
- if(yych <= 'h') goto yy338;
- if(yych <= 'n') goto yy287;
- goto yy344;
- } else {
- if(yych == 'q') goto yy344;
- goto yy287;
- }
- }
- }
- yy342: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy343;
- yy343: if(yybm[0+yych] & 32) {
- goto yy342;
- }
- if(yych <= 'P'){
- if(yych <= 'F'){
- if(yych <= '7') goto yy337;
- if(yych <= '9') goto yy335;
- if(yych <= '@') goto yy337;
- goto yy335;
- } else {
- if(yych <= 'H'){
- if(yych <= 'G') goto yy337;
- goto yy338;
- } else {
- if(yych != 'O') goto yy337;
- goto yy344;
- }
- }
- } else {
- if(yych <= 'h'){
- if(yych <= '`'){
- if(yych >= 'R') goto yy337;
- goto yy344;
- } else {
- if(yych <= 'f') goto yy335;
- if(yych <= 'g') goto yy337;
- goto yy338;
- }
- } else {
- if(yych <= 'o'){
- if(yych <= 'n') goto yy337;
- goto yy344;
- } else {
- if(yych != 'q') goto yy337;
- goto yy344;
- }
- }
- }
- yy344: yych = *++YYCURSOR;
- goto yy345;
- yy345:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'q' or 'o' */
- lvalp->intn = yasm_intnum_create_oct(TOK);
- RETURN(INTNUM);
- }
- yy346: yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- goto yy347;
- yy347: if(yybm[0+yych] & 64) {
- goto yy346;
- }
- switch(yych){
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy340;
- case '8':
- case '9': goto yy333;
- case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy335;
- case 'B': case 'b': goto yy348;
- case 'H': case 'h': goto yy338;
- case 'O': case 'Q': case 'o': case 'q': goto yy344;
- case '_': goto yy350;
- default: goto yy287;
- }
- yy348: yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= 'H'){
- if(yych <= '@'){
- if(yych <= '/') goto yy349;
- if(yych <= '9') goto yy335;
- goto yy349;
- } else {
- if(yych <= 'F') goto yy335;
- if(yych >= 'H') goto yy338;
- goto yy349;
- }
- } else {
- if(yych <= '`'){
- if(yych == '_') goto yy335;
- goto yy349;
- } else {
- if(yych <= 'f') goto yy335;
- if(yych == 'h') goto yy338;
- goto yy349;
- }
- }
- yy349:
- {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'b' */
- lvalp->intn = yasm_intnum_create_bin(TOK);
- RETURN(INTNUM);
- }
- yy350: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- goto yy351;
- yy351: if(yybm[0+yych] & 128) {
- goto yy350;
- }
- switch(yych){
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy342;
- case '8':
- case '9': case 'A': case 'C':
- case 'D':
- case 'E':
- case 'F': case 'a': case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy335;
- case 'B': case 'b': goto yy348;
- case 'H': case 'h': goto yy338;
- case 'O': case 'Q': case 'o': case 'q': goto yy344;
- default: goto yy337;
- }
- yy352: yych = *++YYCURSOR;
- if(yych <= 'F'){
- if(yych <= '/') goto yy337;
- if(yych <= '9') goto yy353;
- if(yych <= '@') goto yy337;
- goto yy353;
- } else {
- if(yych <= '_'){
- if(yych <= '^') goto yy337;
- goto yy353;
- } else {
- if(yych <= '`') goto yy337;
- if(yych >= 'g') goto yy337;
- goto yy353;
- }
- }
- yy353: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy354;
- yy354: if(yych <= 'F'){
- if(yych <= '/') goto yy332;
- if(yych <= '9') goto yy353;
- if(yych <= '@') goto yy332;
- goto yy353;
- } else {
- if(yych <= '_'){
- if(yych <= '^') goto yy332;
- goto yy353;
- } else {
- if(yych <= '`') goto yy332;
- if(yych <= 'f') goto yy353;
- goto yy332;
- }
- }
- }
- }
- /* string/character constant values */
- stringconst:
- strbuf = yasm_xmalloc(STRBUF_ALLOC_SIZE);
- strbuf_size = STRBUF_ALLOC_SIZE;
- count = 0;
- stringconst_scan:
- SCANINIT();
- if (*cursor == '\0')
- goto stringconst_error;
- {
- {
- YYCTYPE yych;
- goto yy355;
- ++YYCURSOR;
- yy355:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= '"'){
- if(yych <= '\000') goto yy357;
- if(yych <= '!') goto yy362;
- goto yy361;
- } else {
- if(yych == '\'') goto yy359;
- goto yy362;
- }
- yy357: yych = *++YYCURSOR;
- goto yy358;
- yy358:
- { goto stringconst_error; }
- yy359: yych = *++YYCURSOR;
- if(yych == '\'') goto yy363;
- goto yy360;
- yy360:
- {
- if (s->tok[0] == endch)
- goto stringconst_end;
- strbuf[count++] = s->tok[0];
- if (count >= strbuf_size) {
- strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
- strbuf_size += STRBUF_ALLOC_SIZE;
- }
- goto stringconst_scan;
- }
- yy361: yych = *++YYCURSOR;
- if(yych == '"') goto yy363;
- goto yy360;
- yy362: yych = *++YYCURSOR;
- goto yy360;
- yy363: yych = *++YYCURSOR;
- goto yy364;
- yy364:
- {
- if (endch != s->tok[0]) {
- strbuf[count++] = s->tok[0];
- if (count >= strbuf_size) {
- strbuf = yasm_xrealloc(strbuf,
- strbuf_size + STRBUF_ALLOC_SIZE);
- strbuf_size += STRBUF_ALLOC_SIZE;
- }
- } else if (!parser_nasm->tasm) {
- YYCURSOR--;
- goto stringconst_end;
- }
- strbuf[count++] = s->tok[0];
- if (count >= strbuf_size) {
- strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
- strbuf_size += STRBUF_ALLOC_SIZE;
- }
- goto stringconst_scan;
- }
- }
- }
- stringconst_error:
- yasm_error_set(YASM_ERROR_SYNTAX, N_("unterminated string"));
- stringconst_end:
- strbuf[count] = '\0';
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- RETURN(STRING);
- endofinput:
- parser_nasm->state = INITIAL;
- RETURN(s->tok[0]);
- }
|