ergo
ergo_input_processor.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "ergo_scripted.h"
#include <string.h>

Classes

union  YYSTYPE
 
struct  YYSTACKDATA
 

Macros

#define YYBYACC   1
 
#define YYMAJOR   1
 
#define YYMINOR   9
 
#define YYPATCH   20140715
 
#define YYEMPTY   (-1)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define yyerrok   (yyerrflag = 0)
 
#define YYRECOVERING()   (yyerrflag != 0)
 
#define YYENOMEM   (-2)
 
#define YYEOF   0
 
#define YYPREFIX   "yy"
 
#define YYPURE   0
 
#define YYERROR_VERBOSE
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYPARSE_DECL()   yyparse(void)
 
#define YYLEX_DECL()   yylex(void)
 
#define YYLEX   yylex()
 
#define YYERROR_DECL()   yyerror(const char *s)
 
#define YYERROR_CALL(msg)   yyerror(msg)
 
#define NUMBER   257
 
#define DOT   258
 
#define SYMBOL   259
 
#define EQUAL   260
 
#define STRING   261
 
#define EOFTAG   262
 
#define GETEXC   263
 
#define GETPOL   264
 
#define K_ALL   265
 
#define HELP   266
 
#define MOLTAG   267
 
#define GHOSTTAG   268
 
#define MOLDAL   269
 
#define QUIT   270
 
#define RUNTAG   271
 
#define SYSTEM   272
 
#define GHOST   273
 
#define ANGSTROM   274
 
#define PRECISION   275
 
#define RANGE   276
 
#define WARRANTY   277
 
#define LIST_DFT_FUNCS   278
 
#define IS_CHT_USED   279
 
#define SET_NTHREADS   280
 
#define PLUS   281
 
#define MINUS   282
 
#define TIMES   283
 
#define DIVIDE   284
 
#define POWER   285
 
#define LEFT_PARENTHESIS   286
 
#define RIGHT_PARENTHESIS   287
 
#define EOL   288
 
#define NEG   289
 
#define YYERRCODE   256
 
#define YYTABLESIZE   321
 
#define YYFINAL   18
 
#define YYDEBUG   0
 
#define YYMAXTOKEN   289
 
#define YYUNDFTOKEN   299
 
#define YYTRANSLATE(a)   ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
 
#define YYSTACKSIZE   10000
 
#define YYMAXDEPTH   10000
 
#define YYINITSTACKSIZE   200
 
#define yyfreestack(data)   /* nothing */
 
#define YYABORT   goto yyabort
 
#define YYREJECT   goto yyabort
 
#define YYACCEPT   goto yyaccept
 
#define YYERROR   goto yyerrlab
 

Typedefs

typedef short YYINT
 

Functions

int yylex (void)
 
int yyerror (const char *s)
 
static int yygrowstack (YYSTACKDATA *data)
 

Variables

static const char * last_token = NULL
 
static const YYINT yylhs []
 
static const YYINT yylen []
 
static const YYINT yydefred []
 
static const YYINT yydgoto []
 
static const YYINT yysindex []
 
static const YYINT yyrindex []
 
static const YYINT yygindex []
 
static const YYINT yytable []
 
static const YYINT yycheck []
 
int yydebug
 
int yynerrs
 
int yyerrflag
 
int yychar
 
YYSTYPE yyval
 
YYSTYPE yylval
 
static YYSTACKDATA yystack
 
int ergo_scanner_lineno = 1
 
int ergo_scanner_reading_stdin = 0
 

Detailed Description

Parses the input. Uses bison code generator to generate the parses.

Macro Definition Documentation

◆ ANGSTROM

#define ANGSTROM   274

◆ DIVIDE

#define DIVIDE   284

◆ DOT

#define DOT   258

◆ EOFTAG

#define EOFTAG   262

◆ EOL

#define EOL   288

◆ EQUAL

#define EQUAL   260

◆ GETEXC

#define GETEXC   263

◆ GETPOL

#define GETPOL   264

◆ GHOST

#define GHOST   273

◆ GHOSTTAG

#define GHOSTTAG   268

◆ HELP

#define HELP   266

◆ IS_CHT_USED

#define IS_CHT_USED   279

◆ K_ALL

#define K_ALL   265

◆ LEFT_PARENTHESIS

#define LEFT_PARENTHESIS   286

◆ LIST_DFT_FUNCS

#define LIST_DFT_FUNCS   278

◆ MINUS

#define MINUS   282

◆ MOLDAL

#define MOLDAL   269

◆ MOLTAG

#define MOLTAG   267

◆ NEG

#define NEG   289

◆ NUMBER

#define NUMBER   257

◆ PLUS

#define PLUS   281

◆ POWER

#define POWER   285

◆ PRECISION

#define PRECISION   275

◆ QUIT

#define QUIT   270

◆ RANGE

#define RANGE   276

◆ RIGHT_PARENTHESIS

#define RIGHT_PARENTHESIS   287

◆ RUNTAG

#define RUNTAG   271

◆ SET_NTHREADS

#define SET_NTHREADS   280

◆ STRING

#define STRING   261

◆ SYMBOL

#define SYMBOL   259

◆ SYSTEM

#define SYSTEM   272

◆ TIMES

#define TIMES   283

◆ WARRANTY

#define WARRANTY   277

◆ YYABORT

#define YYABORT   goto yyabort

◆ YYACCEPT

#define YYACCEPT   goto yyaccept

◆ YYBYACC

#define YYBYACC   1

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

◆ YYDEBUG

#define YYDEBUG   0

◆ YYEMPTY

