2003-11-06 11:22:31 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* symbol.h */
|
|
|
|
/* */
|
|
|
|
/* Parse a symbol name and search for it */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* */
|
2012-10-27 19:50:49 +00:00
|
|
|
/* (C) 1998-2012, Ullrich von Bassewitz */
|
2010-07-26 17:28:34 +00:00
|
|
|
/* Roemerstrasse 52 */
|
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
/* EMail: uz@cc65.org */
|
2003-11-06 11:22:31 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
/* */
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
/* */
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
/* distribution. */
|
|
|
|
/* */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SYMBOL_H
|
|
|
|
#define SYMBOL_H
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-27 19:50:49 +00:00
|
|
|
/* cc65 */
|
|
|
|
#include "symtab.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-11-06 11:22:31 +00:00
|
|
|
/*****************************************************************************/
|
2003-12-02 22:09:45 +00:00
|
|
|
/* Forwards */
|
2003-11-06 11:22:31 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-12-02 22:09:45 +00:00
|
|
|
struct StrBuf;
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-11-06 11:22:31 +00:00
|
|
|
/*****************************************************************************/
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Code */
|
2003-11-06 11:22:31 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-31 20:54:45 +00:00
|
|
|
struct SymTable* ParseScopedIdent (struct StrBuf* Name, struct StrBuf* FullName);
|
|
|
|
/* Parse a (possibly scoped) identifer. The scope of the name must exist and
|
2014-06-30 09:10:35 +00:00
|
|
|
** is returned as function result, while the last part (the identifier) which
|
|
|
|
** may be either a symbol or a scope depending on the context is returned in
|
|
|
|
** Name. FullName is a string buffer that is used to store the full name of
|
|
|
|
** the identifier including the scope. It is used internally and may be used
|
|
|
|
** by the caller for error messages or similar.
|
|
|
|
*/
|
2003-12-02 22:09:45 +00:00
|
|
|
|
2012-10-27 19:50:49 +00:00
|
|
|
struct SymEntry* ParseScopedSymName (SymFindAction Action);
|
2003-11-06 11:22:31 +00:00
|
|
|
/* Parse a (possibly scoped) symbol name, search for it in the symbol table
|
2014-06-30 09:10:35 +00:00
|
|
|
** and return the symbol table entry.
|
|
|
|
*/
|
2003-11-13 22:03:24 +00:00
|
|
|
|
2003-12-02 22:09:45 +00:00
|
|
|
struct SymTable* ParseScopedSymTable (void);
|
2003-11-13 22:03:24 +00:00
|
|
|
/* Parse a (possibly scoped) symbol table (scope) name, search for it in the
|
2014-06-30 09:10:35 +00:00
|
|
|
** symbol space and return the symbol table struct.
|
|
|
|
*/
|
2003-11-06 11:22:31 +00:00
|
|
|
|
2012-10-27 19:50:49 +00:00
|
|
|
struct SymEntry* ParseAnySymName (SymFindAction Action);
|
2010-07-26 17:28:34 +00:00
|
|
|
/* Parse a cheap local symbol or a a (possibly scoped) symbol name, search
|
2014-06-30 09:10:35 +00:00
|
|
|
** for it in the symbol table and return the symbol table entry.
|
|
|
|
*/
|
2010-07-26 17:28:34 +00:00
|
|
|
|
2003-11-06 11:22:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* End of symbol.h */
|
|
|
|
|
|
|
|
#endif
|