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

Go to the source code of this file.

Data Structures

struct  value_t
 
struct  pair_t
 
struct  definition_t
 
struct  property_t
 
struct  define_t
 
class  qucs::matvec
 
class  qucs::eqn::node
 
class  qucs::eqn::constant
 
class  qucs::eqn::reference
 
class  qucs::eqn::assignment
 
class  qucs::eqn::application
 
class  qucs::eqn::checker
 
class  qucs::eqn::solver
 
class  qucs::range
 

Namespaces

 qucs
 
 qucs::eqn
 

Macros

#define YYERROR_VERBOSE   42
 
#define YYDEBUG   1
 
#define YYMAXDEPTH   1000000
 

Enumerations

enum  qucs::eqn::NodeTag {
  qucs::eqn::UNKNOWN = -1, qucs::eqn::CONSTANT = 0, qucs::eqn::REFERENCE, qucs::eqn::APPLICATION,
  qucs::eqn::ASSIGNMENT, qucs::eqn::UNKNOWN = -1, qucs::eqn::CONSTANT = 0, qucs::eqn::REFERENCE,
  qucs::eqn::APPLICATION, qucs::eqn::ASSIGNMENT
}
 
enum  qucs::eqn::ConstantTag {
  qucs::eqn::TAG_UNKNOWN = 0, qucs::eqn::TAG_DOUBLE = 1, qucs::eqn::TAG_COMPLEX = 2, qucs::eqn::TAG_VECTOR = 4,
  qucs::eqn::TAG_MATRIX = 8, qucs::eqn::TAG_MATVEC = 16, qucs::eqn::TAG_CHAR = 32, qucs::eqn::TAG_STRING = 64,
  qucs::eqn::TAG_RANGE = 128, qucs::eqn::TAG_BOOLEAN = 256, qucs::eqn::TAG_UNKNOWN = 0, qucs::eqn::TAG_DOUBLE = 1,
  qucs::eqn::TAG_COMPLEX = 2, qucs::eqn::TAG_VECTOR = 4, qucs::eqn::TAG_MATRIX = 8, qucs::eqn::TAG_MATVEC = 16,
  qucs::eqn::TAG_CHAR = 32, qucs::eqn::TAG_STRING = 64, qucs::eqn::TAG_RANGE = 128, qucs::eqn::TAG_BOOLEAN = 256
}
 

Functions

void netlist_status (void)
 
void netlist_list (void)
 
void netlist_destroy (void)
 
void netlist_destroy_env (void)
 
int netlist_checker (qucs::environment *)
 
int netlist_parse (void)
 
int netlist_error (const char *)
 
int netlist_lex (void)
 
int netlist_lex_destroy (void)
 
int netlist_checker_variables (qucs::environment *)
 
struct definition_tnetlist_unchain_definition (struct definition_t *, struct definition_t *)
 
matvec qucs::transpose (matvec a)
 
matvec qucs::conj (matvec a)
 
qucs::vector qucs::det (matvec a)
 
matvec qucs::inverse (matvec a)
 
matvec qucs::sqr (matvec a)
 
matvec qucs::pow (matvec a, int n)
 
matvec qucs::pow (matvec, vector)
 
matvec qucs::twoport (matvec m, char in, char out)
 
matvec qucs::real (matvec a)
 
matvec qucs::imag (matvec a)
 
matvec qucs::abs (matvec a)
 
matvec qucs::dB (matvec a)
 
matvec qucs::arg (matvec a)
 
matvec qucs::adjoint (matvec a)
 
qucs::vector qucs::rollet (matvec m)
 
qucs::vector qucs::b1 (matvec m)
 
matvec qucs::stos (matvec s, nr_complex_t zref, nr_complex_t z0)
 
matvec qucs::stos (matvec s, nr_double_t zref, nr_double_t z0)
 
matvec qucs::stos (matvec, vector, nr_complex_t z0=50.0)
 
matvec qucs::stos (matvec, nr_complex_t, vector)
 
matvec qucs::stos (matvec, vector, vector)
 
matvec qucs::stoz (matvec s, nr_complex_t z0)
 
matvec qucs::stoz (matvec, vector)
 
matvec qucs::ztos (matvec z, nr_complex_t z0)
 
matvec qucs::ztos (matvec, vector)
 
matvec qucs::ztoy (matvec z)
 
