Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
parse_vcd.y File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "check_vcd.h"

Go to the source code of this file.

Data Structures

struct  vcd_range
 
struct  vcd_vardef
 
struct  vcd_scope
 
struct  vcd_change
 
struct  vcd_changeset
 
struct  vcd_file
 
struct  vcd_variable
 
struct  vcd_set
 
struct  dataset_value
 
struct  dataset_variable
 

Macros

#define YYERROR_VERBOSE   42
 
#define YYDEBUG   1
 
#define YYMAXDEPTH   10000000
 

Enumerations

enum  vcd_vartypes {
  VAR_EVENT, VAR_INTEGER, VAR_PARAMETER, VAR_REAL,
  VAR_REG, VAR_SUPPLY0, VAR_SUPPLY1, VAR_TIME,
  VAR_TRI, VAR_TRIAND, VAR_TRIOR, VAR_TRIREG,
  VAR_TRI0, VAR_TRI1, VAR_WAND, VAR_WIRE,
  VAR_WOR, VAR_EVENT, VAR_INTEGER, VAR_PARAMETER,
  VAR_REAL, VAR_REG, VAR_SUPPLY0, VAR_SUPPLY1,
  VAR_TIME, VAR_TRI, VAR_TRIAND, VAR_TRIOR,
  VAR_TRIREG, VAR_TRI0, VAR_TRI1, VAR_WAND,
  VAR_WIRE, VAR_WOR
}
 
enum  vcd_scopes {
  SCOPE_MODULE, SCOPE_TASK, SCOPE_FUNCTION, SCOPE_BEGIN,
  SCOPE_FORK, SCOPE_MODULE, SCOPE_TASK, SCOPE_FUNCTION,
  SCOPE_BEGIN, SCOPE_FORK
}
 
enum  dataset_vartypes {
  DATA_UNKNOWN, DATA_DEPENDENT, DATA_INDEPENDENT, DATA_UNKNOWN,
  DATA_DEPENDENT, DATA_INDEPENDENT
}
 

Functions

int vcd_checker (void)
 
int vcd_parse (void)
 
int vcd_error (const char *)
 
int vcd_lex (void)
 
int vcd_lex_destroy (void)
 
void vcd_destroy (void)
 
void vcd_init (void)
 
Declaration sizeof (struct vcd_scope))
 
VarDeclaration sizeof (struct vcd_vardef))
 
ValueChangeset sizeof (struct vcd_changeset))
 
ScalarValueChange sizeof (struct vcd_change))
 

Variables

FILE * vcd_in
 
__BEGIN_DECLS struct vcd_filevcd
 
struct dataset_variabledataset_root
 
int vcd_correct
 
name prefix
 
DeclarationList __pad40__
 
Declaration __pad41__
 
vcd scopes ident = strdup (VCD_NOSCOPE)
 
vcd scopes scopes = $2
 
 parent = vcd->scopes
 
 else
 
vcd currentscope = $2
 
t_TIMESCALE
TimeScaleDeclaration t_END
t_UPSCOPE 
t_END
 
ScopeDeclaration __pad42__
 
 type = $1
 