#define YYEMPTY   (-1)

◆ YYENOMEM

#define YYENOMEM   (-2)

◆ YYEOF

#define YYEOF   0

◆ YYERRCODE

#define YYERRCODE   256

◆ yyerrok

#define yyerrok   (yyerrflag = 0)

◆ YYERROR

#define YYERROR   goto yyerrlab

◆ YYERROR_CALL

#define YYERROR_CALL (   msg)    yyerror(msg)

◆ YYERROR_DECL

#define YYERROR_DECL ( )    yyerror(const char *s)

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE

◆ YYFINAL

#define YYFINAL   18

◆ yyfreestack

#define yyfreestack (   data)    /* nothing */

◆ YYINITSTACKSIZE

#define YYINITSTACKSIZE   200

◆ YYLEX

#define YYLEX   yylex()

◆ YYLEX_DECL

#define YYLEX_DECL ( )    yylex(void)

◆ YYMAJOR

#define YYMAJOR   1

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

◆ YYMAXTOKEN

#define YYMAXTOKEN   289

◆ YYMINOR

#define YYMINOR   9

◆ YYPARSE_DECL

int YYPARSE_DECL ( )    yyparse(void)

◆ YYPATCH

#define YYPATCH   20140715

◆ YYPREFIX

#define YYPREFIX   "yy"

◆ YYPURE

#define YYPURE   0

◆ YYRECOVERING

#define YYRECOVERING ( )    (yyerrflag != 0)

◆ YYREJECT

#define YYREJECT   goto yyabort

◆ YYSTACKSIZE

#define YYSTACKSIZE   10000

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

◆ YYTABLESIZE

#define YYTABLESIZE   321

◆ YYTRANSLATE

#define YYTRANSLATE (   a)    ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))

◆ YYUNDFTOKEN

#define YYUNDFTOKEN   299

Typedef Documentation

◆ YYINT

typedef short YYINT

Function Documentation

◆ yyerror()

int yyerror ( const char *  s)

◆ yygrowstack()

◆ yylex()

int yylex ( void  )

Variable Documentation

◆ ergo_scanner_lineno

int ergo_scanner_lineno = 1

Referenced by yyerror().

◆ ergo_scanner_reading_stdin

int ergo_scanner_reading_stdin = 0

Referenced by ergo_parse_file(), and yyerror().

◆ last_token

const char* last_token = NULL
static

Referenced by yyerror().

◆ yychar

int yychar

◆ yycheck

const YYINT yycheck[]
static

◆ yydebug

int yydebug

◆ yydefred

const YYINT yydefred[]
static
Initial value:
= { 0,
7, 10, 0, 0, 0, 0, 0, 0, 31, 0,
0, 20, 0, 27, 18, 19, 0, 0, 0, 0,
5, 6, 0, 0, 0, 0, 0, 0, 0, 21,
0, 23, 26, 0, 0, 0, 0, 0, 0, 28,
0, 0, 0, 0, 34, 12, 0, 0, 14, 22,
0, 0, 37, 0, 0, 0, 0, 11, 9, 0,
3, 29, 30, 13, 0, 35, 15, 0, 0, 25,
0, 0, 0, 0, 0, 0, 0, 24, 0, 0,
0, 44, 0, 0, 0, 0, 0, 0, 32, 0,
36, 33,
}

◆ yydgoto

const YYINT yydgoto[]
static
Initial value:
= { 18,
57, 19, 20, 21, 22, 46, 47,
}

◆ yyerrflag

int yyerrflag

◆ yygindex

const YYINT yygindex[]
static
Initial value:
= { 75,
-36, 112, 0, 0, 0, -17, 0,
}

◆ yylen

const YYINT yylen[]
static
Initial value:
= { 2,
0, 1, 3, 0, 1, 1, 1, 3, 3, 1,
3, 3, 4, 3, 4, 1, 2, 1, 1, 1,
2, 3, 2, 4, 4, 2, 1, 3, 4, 4,
1, 6, 7, 1, 2, 5, 1, 3, 3, 3,
3, 2, 3, 3,
}

◆ yylhs

const YYINT yylhs[]
static
Initial value:
= { -1,
0, 0, 0, 3, 3, 3, 3, 4, 4, 2,
2, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 6, 6, 7, 1, 1, 1, 1,
1, 1, 1, 1,
}

◆ yylval

YYSTYPE yylval

◆ yynerrs

int yynerrs

◆ yyrindex

const YYINT yyrindex[]
static
Initial value:
= { 6,
0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 111,
0, 0, 0, 0, 14, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 29, 33, 9, 17, 25, 0, 0, 0,
0, 0,
}

◆ yysindex

const YYINT yysindex[]
static
Initial value:
= { -210,
0, 0, -256, -248, -255, -264, -253, -198, 0, -219,
-217, 0, -257, 0, 0, 0, -241, 0, -224, -238,
0, 0, -206, -165, -203, -214, -251, -207, -251, 0,
-178, 0, 0, -196, -168, -239, -162, -234, -210, 0,
-159, -158, -251, -156, 0, 0, -251, -251, 0, 0,
-155, -157, 0, -183, -254, -254, -205, 0, 0, -190,
0, 0, 0, 0, -152, 0, 0, -151, -150, 0,
-177, -197, -254, -254, -254, -254, -254, 0, -148, -149,
-147, 0, -212, -212, -177, -177, -177, -175, 0, -146,
0, 0,
}

◆ yystack

YYSTACKDATA yystack
static

◆ yytable

const YYINT yytable[]
static

◆ yyval

YYSTYPE yyval