]> granicus.if.org Git - re2c/commitdiff
Renamed YYEOI -> YYLESSTHAN
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 23 Feb 2015 12:04:38 +0000 (12:04 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 23 Feb 2015 12:04:38 +0000 (12:04 +0000)
13 files changed:
re2c/code.cc
re2c/examples/input_custom/simple/README
re2c/examples/input_custom/simple/default.re
re2c/examples/input_custom/simple/fgetc.re
re2c/examples/input_custom/simple/istringstream.re
re2c/input_api.cc
re2c/input_api.h
re2c/test/input_custom_default.--input(custom).c
re2c/test/input_custom_default.--input(custom).re
re2c/test/input_custom_fgetc.--input(custom).c
re2c/test/input_custom_fgetc.--input(custom).re
re2c/test/input_custom_istringstream.--input(custom).c
re2c/test/input_custom_istringstream.--input(custom).re

index 52b28efc1f5bc77b80eeeb4e1a61defa4e516234..bc05fd6d74284c3d9c17e92faea5fae8153e7852 100644 (file)
@@ -408,7 +408,7 @@ static void need(std::ostream &o, uint ind, uint n, bool & readCh, bool bSetMark
                {
                        if (bUseYYFillCheck)
                        {
-                               o << "if (" << input_api.expr_eoi_one () << ") ";
+                               o << "if (" << input_api.expr_lessthan_one () << ") ";
                        }
                        genYYFill(o, ind, n);
                }
@@ -416,7 +416,7 @@ static void need(std::ostream &o, uint ind, uint n, bool & readCh, bool bSetMark
                {
                        if (bUseYYFillCheck)
                        {
-                               o << "if (" << input_api.expr_eoi (n) << ") ";
+                               o << "if (" << input_api.expr_lessthan (n) << ") ";
                        }
                        genYYFill(o, ind, n);
                }
@@ -2318,7 +2318,7 @@ void Scanner::config(const Str& cfg, const Str& val)
                mapDefineKeys.insert("define:YYFILL");
                mapDefineKeys.insert("define:YYGETCONDITION");
                mapDefineKeys.insert("define:YYGETSTATE");
-               mapDefineKeys.insert("define:YYEOI");
+               mapDefineKeys.insert("define:YYLESSTHAN");
                mapDefineKeys.insert("define:YYLIMIT");
                mapDefineKeys.insert("define:YYMARKER");
                mapDefineKeys.insert("define:YYPEEK");
index 60e5948e9d4592c043257e1fadd37262f5cddfe7..c0c4d955a23a00d01258aa2a94fb8cfc06f6b057 100644 (file)
@@ -13,7 +13,7 @@ These are three examples of "--input custom" usage:
 
 Note that these examples are very simple and don't need
 to implement YYFILL; the only reason they don't use
-"re2c:yyfill:enable = 0;" is to keep YYEOI and YYLIMIT
+"re2c:yyfill:enable = 0;" is to keep YYLESSTHAN and YYLIMIT
 (for the sake of example).
 
 In real-life programs one will need to care for correct
index 90781642d11c46846dbb60717bd0291ca86bbdc4..94cde7cd6698bf59fd0c480e8e8423ec100d1730 100644 (file)
@@ -9,7 +9,7 @@ bool lex (const char * cursor, const char * const limit)
 #   define YYBACKUPCTX()  ctxmarker = cursor
 #   define YYRESTORE()    cursor = marker
 #   define YYRESTORECTX() cursor = ctxmarker
-#   define YYEOI(n)       limit - cursor < n
+#   define YYLESSTHAN(n)  limit - cursor < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }
index b6c3ef1d44cf5eb8df3ddb0667d6787090274dcd..d2dffd9a51db5fa47fb23282ee487b9c19cbf824 100644 (file)
@@ -18,7 +18,7 @@ bool lex (FILE * f, const long limit)
 #   define YYBACKUPCTX()  ctxmarker = ftell (f)
 #   define YYRESTORE()    fseek (f, marker, SEEK_SET)
 #   define YYRESTORECTX() fseek (f, ctxmarker, SEEK_SET)
-#   define YYEOI(n)       limit - ftell (f) < n
+#   define YYLESSTHAN(n)  limit - ftell (f) < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }
index 35f4b0029cfcf7b9081fe3f017c14bfc798bc6ea..5d702291e24104a04dc18743ed2c644198590db5 100644 (file)
@@ -11,7 +11,7 @@ bool lex (std::istringstream & is, const std::streampos limit)
 #   define YYBACKUPCTX()  ctxmarker = is.tellg ()
 #   define YYRESTORE()    is.seekg (marker)
 #   define YYRESTORECTX() is.seekg (ctxmarker)
-#   define YYEOI(n)       limit - is.tellg () < n
+#   define YYLESSTHAN(n)  limit - is.tellg () < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }
index 0053f216f2d7ee5eca4b285324ced884e5749390..3fe20dbc1d77e3cd5c96a68b648bbf9c8cab8cd5 100644 (file)
@@ -142,14 +142,14 @@ std::string InputAPI::stmt_skip_backup_peek (uint ind)
                : stmt_skip (ind) + stmt_backup (ind) + stmt_peek (ind);
 }
 
-std::string InputAPI::expr_eoi_one ()
+std::string InputAPI::expr_lessthan_one ()
 {
        return type == DEFAULT
                ? mapCodeName["YYLIMIT"] + " <= " + mapCodeName["YYCURSOR"]
-               : expr_eoi (1);
+               : expr_lessthan (1);
 }
 
-std::string InputAPI::expr_eoi (uint n)
+std::string InputAPI::expr_lessthan (uint n)
 {
        std::ostringstream s;
        switch (type)
@@ -158,7 +158,7 @@ std::string InputAPI::expr_eoi (uint n)
                        s << "(" << mapCodeName["YYLIMIT"] << " - " << mapCodeName["YYCURSOR"] << ") < " << n;
                        break;
                case CUSTOM:
-                       s << mapCodeName["YYEOI"] << " (" << n << ")";
+                       s << mapCodeName["YYLESSTHAN"] << " (" << n << ")";
                        break;
        }
        return s.str ();
index 428f5b4a79e3ab59003de3ab0444f27633140f30..2db312690ef53ab0c40508919dc171c034e558c7 100644 (file)
@@ -34,8 +34,8 @@ public:
        std::string stmt_skip_backup (uint ind);
        std::string stmt_backup_peek (uint ind);
        std::string stmt_skip_backup_peek (uint ind);
-       std::string expr_eoi_one ();
-       std::string expr_eoi (uint n);
+       std::string expr_lessthan_one ();
+       std::string expr_lessthan (uint n);
 };
 
 } // end namespace re2c
