summaryrefslogtreecommitdiff
path: root/gcc/melt-runtime.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-08 13:20:13 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-08 13:20:13 +0000
commit81713f9386aaa3397ac44284a7d6f90fc4b7040e (patch)
treef10f2534b770430a68f03c63d4712a183babb994 /gcc/melt-runtime.c
parent39e46e4d64364c5b3381604f6158672745e19d64 (diff)
downloadgcc-81713f9386aaa3397ac44284a7d6f90fc4b7040e.tar.gz
2010-01-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 155725 {{also coded a bit the infix parser in gcc/melt/ etc..}} {{merged with trunk rev 155725, and minor additions}} * gcc/melt-runtime.c: removed useless trailing spaces. * gcc/melt/warmelt-infixsyntax.melt: added more, notably class_infix_parser, class_infix_delimiter some delimiters and our backtrackable getlex & peeklex functions. Still very incomplete. * gcc/melt/warmelt-outobj.melt: added the translate_macroexpanded_list function to ease factoring out the common translation between infix & lisp syntaxes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@155734 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-runtime.c')
-rw-r--r--gcc/melt-runtime.c39
1 files changed, 17 insertions, 22 deletions
diff --git a/gcc/melt-runtime.c b/gcc/melt-runtime.c
index cd54ebe05d7..252f43de19f 100644
--- a/gcc/melt-runtime.c
+++ b/gcc/melt-runtime.c
@@ -1,8 +1,8 @@
-/* Basile's static analysis (should have a better name) melt-runtime.c
+/*** file melt-runtime.c
Middle End Lisp Translator = MELT
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Basile Starynkevitch <basile@starynkevitch.net>
- Indented with GNU indent
+ Indented with GNU indent.
This file is part of GCC.
@@ -18,8 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>.
- */
+<http://www.gnu.org/licenses/>.
+***/
/* for debugging -fmelt-debug is useful */
@@ -53,17 +53,17 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
-#include "cgraph.h"
-#include "diagnostic.h"
-#include "flags.h"
+#include "cgraph.h"
+#include "diagnostic.h"
+#include "flags.h"
#include "toplev.h"
#include "options.h"
-#include "params.h"
-#include "real.h"
-#include "prefix.h"
-#include "md5.h"
-#include "plugin.h"
-#include "cppdefault.h"
+#include "params.h"
+#include "real.h"
+#include "prefix.h"
+#include "md5.h"
+#include "plugin.h"
+#include "cppdefault.h"
/* some system or library headers needed to MELT */
#include <dirent.h>
@@ -161,14 +161,13 @@ DEF_VEC_ALLOC_O (melt_module_info_t, heap);
static VEC (melt_module_info_t, heap) *modinfvec = 0;
-struct callframe_melt_st* melt_topframe;
+struct callframe_melt_st* melt_topframe;
struct meltlocalsptr_st* melt_localtab;
/** special values are linked in a list to permit their explicit deletion */
struct meltspecial_st* melt_newspeclist;
struct meltspecial_st* melt_oldspeclist;
-
unsigned long melt_kilowords_sincefull;
/* number of full & any melt garbage collections */
unsigned long melt_nb_full_garbcoll;
@@ -180,11 +179,9 @@ long melt_dbgcounter;
long melt_debugskipcount;
long melt_error_counter;
-
/* an strdup-ed version string of gcc */
char* melt_gccversionstr;
-
int melt_last_global_ix = MELTGLOB__LASTGLOB;
@@ -192,7 +189,6 @@ int melt_last_global_ix = MELTGLOB__LASTGLOB;
scan, a la Cheney. */
static GTY(()) VEC(melt_ptr_t,gc) *bscanvec;
-
static void* proghandle;
@@ -202,14 +198,13 @@ typedef char *char_p;
DEF_VEC_P (char_p);
DEF_VEC_ALLOC_P (char_p, heap);
static VEC (char_p, heap)* parsedmeltfilevect;
-
/* *INDENT-ON* */
/* to code case ALL_OBMAG_SPECIAL_CASES: */
#define ALL_OBMAG_SPECIAL_CASES \
OBMAG_SPEC_FILE: \
case OBMAG_SPEC_RAWFILE: \
- case OBMAG_SPECPPL_COEFFICIENT: \
+ case OBMAG_SPECPPL_COEFFICIENT: \
case OBMAG_SPECPPL_LINEAR_EXPRESSION: \
case OBMAG_SPECPPL_CONSTRAINT: \
case OBMAG_SPECPPL_CONSTRAINT_SYSTEM: \
@@ -233,9 +228,9 @@ melt_argument(const char* argname)
int argix=0;
if (!argname || !argname[0])
return NULL;
- for (argix = 0; argix < melt_plugin_argc; argix ++)
+ for (argix = 0; argix < melt_plugin_argc; argix ++)
{
- if (!strcmp(argname, melt_plugin_argv[argix].key))
+ if (!strcmp(argname, melt_plugin_argv[argix].key))
{
char* val = melt_plugin_argv[argix].value;
/* never return NULL if the argument is found; return an