X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0fb669f9d648dfdd7a39478a6b658511455ae966..e2a8c0f591c1f8ca0909faee23914f62bacb866c:/src/gram.h diff --git a/src/gram.h b/src/gram.h index a5dfc1e9..b8f316a0 100644 --- a/src/gram.h +++ b/src/gram.h @@ -1,6 +1,6 @@ /* Data definitions for internal representation of Bison's input. - Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002, 2003, 2004 + Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -138,6 +138,12 @@ item_number_as_symbol_number (item_number i) return i; } +static inline bool +item_number_is_symbol_number (item_number i) +{ + return i >= 0; +} + /* Rule numbers. */ typedef int rule_number; extern rule_number nrules; @@ -154,6 +160,11 @@ item_number_as_rule_number (item_number i) return -1 - i; } +static inline bool +item_number_is_rule_number (item_number i) +{ + return i < 0; +} /*--------. | Rules. |