index fb6e275556dbeb7740e8e091d744b96a09f3bdea..7c438f86fb935efc2e8dc559f12639d485b6ec38 100644 (file)
@@ -11,14 +11,14 @@ bool lex (const char * cursor, const char * const limit)
 #   define YYBACKUPCTX()  ctxmarker = cursor
 #   define YYRESTORE()    cursor = marker
 #   define YYRESTORECTX() cursor = ctxmarker
-#   define YYEOI(n)       limit - cursor < n
+#   define YYLESSTHAN(n)  limit - cursor < n
 #   define YYFILL(n)      {}
     
 #line 18 "<stdout>"
 {
        YYCTYPE yych;
 
-       if (YYEOI (13)) YYFILL(13);
+       if (YYLESSTHAN (13)) YYFILL(13);
        yych = YYPEEK ();
        switch (yych) {
        case 'i':       goto yy4;
@@ -130,7 +130,7 @@ yy16:
        }
 yy17:
        YYSKIP ();
-       if (YYEOI (1)) YYFILL(1);
+       if (YYLESSTHAN (1)) YYFILL(1);
        yych = YYPEEK ();
        switch (yych) {
        case '0':
index 90781642d11c46846dbb60717bd0291ca86bbdc4..94cde7cd6698bf59fd0c480e8e8423ec100d1730 100644 (file)
@@ -9,7 +9,7 @@ bool lex (const char * cursor, const char * const limit)
 #   define YYBACKUPCTX()  ctxmarker = cursor
 #   define YYRESTORE()    cursor = marker
 #   define YYRESTORECTX() cursor = ctxmarker
-#   define YYEOI(n)       limit - cursor < n
+#   define YYLESSTHAN(n)  limit - cursor < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }
index e9ce4b0d9eb0400e84ebef5cc05fec3c60de7545..5528cfc422be71571e651e89bfafc5eb9d1c7814 100644 (file)
@@ -20,14 +20,14 @@ bool lex (FILE * f, const long limit)
 #   define YYBACKUPCTX()  ctxmarker = ftell (f)
 #   define YYRESTORE()    fseek (f, marker, SEEK_SET)
 #   define YYRESTORECTX() fseek (f, ctxmarker, SEEK_SET)
-#   define YYEOI(n)       limit - ftell (f) < n
+#   define YYLESSTHAN(n)  limit - ftell (f) < n
 #   define YYFILL(n)      {}
     
 #line 27 "<stdout>"
 {
        YYCTYPE yych;
 
-       if (YYEOI (13)) YYFILL(13);
+       if (YYLESSTHAN (13)) YYFILL(13);
        yych = YYPEEK ();
        switch (yych) {
        case 'i':       goto yy4;
@@ -139,7 +139,7 @@ yy16:
        }
 yy17:
        YYSKIP ();
-       if (YYEOI (1)) YYFILL(1);
+       if (YYLESSTHAN (1)) YYFILL(1);
        yych = YYPEEK ();
        switch (yych) {
        case '0':
index b6c3ef1d44cf5eb8df3ddb0667d6787090274dcd..d2dffd9a51db5fa47fb23282ee487b9c19cbf824 100644 (file)
@@ -18,7 +18,7 @@ bool lex (FILE * f, const long limit)
 #   define YYBACKUPCTX()  ctxmarker = ftell (f)
 #   define YYRESTORE()    fseek (f, marker, SEEK_SET)
 #   define YYRESTORECTX() fseek (f, ctxmarker, SEEK_SET)
-#   define YYEOI(n)       limit - ftell (f) < n
+#   define YYLESSTHAN(n)  limit - ftell (f) < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }
index 0bf59a3d93595ffc334491b8a8215f8ebcee24ad..955c05f78c480e38fa8870a67d7f8a0c38497c11 100644 (file)
@@ -13,14 +13,14 @@ bool lex (std::istringstream & is, const std::streampos limit)
 #   define YYBACKUPCTX()  ctxmarker = is.tellg ()
 #   define YYRESTORE()    is.seekg (marker)
 #   define YYRESTORECTX() is.seekg (ctxmarker)
-#   define YYEOI(n)       limit - is.tellg () < n
+#   define YYLESSTHAN(n)  limit - is.tellg () < n
 #   define YYFILL(n)      {}
     
 #line 20 "<stdout>"
 {
        YYCTYPE yych;
 
-       if (YYEOI (13)) YYFILL(13);
+       if (YYLESSTHAN (13)) YYFILL(13);
        yych = YYPEEK ();
        switch (yych) {
        case 'i':       goto yy4;
@@ -132,7 +132,7 @@ yy16:
        }
 yy17:
        YYSKIP ();
-       if (YYEOI (1)) YYFILL(1);
+       if (YYLESSTHAN (1)) YYFILL(1);
        yych = YYPEEK ();
        switch (yych) {
        case '0':
index 35f4b0029cfcf7b9081fe3f017c14bfc798bc6ea..5d702291e24104a04dc18743ed2c644198590db5 100644 (file)
@@ -11,7 +11,7 @@ bool lex (std::istringstream & is, const std::streampos limit)
 #   define YYBACKUPCTX()  ctxmarker = is.tellg ()
 #   define YYRESTORE()    is.seekg (marker)
 #   define YYRESTORECTX() is.seekg (ctxmarker)
-#   define YYEOI(n)       limit - is.tellg () < n
+#   define YYLESSTHAN(n)  limit - is.tellg () < n
 #   define YYFILL(n)      {}
     /*!re2c
         "int buffer " / "[" [0-9]+ "]" { return true; }