ergo
ergo_input_processor.c File Reference

Parses the input. More...

#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   20140101
 
#define YYEMPTY   (-1)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define yyerrok   (yyerrflag = 0)
 
#define YYRECOVERING()   (yyerrflag != 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 SET_NTHREADS   278
 
#define PLUS   279
 
#define MINUS   280
 
#define TIMES   281
 
#define DIVIDE   282
 
#define POWER   283
 
#define LEFT_PARENTHESIS   284
 
#define RIGHT_PARENTHESIS   285
 
#define EOL   286
 
#define NEG   287
 
#define YYERRCODE   256
 
#define YYTABLESIZE   319
 
#define YYFINAL   16
 
#define YYDEBUG   0
 
#define YYMAXTOKEN   287
 
#define YYTRANSLATE(a)   ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (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
 

Functions

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

Variables

static const char yysccsid [] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"
 
static const char * last_token = NULL
 
static const short yylhs []
 
static const short yylen []
 
static const short yydefred []
 
static const short yydgoto []
 
static const short yysindex []
 
static const short yyrindex []
 
static const short yygindex []
 
static const short yytable []
 
static const short 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

Referenced by while().

◆ DIVIDE

#define DIVIDE   282

Referenced by while().

◆ DOT

#define DOT   258

Referenced by while().

◆ EOFTAG

#define EOFTAG   262

Referenced by while().

◆ EOL

#define EOL   286

Referenced by while().

◆ EQUAL

#define EQUAL   260

Referenced by while().

◆ GETEXC

#define GETEXC   263

Referenced by while().

◆ GETPOL

#define GETPOL   264

Referenced by while().

◆ GHOST

#define GHOST   273

Referenced by while().

◆ GHOSTTAG

#define GHOSTTAG   268

◆ HELP

#define HELP   266

Referenced by while().

◆ K_ALL

#define K_ALL   265

Referenced by while().

◆ LEFT_PARENTHESIS

#define LEFT_PARENTHESIS   284

Referenced by while().

◆ MINUS

#define MINUS   280

Referenced by while().

◆ MOLDAL

#define MOLDAL   269

Referenced by while().

◆ MOLTAG

#define MOLTAG   267

Referenced by while().

◆ NEG

#define NEG   287

◆ NUMBER

#define NUMBER   257

Referenced by while().

◆ PLUS

#define PLUS   279

Referenced by while().

◆ POWER

#define POWER   283

Referenced by while().

◆ PRECISION

#define PRECISION   275

Referenced by while().

◆ QUIT

#define QUIT   270

Referenced by while().

◆ RANGE

#define RANGE   276

Referenced by while().

◆ RIGHT_PARENTHESIS

#define RIGHT_PARENTHESIS   285

Referenced by while().

◆ RUNTAG

#define RUNTAG   271

Referenced by while().

◆ SET_NTHREADS

#define SET_NTHREADS   278

Referenced by while().

◆ STRING

#define STRING   261

Referenced by while().

◆ SYMBOL

#define SYMBOL   259

Referenced by while().

◆ SYSTEM

#define SYSTEM   272

Referenced by while().

◆ TIMES

#define TIMES   281

Referenced by while().

◆ WARRANTY

#define WARRANTY   277

Referenced by while().

◆ 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)

◆ 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   16

◆ yyfreestack

#define yyfreestack (   data)    /* nothing */

Referenced by yygrowstack().

◆ YYINITSTACKSIZE

#define YYINITSTACKSIZE   200

Referenced by yygrowstack().

◆ YYLEX

#define YYLEX   yylex()

◆ YYLEX_DECL

#define YYLEX_DECL ( )    yylex(void)

◆ YYMAJOR

#define YYMAJOR   1

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Referenced by yygrowstack().

◆ YYMAXTOKEN

#define YYMAXTOKEN   287

◆ YYMINOR

#define YYMINOR   9

◆ YYPARSE_DECL

int YYPARSE_DECL ( )    yyparse(void)

◆ YYPATCH

#define YYPATCH   20140101

◆ 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   319

◆ YYTRANSLATE

#define YYTRANSLATE (   a)    ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))

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 while(), and yyerror().

◆ ergo_scanner_reading_stdin

int ergo_scanner_reading_stdin = 0

Referenced by ergo_parse_file(), while(), and yyerror().

◆ last_token

const char* last_token = NULL
static

Referenced by yyerror().

◆ yychar

int yychar

◆ yycheck

const short yycheck[]
static

◆ yydebug

int yydebug

◆ yydefred

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

◆ yydgoto

const short yydgoto[]
static
Initial value:
= { 16,
55, 17, 18, 19, 20, 44, 45,
}

◆ yyerrflag

int yyerrflag

◆ yygindex

const short yygindex[]
static
Initial value:
= { 76,
-34, 109, 0, 0, 0, 24, 0,
}

◆ yylen

const short yylen[]
static
Initial value:
= { 2,
0, 1, 3, 0, 1, 1, 1, 3, 3, 1,
3, 3, 4, 3, 4, 1, 2, 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 short 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, 6, 6, 7, 1, 1, 1, 1, 1, 1,
1, 1,
}

◆ yylval

YYSTYPE yylval

Referenced by while().

◆ yynerrs

int yynerrs

◆ yyrindex

const short yyrindex[]
static
Initial value:
= { 6,
0, 0, 0, 0, 7, 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,
}

◆ yysccsid

const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"
static

◆ yysindex

const short yysindex[]
static
Initial value:
= { -214,
0, 0, -243, -229, -225, -264, -258, -237, 0, -217,
-213, 0, -252, 0, -238, 0, -247, -227, 0, 0,
-197, -218, -182, -203, -169, -195, -169, 0, -167, 0,
0, -168, -162, -257, -163, -249, -214, 0, -160, -159,
-169, -158, 0, 0, -169, -169, 0, 0, -157, -156,
0, -184, -254, -254, -208, 0, 0, -194, 0, 0,
0, 0, -155, 0, 0, -154, -152, 0, -177, -201,
-254, -254, -254, -254, -254, 0, -150, -153, -148, 0,
-215, -215, -177, -177, -177, -176, 0, -149, 0, 0,
}

◆ yystack

YYSTACKDATA yystack
static

◆ yytable

const short yytable[]
static

◆ yyval

YYSTYPE yyval