123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407 |
- /* Generated by re2c
- */
- /*
- * GAS-compatible re2c lexer
- *
- * Copyright (C) 2005-2007 Peter Johnson
- *
- * 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.
- * 3. Neither the name of the author nor the names of other contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * 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/gas/gas-parser.h"
- #define BSIZE 8192
- #define YYCURSOR cursor
- #define YYLIMIT (s->lim)
- #define YYMARKER (s->ptr)
- #define YYFILL(n) {cursor = fill(parser_gas, cursor);}
- #define RETURN(i) do {s->cur = cursor; parser_gas->tokch = s->tok[0]; \
- return i;} while (0)
- #define SCANINIT() {s->tok = cursor;}
- #define TOK ((char *)s->tok)
- #define TOKLEN (size_t)(cursor-s->tok)
- /* Bridge function to convert byte-oriented parser with line-oriented
- * preprocessor.
- */
- static size_t
- preproc_input(yasm_parser_gas *parser_gas, /*@out@*/ YYCTYPE *buf,
- size_t max_size)
- {
- size_t tot=0;
- while (max_size > 0) {
- size_t n;
- if (!parser_gas->line) {
- parser_gas->line = yasm_preproc_get_line(parser_gas->preproc);
- if (!parser_gas->line)
- return tot; /* EOF */
- parser_gas->linepos = parser_gas->line;
- parser_gas->lineleft = strlen(parser_gas->line) + 1;
- parser_gas->line[parser_gas->lineleft-1] = '\n';
- }
- n = parser_gas->lineleft<max_size ? parser_gas->lineleft : max_size;
- strncpy((char *)buf+tot, parser_gas->linepos, n);
- if (n == parser_gas->lineleft) {
- yasm_xfree(parser_gas->line);
- parser_gas->line = NULL;
- } else {
- parser_gas->lineleft -= n;
- parser_gas->linepos += n;
- }
- tot += n;
- max_size -= n;
- }
- return tot;
- }
- #if 0
- static size_t
- fill_input(void *d, unsigned char *buf, size_t max)
- {
- return yasm_preproc_input((yasm_preproc *)d, (char *)buf, max);
- }
- #endif
- static YYCTYPE *
- fill(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
- {
- yasm_scanner *s = &parser_gas->s;
- int first = 0;
- if(!s->eof){
- size_t cnt = s->tok - s->bot;
- if(cnt){
- memmove(s->bot, s->tok, (size_t)(s->lim - s->tok));
- s->tok = s->bot;
- s->ptr -= cnt;
- cursor -= cnt;
- s->lim -= cnt;
- }
- if (!s->bot)
- first = 1;
- if((s->top - s->lim) < BSIZE){
- YYCTYPE *buf = yasm_xmalloc((size_t)(s->lim - s->bot) + BSIZE);
- memcpy(buf, s->tok, (size_t)(s->lim - s->tok));
- s->tok = buf;
- s->ptr = &buf[s->ptr - s->bot];
- cursor = &buf[cursor - s->bot];
- s->lim = &buf[s->lim - s->bot];
- s->top = &s->lim[BSIZE];
- if (s->bot)
- yasm_xfree(s->bot);
- s->bot = buf;
- }
- if((cnt = preproc_input(parser_gas, s->lim, BSIZE)) == 0) {
- s->eof = &s->lim[cnt]; *s->eof++ = '\n';
- }
- s->lim += cnt;
- if (first && parser_gas->save_input) {
- int i;
- YYCTYPE *saveline;
- parser_gas->save_last ^= 1;
- saveline = parser_gas->save_line[parser_gas->save_last];
- /* save next line into cur_line */
- for (i=0; i<79 && &s->tok[i] < s->lim && s->tok[i] != '\n'; i++)
- saveline[i] = s->tok[i];
- saveline[i] = '\0';
- }
- }
- return cursor;
- }
- static YYCTYPE *
- save_line(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
- {
- yasm_scanner *s = &parser_gas->s;
- int i = 0;
- YYCTYPE *saveline;
- parser_gas->save_last ^= 1;
- saveline = parser_gas->save_line[parser_gas->save_last];
- /* save next line into cur_line */
- if ((YYLIMIT - YYCURSOR) < 80)
- YYFILL(80);
- for (i=0; i<79 && &cursor[i] < s->lim && cursor[i] != '\n'; i++)
- saveline[i] = cursor[i];
- saveline[i] = '\0';
- return cursor;
- }
- /* 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 void
- strbuf_append(size_t count, YYCTYPE *cursor, yasm_scanner *s, int ch)
- {
- if (count >= strbuf_size) {
- strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
- strbuf_size += STRBUF_ALLOC_SIZE;
- }
- strbuf[count] = ch;
- }
- int
- gas_parser_lex(YYSTYPE *lvalp, yasm_parser_gas *parser_gas)
- {
- yasm_scanner *s = &parser_gas->s;
- YYCTYPE *cursor = s->cur;
- size_t count;
- YYCTYPE savech;
- /* Handle one token of lookahead */
- if (parser_gas->peek_token != NONE) {
- int tok = parser_gas->peek_token;
- *lvalp = parser_gas->peek_tokval; /* structure copy */
- parser_gas->tokch = parser_gas->peek_tokch;
- parser_gas->peek_token = NONE;
- return tok;
- }
- /* Catch EOF */
- if (s->eof && cursor == s->eof)
- return 0;
- /* Jump to proper "exclusive" states */
- switch (parser_gas->state) {
- case COMMENT:
- goto comment;
- case SECTION_DIRECTIVE:
- goto section_directive;
- case NASM_FILENAME:
- goto nasm_filename;
- default:
- break;
- }
- scan:
- SCANINIT();
- {
- static unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 12, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 12, 0,
- 254, 254, 126, 126, 126, 126, 126, 126,
- 94, 94, 0, 0, 0, 0, 0, 0,
- 8, 78, 78, 78, 78, 78, 78, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 0, 0, 0, 0, 12,
- 0, 78, 78, 78, 78, 78, 78, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 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) < 5) YYFILL(5);
- yych = *YYCURSOR;
- if(yych <= '/'){
- if(yych <= '#'){
- if(yych <= '\r'){
- if(yych <= '\t'){
- if(yych <= '\b') goto yy30;
- goto yy26;
- } else {
- if(yych <= '\n') goto yy28;
- if(yych <= '\f') goto yy30;
- goto yy26;
- }
- } else {
- if(yych <= ' '){
- if(yych <= '\037') goto yy30;
- goto yy26;
- } else {
- if(yych <= '!') goto yy17;
- if(yych <= '"') goto yy11;
- goto yy24;
- }
- }
- } else {
- if(yych <= '*'){
- if(yych <= '%'){
- if(yych <= '$') goto yy17;
- goto yy22;
- } else {
- if(yych == '\'') goto yy9;
- goto yy17;
- }
- } else {
- if(yych <= ','){
- if(yych <= '+') goto yy5;
- goto yy17;
- } else {
- if(yych <= '-') goto yy5;
- if(yych <= '.') goto yy7;
- goto yy18;
- }
- }
- }
- } else {
- if(yych <= 'Z'){
- if(yych <= '<'){
- if(yych <= '9'){
- if(yych >= '1') goto yy4;
- goto yy2;
- } else {
- if(yych <= ':') goto yy17;
- if(yych <= ';') goto yy19;
- goto yy13;
- }
- } else {
- if(yych <= '>'){
- if(yych <= '=') goto yy17;
- goto yy15;
- } else {
- if(yych <= '?') goto yy30;
- if(yych <= '@') goto yy17;
- goto yy21;
- }
- }
- } else {
- if(yych <= 'z'){
- if(yych <= '^'){
- if(yych <= ']') goto yy30;
- goto yy17;
- } else {
- if(yych == '`') goto yy30;
- goto yy21;
- }
- } else {
- if(yych <= '|'){
- if(yych <= '{') goto yy30;
- goto yy17;
- } else {
- if(yych == '~') goto yy17;
- goto yy30;
- }
- }
- }
- }
- yy2: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= 'T'){
- if(yych <= 'A'){
- if(yych <= '/'){
- if(yych == '.') goto yy90;
- goto yy3;
- } else {
- if(yych <= '9') goto yy90;
- if(yych <= ':') goto yy81;
- goto yy3;
- }
- } else {
- if(yych <= 'E'){
- if(yych <= 'B') goto yy85;
- if(yych >= 'D') goto yy88;
- goto yy3;
- } else {
- if(yych <= 'F') goto yy86;
- if(yych >= 'T') goto yy88;
- goto yy3;
- }
- }
- } else {
- if(yych <= 'e'){
- if(yych <= 'a'){
- if(yych == 'X') goto yy92;
- goto yy3;
- } else {
- if(yych <= 'b') goto yy85;
- if(yych >= 'd') goto yy88;
- goto yy3;
- }
- } else {
- if(yych <= 't'){
- if(yych <= 'f') goto yy86;
- if(yych >= 't') goto yy88;
- goto yy3;
- } else {
- if(yych == 'x') goto yy92;
- 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: yych = *++YYCURSOR;
- if(yych <= 'E'){
- if(yych <= ':'){
- if(yych <= '9') goto yy84;
- goto yy81;
- } else {
- if(yych == 'B') goto yy77;
- goto yy84;
- }
- } else {
- if(yych <= 'b'){
- if(yych <= 'F') goto yy79;
- if(yych <= 'a') goto yy84;
- goto yy77;
- } else {
- if(yych == 'f') goto yy79;
- goto yy84;
- }
- }
- yy5: yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych == '.') goto yy61;
- if(yych <= '/') goto yy6;
- if(yych <= '9') goto yy59;
- goto yy6;
- yy6:
- { RETURN(s->tok[0]); }
- yy7: yych = *++YYCURSOR;
- if(yybm[0+yych] & 16) {
- goto yy49;
- }
- goto yy37;
- yy8:
- {
- lvalp->str.contents = yasm__xstrndup(TOK, TOKLEN);
- lvalp->str.len = TOKLEN;
- RETURN(ID);
- }
- yy9: yych = *++YYCURSOR;
- goto yy10;
- yy10:
- {
- goto charconst;
- }
- yy11: yych = *++YYCURSOR;
- goto yy12;
- yy12:
- {
- goto stringconst;
- }
- yy13: yych = *++YYCURSOR;
- if(yych == '<') goto yy47;
- goto yy14;
- yy14:
- { RETURN(LEFT_OP); }
- yy15: yych = *++YYCURSOR;
- if(yych == '>') goto yy45;
- goto yy16;
- yy16:
- { RETURN(RIGHT_OP); }
- yy17: yych = *++YYCURSOR;
- goto yy6;
- yy18: yych = *++YYCURSOR;
- if(yych == '*') goto yy43;
- if(yych == '/') goto yy41;
- goto yy6;
- yy19: yych = *++YYCURSOR;
- goto yy20;
- yy20:
- {
- parser_gas->state = INITIAL;
- RETURN(s->tok[0]);
- }
- yy21: yych = *++YYCURSOR;
- goto yy37;
- yy22: yych = *++YYCURSOR;
- if(yybm[0+yych] & 2) {
- goto yy33;
- }
- goto yy23;
- yy23:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto scan;
- }
- yy24: yych = *++YYCURSOR;
- goto yy25;
- yy25:
- {
- if (parser_gas->is_cpp_preproc)
- {
- RETURN(CPP_LINE_MARKER);
- } else
- goto line_comment;
- }
- yy26: yych = *++YYCURSOR;
- goto yy32;
- yy27:
- { goto scan; }
- yy28: yych = *++YYCURSOR;
- goto yy29;
- yy29:
- {
- if (parser_gas->save_input)
- cursor = save_line(parser_gas, cursor);
- parser_gas->state = INITIAL;
- RETURN(s->tok[0]);
- }
- yy30: yych = *++YYCURSOR;
- goto yy23;
- yy31: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy32;
- yy32: if(yybm[0+yych] & 1) {
- goto yy31;
- }
- goto yy27;
- yy33: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy34;
- yy34: if(yybm[0+yych] & 2) {
- goto yy33;
- }
- goto yy35;
- yy35:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- if (parser_gas->is_nasm_preproc && strcmp(TOK+1, "line") == 0) {
- s->tok[TOKLEN] = savech;
- RETURN(NASM_LINE_MARKER);
- }
- switch (yasm_arch_parse_check_regtmod
- (p_object->arch, TOK+1, TOKLEN-1, &lvalp->arch_data)) {
- case YASM_ARCH_REG:
- s->tok[TOKLEN] = savech;
- RETURN(REG);
- case YASM_ARCH_REGGROUP:
- s->tok[TOKLEN] = savech;
- RETURN(REGGROUP);
- case YASM_ARCH_SEGREG:
- s->tok[TOKLEN] = savech;
- RETURN(SEGREG);
- default:
- break;
- }
- yasm_error_set(YASM_ERROR_GENERAL,
- N_("Unrecognized register name `%s'"), s->tok);
- s->tok[TOKLEN] = savech;
- lvalp->arch_data = 0;
- RETURN(REG);
- }
- yy36: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy37;
- yy37: if(yybm[0+yych] & 4) {
- goto yy36;
- }
- if(yych != '@') goto yy8;
- goto yy38;
- yy38: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy39;
- yy39: if(yybm[0+yych] & 8) {
- goto yy38;
- }
- goto yy40;
- yy40:
- {
- /* if @ not part of ID, move the scanner cursor to the first @ */
- if (!((yasm_objfmt_base *)p_object->objfmt)->module->id_at_ok)
- cursor = (unsigned char *)strchr(TOK, '@');
- lvalp->str.contents = yasm__xstrndup(TOK, TOKLEN);
- lvalp->str.len = TOKLEN;
- RETURN(ID);
- }
- yy41: yych = *++YYCURSOR;
- goto yy42;
- yy42:
- { goto line_comment; }
- yy43: yych = *++YYCURSOR;
- goto yy44;
- yy44:
- { parser_gas->state = COMMENT; goto comment; }
- yy45: yych = *++YYCURSOR;
- goto yy46;
- yy46:
- { RETURN(RIGHT_OP); }
- yy47: yych = *++YYCURSOR;
- goto yy48;
- yy48:
- { RETURN(LEFT_OP); }
- yy49: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy50;
- yy50: if(yybm[0+yych] & 16) {
- goto yy49;
- }
- if(yych <= 'E'){
- if(yych <= '.'){
- if(yych == '$') goto yy36;
- if(yych >= '.') goto yy36;
- goto yy51;
- } else {
- if(yych <= '?') goto yy51;
- if(yych <= '@') goto yy38;
- if(yych <= 'D') goto yy36;
- goto yy52;
- }
- } else {
- if(yych <= '`'){
- if(yych <= 'Z') goto yy36;
- if(yych == '_') goto yy36;
- goto yy51;
- } else {
- if(yych == 'e') goto yy52;
- if(yych <= 'z') goto yy36;
- goto yy51;
- }
- }
- yy51:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(FLTNUM);
- }
- yy52: yyaccept = 2;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= ','){
- if(yych == '+') goto yy55;
- goto yy37;
- } else {
- if(yych <= '-') goto yy55;
- if(yych <= '/') goto yy37;
- if(yych >= ':') goto yy37;
- goto yy53;
- }
- yy53: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy54;
- yy54: if(yych <= '?'){
- if(yych <= '-'){
- if(yych == '$') goto yy36;
- goto yy51;
- } else {
- if(yych <= '.') goto yy36;
- if(yych <= '/') goto yy51;
- if(yych <= '9') goto yy53;
- goto yy51;
- }
- } else {
- if(yych <= '^'){
- if(yych <= '@') goto yy38;
- if(yych <= 'Z') goto yy36;
- goto yy51;
- } else {
- if(yych == '`') goto yy51;
- if(yych <= 'z') goto yy36;
- goto yy51;
- }
- }
- yy55: yych = *++YYCURSOR;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy57;
- goto yy56;
- yy56: YYCURSOR = YYMARKER;
- switch(yyaccept){
- case 0: goto yy3;
- case 6: goto yy91;
- case 3: goto yy51;
- case 4: goto yy66;
- case 5: goto yy87;
- case 1: goto yy6;
- case 2: goto yy8;
- }
- yy57: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy58;
- yy58: if(yych <= '/') goto yy51;
- if(yych <= '9') goto yy57;
- goto yy51;
- yy59: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
- yych = *YYCURSOR;
- goto yy60;
- yy60: if(yych == '.') goto yy65;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy59;
- goto yy56;
- yy61: yych = *++YYCURSOR;
- if(yych <= '/') goto yy56;
- if(yych >= ':') goto yy56;
- goto yy62;
- yy62: yyaccept = 3;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy63;
- yy63: if(yych <= 'D'){
- if(yych <= '/') goto yy51;
- if(yych <= '9') goto yy62;
- goto yy51;
- } else {
- if(yych <= 'E') goto yy64;
- if(yych != 'e') goto yy51;
- goto yy64;
- }
- yy64: yych = *++YYCURSOR;
- if(yych <= ','){
- if(yych == '+') goto yy55;
- goto yy56;
- } else {
- if(yych <= '-') goto yy55;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy57;
- goto yy56;
- }
- yy65: yyaccept = 4;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych <= 'D'){
- if(yych <= '/') goto yy66;
- if(yych <= '9') goto yy67;
- goto yy66;
- } else {
- if(yych <= 'E') goto yy69;
- if(yych == 'e') goto yy69;
- goto yy66;
- }
- yy66:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(FLTNUM);
- }
- yy67: yyaccept = 3;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy68;
- yy68: if(yych <= 'D'){
- if(yych <= '/') goto yy51;
- if(yych <= '9') goto yy67;
- goto yy51;
- } else {
- if(yych <= 'E') goto yy73;
- if(yych == 'e') goto yy73;
- goto yy51;
- }
- yy69: yych = *++YYCURSOR;
- if(yych <= ','){
- if(yych != '+') goto yy56;
- goto yy70;
- } else {
- if(yych <= '-') goto yy70;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy71;
- goto yy56;
- }
- yy70: yych = *++YYCURSOR;
- if(yych <= '/') goto yy56;
- if(yych >= ':') goto yy56;
- goto yy71;
- yy71: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy72;
- yy72: if(yych <= '/') goto yy66;
- if(yych <= '9') goto yy71;
- goto yy66;
- yy73: yych = *++YYCURSOR;
- if(yych <= ','){
- if(yych != '+') goto yy56;
- goto yy74;
- } else {
- if(yych <= '-') goto yy74;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy75;
- goto yy56;
- }
- yy74: yych = *++YYCURSOR;
- if(yych <= '/') goto yy56;
- if(yych >= ':') goto yy56;
- goto yy75;
- yy75: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy76;
- yy76: if(yych <= '/') goto yy51;
- if(yych <= '9') goto yy75;
- goto yy51;
- yy77: yych = *++YYCURSOR;
- goto yy78;
- yy78:
- {
- /* build local label name */
- lvalp->str.contents = yasm_xmalloc(30);
- lvalp->str.len =
- sprintf(lvalp->str.contents, "L%c\001%lu", s->tok[0],
- parser_gas->local[s->tok[0]-'0']);
- RETURN(ID);
- }
- yy79: yych = *++YYCURSOR;
- goto yy80;
- yy80:
- {
- /* build local label name */
- lvalp->str.contents = yasm_xmalloc(30);
- lvalp->str.len =
- sprintf(lvalp->str.contents, "L%c\001%lu", s->tok[0],
- parser_gas->local[s->tok[0]-'0']+1);
- RETURN(ID);
- }
- yy81: yych = *++YYCURSOR;
- goto yy82;
- yy82:
- {
- /* increment label index */
- parser_gas->local[s->tok[0]-'0']++;
- /* build local label name */
- lvalp->str.contents = yasm_xmalloc(30);
- lvalp->str.len =
- sprintf(lvalp->str.contents, "L%c\001%lu", s->tok[0],
- parser_gas->local[s->tok[0]-'0']);
- RETURN(LABEL);
- }
- yy83: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
- yych = *YYCURSOR;
- goto yy84;
- yy84: if(yych == '.') goto yy65;
- if(yych <= '/') goto yy3;
- if(yych <= '9') goto yy83;
- goto yy3;
- yy85: yych = *++YYCURSOR;
- if(yybm[0+yych] & 128) {
- goto yy104;
- }
- goto yy78;
- yy86: yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych == '+') goto yy96;
- if(yych == '-') goto yy96;
- goto yy97;
- yy87:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(TOK+2);
- s->tok[TOKLEN] = savech;
- RETURN(FLTNUM);
- }
- yy88: yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if(yych == '+') goto yy96;
- if(yych == '-') goto yy96;
- goto yy97;
- yy89: yyaccept = 6;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
- yych = *YYCURSOR;
- goto yy90;
- yy90: if(yybm[0+yych] & 32) {
- goto yy89;
- }
- if(yych == '.') goto yy65;
- if(yych <= '/') goto yy91;
- if(yych <= '9') goto yy59;
- goto yy91;
- yy91:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_oct(TOK);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy92: yych = *++YYCURSOR;
- if(yybm[0+yych] & 64) {
- goto yy93;
- }
- goto yy56;
- yy93: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy94;
- yy94: if(yybm[0+yych] & 64) {
- goto yy93;
- }
- goto yy95;
- yy95:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- /* skip 0 and x */
- lvalp->intn = yasm_intnum_create_hex(TOK+2);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- yy96: yyaccept = 5;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy97;
- yy97: if(yych <= '9'){
- if(yych == '.') goto yy98;
- if(yych <= '/') goto yy87;
- goto yy96;
- } else {
- if(yych <= 'E'){
- if(yych <= 'D') goto yy87;
- goto yy100;
- } else {
- if(yych == 'e') goto yy100;
- goto yy87;
- }
- }
- yy98: yyaccept = 5;
- YYMARKER = ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- yych = *YYCURSOR;
- goto yy99;
- yy99: if(yych <= 'D'){
- if(yych <= '/') goto yy87;
- if(yych <= '9') goto yy98;
- goto yy87;
- } else {
- if(yych <= 'E') goto yy100;
- if(yych != 'e') goto yy87;
- goto yy100;
- }
- yy100: yych = *++YYCURSOR;
- if(yych <= ','){
- if(yych != '+') goto yy56;
- goto yy101;
- } else {
- if(yych <= '-') goto yy101;
- if(yych <= '/') goto yy56;
- if(yych <= '9') goto yy102;
- goto yy56;
- }
- yy101: yych = *++YYCURSOR;
- if(yych <= '/') goto yy56;
- if(yych >= ':') goto yy56;
- goto yy102;
- yy102: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy103;
- yy103: if(yych <= '/') goto yy87;
- if(yych <= '9') goto yy102;
- goto yy87;
- yy104: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy105;
- yy105: if(yybm[0+yych] & 128) {
- goto yy104;
- }
- goto yy106;
- yy106:
- {
- savech = s->tok[TOKLEN];
- s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_bin(TOK+2);
- s->tok[TOKLEN] = savech;
- RETURN(INTNUM);
- }
- }
- }
- /* C-style comment; nesting not supported */
- comment:
- SCANINIT();
- {
- {
- YYCTYPE yych;
- goto yy107;
- ++YYCURSOR;
- yy107:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych == '\n') goto yy111;
- if(yych != '*') goto yy113;
- goto yy109;
- yy109: yych = *++YYCURSOR;
- if(yych == '/') goto yy114;
- goto yy110;
- yy110:
- {
- if (cursor == s->eof)
- return 0;
- goto comment;
- }
- yy111: yych = *++YYCURSOR;
- goto yy112;
- yy112:
- {
- if (parser_gas->save_input)
- cursor = save_line(parser_gas, cursor);
- RETURN(s->tok[0]);
- }
- yy113: yych = *++YYCURSOR;
- goto yy110;
- yy114: yych = *++YYCURSOR;
- goto yy115;
- yy115:
- { parser_gas->state = INITIAL; goto scan; }
- }
- }
- /* Single line comment. */
- line_comment:
- {
- static unsigned char yybm[] = {
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 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, 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 yy116;
- yy117: ++YYCURSOR;
- yy116:
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy118;
- yy118: if(yybm[0+yych] & 128) {
- goto yy117;
- }
- goto yy119;
- yy119:
- { goto scan; }
- }
- }
- /* .section directive (the section name portion thereof) */
- section_directive:
- SCANINIT();
- {
- 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, 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, 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 yy120;
- ++YYCURSOR;
- yy120:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= '$'){
- if(yych <= '\r'){
- if(yych <= '\t'){
- if(yych <= '\b') goto yy132;
- goto yy126;
- } else {
- if(yych <= '\n') goto yy130;
- if(yych <= '\f') goto yy132;
- goto yy126;
- }
- } else {
- if(yych <= '!'){
- if(yych == ' ') goto yy126;
- goto yy132;
- } else {
- if(yych <= '"') goto yy124;
- if(yych <= '#') goto yy132;
- goto yy122;
- }
- }
- } else {
- if(yych <= '@'){
- if(yych <= '.'){
- if(yych <= '+') goto yy132;
- if(yych <= ',') goto yy128;
- goto yy122;
- } else {
- if(yych <= '/') goto yy132;
- if(yych >= ':') goto yy132;
- goto yy122;
- }
- } else {
- if(yych <= '_'){
- if(yych <= 'Z') goto yy122;
- if(yych <= '^') goto yy132;
- goto yy122;
- } else {
- if(yych <= '`') goto yy132;
- if(yych >= '{') goto yy132;
- goto yy122;
- }
- }
- }
- yy122: yych = *++YYCURSOR;
- goto yy137;
- yy123:
- {
- lvalp->str.contents = yasm__xstrndup(TOK, TOKLEN);
- lvalp->str.len = TOKLEN;
- parser_gas->state = INITIAL;
- RETURN(ID);
- }
- yy124: yych = *++YYCURSOR;
- goto yy125;
- yy125:
- { goto stringconst; }
- yy126: yych = *++YYCURSOR;
- goto yy135;
- yy127:
- { goto section_directive; }
- yy128: yych = *++YYCURSOR;
- goto yy129;
- yy129:
- {
- parser_gas->state = INITIAL;
- RETURN(s->tok[0]);
- }
- yy130: yych = *++YYCURSOR;
- goto yy131;
- yy131:
- {
- if (parser_gas->save_input)
- cursor = save_line(parser_gas, cursor);
- parser_gas->state = INITIAL;
- RETURN(s->tok[0]);
- }
- yy132: yych = *++YYCURSOR;
- goto yy133;
- yy133:
- {
- yasm_warn_set(YASM_WARN_UNREC_CHAR,
- N_("ignoring unrecognized character `%s'"),
- yasm__conv_unprint(s->tok[0]));
- goto section_directive;
- }
- yy134: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy135;
- yy135: if(yybm[0+yych] & 64) {
- goto yy134;
- }
- goto yy127;
- yy136: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy137;
- yy137: if(yybm[0+yych] & 128) {
- goto yy136;
- }
- goto yy123;
- }
- }
- /* filename portion of nasm preproc %line */
- nasm_filename:
- strbuf = yasm_xmalloc(STRBUF_ALLOC_SIZE);
- strbuf_size = STRBUF_ALLOC_SIZE;
- count = 0;
- nasm_filename_scan:
- SCANINIT();
- {
- static unsigned char yybm[] = {
- 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;
- goto yy138;
- ++YYCURSOR;
- yy138:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych <= '\f'){
- if(yych <= '\b') goto yy144;
- if(yych <= '\t') goto yy142;
- if(yych >= '\v') goto yy144;
- goto yy140;
- } else {
- if(yych <= '\r') goto yy142;
- if(yych == ' ') goto yy142;
- goto yy144;
- }
- yy140: yych = *++YYCURSOR;
- goto yy141;
- yy141:
- {
- strbuf_append(count++, cursor, s, '\0');
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- parser_gas->state = INITIAL;
- RETURN(STRING);
- }
- yy142: yych = *++YYCURSOR;
- goto yy147;
- yy143:
- { goto nasm_filename_scan; }
- yy144: yych = *++YYCURSOR;
- goto yy145;
- yy145:
- {
- if (cursor == s->eof) {
- strbuf_append(count++, cursor, s, '\0');
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- parser_gas->state = INITIAL;
- RETURN(STRING);
- }
- strbuf_append(count++, cursor, s, s->tok[0]);
- goto nasm_filename_scan;
- }
- yy146: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- goto yy147;
- yy147: if(yybm[0+yych] & 128) {
- goto yy146;
- }
- goto yy143;
- }
- }
- /* character constant values */
- charconst:
- /*TODO*/
- /* string constant values */
- stringconst:
- strbuf = yasm_xmalloc(STRBUF_ALLOC_SIZE);
- strbuf_size = STRBUF_ALLOC_SIZE;
- count = 0;
- stringconst_scan:
- SCANINIT();
- {
- {
- YYCTYPE yych;
- goto yy148;
- ++YYCURSOR;
- yy148:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- if(yych == '"') goto yy152;
- if(yych != '\\') goto yy154;
- goto yy150;
- yy150: yych = *++YYCURSOR;
- if(yych != '\n') goto yy155;
- goto yy151;
- yy151:
- {
- if (cursor == s->eof) {
- yasm_error_set(YASM_ERROR_SYNTAX,
- N_("unexpected end of file in string"));
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- RETURN(STRING);
- }
- strbuf_append(count++, cursor, s, s->tok[0]);
- goto stringconst_scan;
- }
- yy152: yych = *++YYCURSOR;
- goto yy153;
- yy153:
- {
- strbuf_append(count, cursor, s, '\0');
- yasm_unescape_cstring(strbuf, &count);
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- RETURN(STRING);
- }
- yy154: yych = *++YYCURSOR;
- goto yy151;
- yy155: yych = *++YYCURSOR;
- goto yy156;
- yy156:
- {
- if (cursor == s->eof) {
- yasm_error_set(YASM_ERROR_SYNTAX,
- N_("unexpected end of file in string"));
- lvalp->str.contents = (char *)strbuf;
- lvalp->str.len = count;
- RETURN(STRING);
- }
- strbuf_append(count++, cursor, s, '\\');
- strbuf_append(count++, cursor, s, s->tok[1]);
- goto stringconst_scan;
- }
- }
- }
- }
|