matvec qucs::stoy (matvec s, nr_complex_t z0)
 
matvec qucs::stoy (matvec, vector)
 
matvec qucs::ytos (matvec y, nr_complex_t z0)
 
matvec qucs::ytos (matvec, vector)
 
matvec qucs::ytoz (matvec y)
 
 setInstance ($3)
 
 setNext ($5)
 
 applyInstance ()
 
c appendNodes ($2)
 
 appendNodes (c)
 
 append ($3)
 
 append (c)
 
c1 append (c2)
 
int netlist_error (const char *error)
 

Variables

name prefix
 
InputList __pad0__
 
InputLine InputList
 
InputLine __pad1__
 
EquationLine ActionLine
DefinitionLine 
Eol
 
ActionLine __pad2__
 
ActionLine action = PROP_ACTION
 
 type = $2
 
 instance = $4
 
 pairs = $5
 
 line = netlist_lineno
 
DefinitionLine __pad3__
 
 nodes = $4
 
InstanceIdentifier __pad4__
 
 ScaleOrUnit { $$ = $1
 
NodeIdentifier __pad5__
 
NodeList __pad6__
 
NodeIdentifier NodeList
 
 node = $1
 
 next = $2
 
PairList __pad7__
 
Assign Value PairList
 
 key = $1
 
 value = $2
 
NoneValue __pad8__
 
Value __pad9__
 
 PropertyValue
 
PropertyReal __pad10__
 
 scale = $2
 
 unit = $3
 
PropertyValue __pad11__
 
 InstanceIdentifier
 
 ident = $1
 
ValueList __pad12__
 
 PropertyReal
 
 ValueList
 
EquationLine __pad13__ = $1
 
 eqns = $4
 
EquationList __pad14__
 
Equation EquationList
 
Equation __pad15__ = $1
 
 result = $1
 
 body = $3
 
Expression __pad16__
 
 Reference
 
 Application
 
 Expression
 
ExpressionCol __pad17__
 
ExpressionColList __pad18__ = $1
 
Expression ExpressionColList
 
ExpressionVector __pad19__ = $2
 
Vector __pad20__
 
 n = strdup ("vector")
 
 nargs = $1->count ()
 
 args = $1
 
ExpressionRowList __pad21__
 
ExpressionCol ExpressionRowList
 
c chr = ';'
 
ExpressionMatrix __pad22__ = c
 
Matrix __pad23__ = $1
 
Constant __pad24__
 
 d = $1
 
 IMAG
 
 c = new nr_complex_t (0.0, $1)
 
 Character
 
 STRING
 
 s = $1
 
Range __pad25__
 
 __pad26__
 
Expression __pad27__
 
 __pad28__
 
eqn::constant * c1 = new eqn::constant (eqn::TAG_CHAR)
 
eqn::constant * c2 = new eqn::constant (eqn::TAG_CHAR)
 
Reference __pad29__
 
Application __pad30__
 
Expression prec POS
 
Expression prec NEG
 
ExpressionList __pad31__
 
 Range
 
 ExpressionList
 
SubcircuitBody __pad32__ = $1
 
DefBegin __pad33__ = NULL
 
DefBody __pad34__
 
DefBodyLine DefBody
 
DefEnd __pad35__
 
DefBodyLine __pad36__
 
 EquationLine
 
 SubcircuitBody
 

Macro Definition Documentation

#define YYDEBUG   1
#define YYERROR_VERBOSE   42
#define YYMAXDEPTH   1000000

Function Documentation

append (   $3)
append ( c  )
c1 append ( c2  )
appendNodes (   $2)
appendNodes ( c  )
applyInstance ( )
int netlist_checker ( qucs::environment )
int netlist_checker_variables ( qucs::environment )
void netlist_destroy ( void  )

Definition at line 2323 of file check_netlist.cpp.

void netlist_destroy_env ( void  )

Definition at line 2336 of file check_netlist.cpp.

int netlist_error ( const char *  )

Definition at line 664 of file parse_netlist.y.

int netlist_error ( const char *  error)

Definition at line 664 of file parse_netlist.y.

int netlist_lex ( void  )
int netlist_lex_destroy ( void  )
void netlist_list ( void  )
int netlist_parse ( void  )
void netlist_status ( void  )

Definition at line 2153 of file check_netlist.cpp.

struct definition_t* netlist_unchain_definition ( struct definition_t ,
struct definition_t  
)

Definition at line 1936 of file check_netlist.cpp.

setInstance (   $3)
setNext (   $5)

Variable Documentation

InputList __pad0__

Definition at line 127 of file parse_netlist.y.

PropertyReal __pad10__

Definition at line 231 of file parse_netlist.y.

PropertyValue __pad11__

Definition at line 249 of file parse_netlist.y.

ValueList __pad12__
Initial value:
{
$$ = $2

Definition at line 263 of file parse_netlist.y.

EquationLine __pad13__ = $1

Definition at line 275 of file parse_netlist.y.

EquationList __pad14__

Definition at line 292 of file parse_netlist.y.

Equation __pad15__ = $1

Definition at line 297 of file parse_netlist.y.

Expression __pad16__

Definition at line 307 of file parse_netlist.y.

ExpressionCol __pad17__
Initial value:
{
$$ = $2

Definition at line 325 of file parse_netlist.y.

ExpressionColList __pad18__ = $1

Definition at line 333 of file parse_netlist.y.

ExpressionVector __pad19__ = $2

Definition at line 340 of file parse_netlist.y.

InputLine __pad1__

Definition at line 140 of file parse_netlist.y.

Vector __pad20__

Definition at line 350 of file parse_netlist.y.

ExpressionRowList __pad21__

Definition at line 355 of file parse_netlist.y.

ExpressionMatrix __pad22__ = c

Definition at line 363 of file parse_netlist.y.

Matrix __pad23__ = $1

Definition at line 374 of file parse_netlist.y.

Constant __pad24__

Definition at line 385 of file parse_netlist.y.

Range __pad25__

Definition at line 404 of file parse_netlist.y.

__pad26__

Definition at line 415 of file parse_netlist.y.

Expression __pad27__

Definition at line 424 of file parse_netlist.y.

__pad28__

Definition at line 433 of file parse_netlist.y.

Reference __pad29__

Definition at line 443 of file parse_netlist.y.

ActionLine __pad2__

Definition at line 148 of file parse_netlist.y.

Application __pad30__

Definition at line 450 of file parse_netlist.y.

ExpressionList __pad31__

Definition at line 590 of file parse_netlist.y.

SubcircuitBody __pad32__ = $1

Definition at line 605 of file parse_netlist.y.

DefBegin __pad33__ = NULL

Definition at line 613 of file parse_netlist.y.

DefBody __pad34__

Definition at line 628 of file parse_netlist.y.

DefEnd __pad35__

Definition at line 644 of file parse_netlist.y.

DefBodyLine __pad36__

Definition at line 648 of file parse_netlist.y.

DefinitionLine __pad3__

Definition at line 161 of file parse_netlist.y.

Definition at line 176 of file parse_netlist.y.

NodeIdentifier __pad5__

Definition at line 181 of file parse_netlist.y.

NodeList __pad6__

Definition at line 186 of file parse_netlist.y.

PairList __pad7__

Definition at line 195 of file parse_netlist.y.

NoneValue __pad8__

Definition at line 221 of file parse_netlist.y.

Value __pad9__

Definition at line 226 of file parse_netlist.y.

Definition at line 155 of file parse_netlist.y.

Application
Initial value:
{
$$ = $1

Definition at line 316 of file parse_netlist.y.

args = $1

Definition at line 353 of file parse_netlist.y.

body = $3

Definition at line 305 of file parse_netlist.y.

eqn::constant * c = new nr_complex_t (0.0, $1)

Definition at line 394 of file parse_netlist.y.

eqn::constant* c1 = new eqn::constant (eqn::TAG_CHAR)

Definition at line 436 of file parse_netlist.y.

eqn::constant* c2 = new eqn::constant (eqn::TAG_CHAR)

Definition at line 437 of file parse_netlist.y.

Character
Initial value:
{
$$ = new eqn::constant (eqn::TAG_CHAR)

Definition at line 396 of file parse_netlist.y.

c2 chr = ';'

Definition at line 360 of file parse_netlist.y.

d = $1

Definition at line 390 of file parse_netlist.y.

DefBodyLine DefBody
Initial value:
{
if ($1) {
$1->next = $2;
$$ = $1;
}
else {
$$ = $2;
}
}

Definition at line 631 of file parse_netlist.y.

EquationLine ActionLine DefinitionLine Eol
Initial value:
{
$$ = NULL

Definition at line 145 of file parse_netlist.y.

eqns = $4

Definition at line 290 of file parse_netlist.y.

EquationLine
Initial value:
{
$1->next = $$

Definition at line 651 of file parse_netlist.y.

Equation EquationList
Initial value:
{
$1->setNext ($2)

Definition at line 295 of file parse_netlist.y.

Expression Or Expression
Initial value:
{
$$ = $2

Definition at line 319 of file parse_netlist.y.

Expression ExpressionColList
Initial value:
{
$2->appendNodes ($3)

Definition at line 338 of file parse_netlist.y.

ExpressionList
Initial value:
{
$1->setNext ($3)

Definition at line 599 of file parse_netlist.y.

ExpressionCol ExpressionRowList
Initial value:
{
eqn::constant * c = new eqn::constant (eqn::TAG_CHAR)

Definition at line 358 of file parse_netlist.y.

ident = $1

Definition at line 257 of file parse_netlist.y.

IMAG
Initial value:
{
$$ = new eqn::constant (eqn::TAG_COMPLEX)

Definition at line 392 of file parse_netlist.y.

InputLine InputList
Initial value:
{
if ($1) {
$1->next = $2;
$$ = $1;
} else {
$$ = $2;
}
}

Definition at line 128 of file parse_netlist.y.

instance = $4

Definition at line 157 of file parse_netlist.y.

InstanceIdentifier
Initial value:
{
$$ = create_value ()
#define create_value()

Definition at line 255 of file parse_netlist.y.

key = $1

Definition at line 201 of file parse_netlist.y.

Definition at line 159 of file parse_netlist.y.

n = strdup ("vector")

Definition at line 351 of file parse_netlist.y.

nargs = $1->count ()

Definition at line 352 of file parse_netlist.y.

Expression prec NEG
Initial value:
{
$$ = new eqn::application ()

Definition at line 507 of file parse_netlist.y.

next = $2

Definition at line 193 of file parse_netlist.y.

node = $1

Definition at line 192 of file parse_netlist.y.

NodeIdentifier NodeList
Initial value:
{
$$ = (struct node_t *) calloc (sizeof (struct node_t), 1)
Definition: netdefs.h:33

Definition at line 190 of file parse_netlist.y.

nodes = $4

Definition at line 172 of file parse_netlist.y.

Assign NoneValue PairList
Initial value:
{
$$ = (struct pair_t *) calloc (sizeof (struct pair_t), 1)
Definition: netdefs.h:54

Definition at line 199 of file parse_netlist.y.

pairs = $5

Definition at line 158 of file parse_netlist.y.

Expression prec POS
Initial value:
{
$$ = new eqn::application ()

Definition at line 501 of file parse_netlist.y.

name prefix

Definition at line 49 of file parse_netlist.y.

PropertyReal
Initial value:
{
$1->next = NULL

Definition at line 269 of file parse_netlist.y.

PropertyValue
Initial value:
{
$$ = $2

Definition at line 228 of file parse_netlist.y.

Range
Initial value:
{
$$ = $1

Definition at line 596 of file parse_netlist.y.

Reference['ExpressionList ']
Initial value:
{
$$ = $1

Definition at line 313 of file parse_netlist.y.

result = $1

Definition at line 304 of file parse_netlist.y.

s = $1

Definition at line 402 of file parse_netlist.y.

scale = $2

Definition at line 241 of file parse_netlist.y.

REAL ScaleOrUnit ScaleOrUnit { $$ = $1

Definition at line 180 of file parse_netlist.y.

STRING
Initial value:
{
$$ = new eqn::constant (eqn::TAG_STRING)

Definition at line 400 of file parse_netlist.y.

SubcircuitBody
Initial value:
{ }
| Eol {
$$ = NULL;
}
EquationLine ActionLine DefinitionLine Eol

Definition at line 655 of file parse_netlist.y.

DefBegin type = $2

Definition at line 156 of file parse_netlist.y.

unit = $3

Definition at line 247 of file parse_netlist.y.

value = $2

Definition at line 202 of file parse_netlist.y.

ValueList
Initial value:
{
$1->next = $3

Definition at line 273 of file parse_netlist.y.