]> granicus.if.org Git - re2c/commitdiff
Changed 'unsigned int' to 'int' (now comparison '< 0' makes sense).
authorUlya Fokanova <skvadrik@gmail.com>
Mon, 13 Jan 2014 10:13:14 +0000 (13:13 +0300)
committerUlya Fokanova <skvadrik@gmail.com>
Mon, 13 Jan 2014 10:13:14 +0000 (13:13 +0300)
re2c/bootstrap/parser.cc
re2c/parser.y
re2c/re.h

index 907a63a7a2c09b2b7cae37b31633e08bf0c8539a..39180cb1f7c94093ec615058de37b86be3c1fb4b 100644 (file)
@@ -168,7 +168,7 @@ void context_rule(CondList *clist, RegExp *expr, RegExp *look, Str *newcond, Tok
                {
                        size_t nIndex = specMap.size() + 1; // 0 is reserved for "0"-spec
                        assert( nIndex < 1u << 31);
-                       specMap[*it] = std::make_pair(unsigned( nIndex), rule);
+                       specMap[*it] = std::make_pair(int(nIndex), rule);
                }
                
        }
index 459b67f9c51b1562eb2101b1fa5aa55e69456326..1be1886bd4e427e050dfe26375a5bb801c97631e 100644 (file)
@@ -98,7 +98,7 @@ void context_rule(CondList *clist, RegExp *expr, RegExp *look, Str *newcond, Tok
                {
                        size_t nIndex = specMap.size() + 1; // 0 is reserved for "0"-spec
                        assert( nIndex < 1u << 31);
-                       specMap[*it] = std::make_pair(unsigned( nIndex), rule);
+                       specMap[*it] = std::make_pair(int(nIndex), rule);
                }
                
        }
index 9f8b6fd9989e1a42fe2d938ed1db9731d405285f..870b2f1263a2ed75e929b82c00c9a45c729e2b7a 100644 (file)
--- a/re2c/re.h
+++ b/re2c/re.h
@@ -530,7 +530,7 @@ private:
 };
 
 typedef std::set<std::string>           CondList;
-typedef std::pair<unsigned, RegExp*>    NRegExp;
+typedef std::pair<int, RegExp*>         NRegExp;
 typedef std::map<std::string, NRegExp>  RegExpMap;
 typedef std::vector<std::string>        RegExpIndices;
 typedef std::list<RuleOp*>              RuleOpList;