X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b9f1d9a47a49c40e8f0a5006b492daba53f25b20..dd31e17d7e415d3be8fc603f752f7e975297bcc2:/src/named-ref.h?ds=sidebyside diff --git a/src/named-ref.h b/src/named-ref.h index 9100296f..00c972ce 100644 --- a/src/named-ref.h +++ b/src/named-ref.h @@ -1,6 +1,6 @@ /* Named symbol references for Bison - Copyright 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -20,19 +20,27 @@ #ifndef NAMED_REF_H_ # define NAMED_REF_H_ -#include "uniqstr.h" #include "location.h" +#include "uniqstr.h" -typedef struct named_ref named_ref; - -struct named_ref +/* Named reference object. Keeps information about + a symbolic name of a symbol in a rule. */ +typedef struct named_ref { + /* Symbolic named given by user. */ uniqstr id; + + /* Location of the symbolic name. Not including brackets. */ location loc; -}; +} named_ref; +/* Allocate a named reference object. */ named_ref *named_ref_new (uniqstr id, location loc); +/* Allocate and return a copy. */ +named_ref *named_ref_copy (const named_ref *r); + +/* Free a named reference object. */ void named_ref_free (named_ref *r); #endif /* !NAMED_REF_H_ */