ScopeType __pad43__
 
 s_TASK { $$ = SCOPE_TASK
 
 s_FUNCTION { $$ = SCOPE_FUNCTION
 
 s_BEGIN { $$ = SCOPE_BEGIN
 
 s_FORK { $$ = SCOPE_FORK
 
TimeScaleDeclaration __pad44__
 
vcd scale = $2
 
TimeScale __pad45__
 
 TEN { $$ = 10
 
 HUNDRET { $$ = 100
 
TimeUnit __pad46__
 
 MILLI { $$ = 1e-3
 
 MICRO { $$ = 1e-6
 
 NANO { $$ = 1e-9
 
 PICO { $$ = 1e-12
 
 FEMTO { $$ = 1e-15
 
VarDeclaration __pad47__
 
 size = $2
 
 code = $3
 
 range = $5
 
BitSelect __pad48__
 
 l = -1
 
 h = $2
 
 PositiveInteger
 
VarType __pad49__
 
 INTEGER { $$ = VAR_INTEGER
 
 PARAMETER { $$ = VAR_PARAMETER
 
 REAL { $$ = VAR_REAL
 
 REG { $$ = VAR_REG
 
 SUPPLY0 { $$ = VAR_SUPPLY0
 
 SUPPLY1 { $$ = VAR_SUPPLY1
 
 TIME { $$ = VAR_TIME
 
 TRI { $$ = VAR_TRI
 
 TRIAND { $$ = VAR_TRIAND
 
 TRIOR { $$ = VAR_TRIOR
 
 TRIREG { $$ = VAR_TRIREG
 
 TRI0 { $$ = VAR_TRI0
 
 TRI1 { $$ = VAR_TRI1
 
 WAND { $$ = VAR_WAND
 
 WIRE { $$ = VAR_WIRE
 
 WOR { $$ = VAR_WOR
 
Size __pad50__
 
SimulationCommandList __pad51__
 
SimulationCommand __pad52__
 
 ValueChangeset
 
vcd changesets = $1
 
ValueChangeset __pad53__
 
 t = $1
 
 changes = $2
 
SimulationTime __pad54__
 
ValueChangeList __pad55__
 
ValueChange ValueChangeList
 
ValueChange __pad56__
 
ScalarValueChange __pad57__
 
 value = $1
 
Value __pad58__
 
VectorValueChange __pad59__
 
R Real IdentifierCode
 
 isreal = 1
 

Macro Definition Documentation

#define YYDEBUG   1
#define YYERROR_VERBOSE   42
#define YYMAXDEPTH   10000000

Enumeration Type Documentation

Enumerator
DATA_UNKNOWN 
DATA_DEPENDENT 
DATA_INDEPENDENT 
DATA_UNKNOWN 
DATA_DEPENDENT 
DATA_INDEPENDENT 

Definition at line 212 of file parse_vcd.y.

enum vcd_scopes
Enumerator
SCOPE_MODULE 
SCOPE_TASK 
SCOPE_FUNCTION 
SCOPE_BEGIN 
SCOPE_FORK 
SCOPE_MODULE 
SCOPE_TASK 
SCOPE_FUNCTION 
SCOPE_BEGIN 
SCOPE_FORK 

Definition at line 138 of file parse_vcd.y.

Enumerator
VAR_EVENT 
VAR_INTEGER 
VAR_PARAMETER 
VAR_REAL 
VAR_REG 
VAR_SUPPLY0 
VAR_SUPPLY1 
VAR_TIME 
VAR_TRI 
VAR_TRIAND 
VAR_TRIOR 
VAR_TRIREG 
VAR_TRI0 
VAR_TRI1 
VAR_WAND 
VAR_WIRE 
VAR_WOR 
VAR_EVENT 
VAR_INTEGER 
VAR_PARAMETER 
VAR_REAL 
VAR_REG 
VAR_SUPPLY0 
VAR_SUPPLY1 
VAR_TIME 
VAR_TRI 
VAR_TRIAND 
VAR_TRIOR 
VAR_TRIREG 
VAR_TRI0 
VAR_TRI1 
VAR_WAND 
VAR_WIRE 
VAR_WOR 

Definition at line 100 of file parse_vcd.y.

Function Documentation

ScopeDeclaration sizeof ( struct vcd_scope  )
VarDeclaration sizeof ( struct vcd_vardef  )
ValueChangeset sizeof ( struct vcd_changeset  )
VectorValueChange sizeof ( struct vcd_change  )
int vcd_checker ( void  )

Definition at line 500 of file check_vcd.cpp.

void vcd_destroy ( void  )

Definition at line 594 of file check_vcd.cpp.

int vcd_error ( const char *  error)

Definition at line 344 of file parse_vcd.y.

void vcd_init ( void  )

Definition at line 605 of file check_vcd.cpp.

int vcd_lex ( void  )
int vcd_lex_destroy ( void  )
int vcd_parse ( void  )

Variable Documentation

DeclarationList __pad40__

Definition at line 113 of file parse_vcd.y.

Declaration __pad41__

Definition at line 123 of file parse_vcd.y.

ScopeDeclaration __pad42__

Definition at line 163 of file parse_vcd.y.

ScopeType __pad43__

Definition at line 167 of file parse_vcd.y.

TimeScaleDeclaration __pad44__

Definition at line 175 of file parse_vcd.y.

TimeScale __pad45__

Definition at line 182 of file parse_vcd.y.

TimeUnit __pad46__

Definition at line 188 of file parse_vcd.y.

VarDeclaration __pad47__

Definition at line 197 of file parse_vcd.y.

BitSelect __pad48__

Definition at line 208 of file parse_vcd.y.

VarType __pad49__

Definition at line 226 of file parse_vcd.y.

Size __pad50__

Definition at line 264 of file parse_vcd.y.

SimulationCommandList __pad51__

Definition at line 272 of file parse_vcd.y.

SimulationCommand __pad52__

Definition at line 279 of file parse_vcd.y.

ValueChangeset __pad53__

Definition at line 285 of file parse_vcd.y.

SimulationTime __pad54__

Definition at line 293 of file parse_vcd.y.

ValueChangeList __pad55__

Definition at line 299 of file parse_vcd.y.

ValueChange __pad56__

Definition at line 305 of file parse_vcd.y.

ScalarValueChange __pad57__

Definition at line 314 of file parse_vcd.y.

Value __pad58__

Definition at line 318 of file parse_vcd.y.

VectorValueChange __pad59__

Definition at line 329 of file parse_vcd.y.

changes = $2

Definition at line 291 of file parse_vcd.y.

vcd changesets = $1

Definition at line 283 of file parse_vcd.y.

code = $3

Definition at line 204 of file parse_vcd.y.

vcd currentscope = $2

Definition at line 133 of file parse_vcd.y.

struct dataset_variable* dataset_root

Definition at line 54 of file check_vcd.cpp.

else
Initial value:
{
$2->next = vcd->currentscope->scopes
struct vcd_scope * scopes
Definition: check_vcd.h:109
struct vcd_scope * currentscope
Definition: check_vcd.h:138
__BEGIN_DECLS struct vcd_file * vcd
Definition: check_vcd.cpp:49

Definition at line 127 of file parse_vcd.y.

FEMTO { $$ = 1e-15

Definition at line 196 of file parse_vcd.y.

h = $2

Definition at line 214 of file parse_vcd.y.

HUNDRET { $$ = 100

Definition at line 187 of file parse_vcd.y.

ident = strdup (VCD_NOSCOPE)

Definition at line 124 of file parse_vcd.y.

R Real IdentifierCode
Initial value:
{
$$ = (struct vcd_change *) calloc (1, sizeof (struct vcd_change))

Definition at line 333 of file parse_vcd.y.

INTEGER { $$ = VAR_INTEGER

Definition at line 231 of file parse_vcd.y.

isreal = 1

Definition at line 337 of file parse_vcd.y.

l = -1

Definition at line 213 of file parse_vcd.y.

MICRO { $$ = 1e-6

Definition at line 193 of file parse_vcd.y.

MILLI { $$ = 1e-3

Definition at line 192 of file parse_vcd.y.

NANO { $$ = 1e-9

Definition at line 194 of file parse_vcd.y.

PARAMETER { $$ = VAR_PARAMETER

Definition at line 233 of file parse_vcd.y.

parent = vcd->scopes

Definition at line 126 of file parse_vcd.y.

PICO { $$ = 1e-12

Definition at line 195 of file parse_vcd.y.

PositiveInteger
Initial value:
{
$$ = (struct vcd_range *) calloc (1, sizeof (struct vcd_range))

Definition at line 221 of file parse_vcd.y.

name prefix

Definition at line 46 of file parse_vcd.y.

range = $5

Definition at line 206 of file parse_vcd.y.

REAL { $$ = VAR_REAL

Definition at line 236 of file parse_vcd.y.

REG { $$ = VAR_REG

Definition at line 238 of file parse_vcd.y.

s_BEGIN { $$ = SCOPE_BEGIN

Definition at line 173 of file parse_vcd.y.

s_FORK { $$ = SCOPE_FORK

Definition at line 174 of file parse_vcd.y.

s_FUNCTION { $$ = SCOPE_FUNCTION

Definition at line 172 of file parse_vcd.y.

s_TASK { $$ = SCOPE_TASK

Definition at line 171 of file parse_vcd.y.

vcd scale = $2

Definition at line 180 of file parse_vcd.y.

vcd currentscope scopes = $2

Definition at line 125 of file parse_vcd.y.

size = $2

Definition at line 203 of file parse_vcd.y.

SUPPLY0 { $$ = VAR_SUPPLY0

Definition at line 240 of file parse_vcd.y.

SUPPLY1 { $$ = VAR_SUPPLY1

Definition at line 242 of file parse_vcd.y.

t = $1

Definition at line 290 of file parse_vcd.y.

t_TIMESCALE TimeScaleDeclaration t_END t_UPSCOPE t_END
Initial value:
{
} else {
fprintf (stderr, "vcd notice, unnecessary $upscope in line %d\n",
}
}
| t_VERSION t_END
| t_VAR VarDeclaration t_END {
if (!vcd->scopes) {
vcd->scopes = (struct vcd_scope *)
calloc (1, sizeof (struct vcd_scope));
vcd->scopes->ident = strdup (VCD_NOSCOPE);
}
$2->scope = vcd->currentscope;
}
struct vcd_scope * scopes
Definition: check_vcd.h:137
t_TIMESCALE TimeScaleDeclaration t_END t_UPSCOPE t_END
Definition: parse_vcd.y:136
char * ident
Definition: check_vcd.h:107
int vcd_lineno
struct vcd_scope * next
Definition: check_vcd.h:111
struct vcd_scope * currentscope
Definition: check_vcd.h:138
struct vcd_scope * parent
Definition: check_vcd.h:110
__BEGIN_DECLS struct vcd_file * vcd
Definition: check_vcd.cpp:49
struct vcd_vardef * vardefs
Definition: check_vcd.h:108
#define VCD_NOSCOPE
Definition: parse_vcd.y:76

Definition at line 136 of file parse_vcd.y.

TEN { $$ = 10

Definition at line 186 of file parse_vcd.y.

TIME { $$ = VAR_TIME

Definition at line 244 of file parse_vcd.y.

TRI { $$ = VAR_TRI

Definition at line 246 of file parse_vcd.y.

TRI0 { $$ = VAR_TRI0

Definition at line 254 of file parse_vcd.y.

TRI1 { $$ = VAR_TRI1

Definition at line 256 of file parse_vcd.y.

TRIAND { $$ = VAR_TRIAND

Definition at line 248 of file parse_vcd.y.

TRIOR { $$ = VAR_TRIOR

Definition at line 250 of file parse_vcd.y.

TRIREG { $$ = VAR_TRIREG

Definition at line 252 of file parse_vcd.y.

DefBegin type = $1

Definition at line 164 of file parse_vcd.y.

value = $1

Definition at line 315 of file parse_vcd.y.

ValueChange ValueChangeList
Initial value:
{
$1->next = $2

Definition at line 302 of file parse_vcd.y.

ValueChangeset
Initial value:
{
$1->next = vcd->changesets
struct vcd_changeset * changesets
Definition: check_vcd.h:139
__BEGIN_DECLS struct vcd_file * vcd
Definition: check_vcd.cpp:49

Definition at line 281 of file parse_vcd.y.

__BEGIN_DECLS struct vcd_file* vcd

Definition at line 49 of file check_vcd.cpp.

int vcd_correct

Definition at line 52 of file check_vcd.cpp.

FILE* vcd_in
Initial value:
{
#define YYERROR_VERBOSE
#define YYDEBUG
#define YYMAXDEPTH
# 1 "/Users/guitorri/git/qucs/qucs-core/src/converter/check_vcd.h" 1
#define __CHECK_VCD_H__
extern int vcd_lineno
int vcd_lineno
WAND { $$ = VAR_WAND

Definition at line 258 of file parse_vcd.y.

WIRE { $$ = VAR_WIRE

Definition at line 260 of file parse_vcd.y.

WOR { $$ = VAR_WOR

Definition at line 262 of file parse_vcd.y.