OpenCores
URL https://opencores.org/ocsvn/sc2v/sc2v/trunk

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [src/] [sc2v_step1.y] - Diff between revs 25 and 27

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 25 Rev 27
Line 125... Line 125...
 
 
%token NUMBER WORD SC_REG BOOL BIGGER LOWER OPENKEY CLOSEKEY WRITE WORD SYMBOL NEWLINE ENUM INCLUDE
%token NUMBER WORD SC_REG BOOL BIGGER LOWER OPENKEY CLOSEKEY WRITE WORD SYMBOL NEWLINE ENUM INCLUDE
%token COLON SEMICOLON RANGE OPENPAR CLOSEPAR TWODOUBLEPOINTS OPENCORCH CLOSECORCH SWITCH CASE DEFAULT BREAK
%token COLON SEMICOLON RANGE OPENPAR CLOSEPAR TWODOUBLEPOINTS OPENCORCH CLOSECORCH SWITCH CASE DEFAULT BREAK
%token HEXA DEFINE READ TRANSLATEOFF TRANSLATEON VERILOGBEGIN VERILOGEND TAB DOLLAR MINEQ
%token HEXA DEFINE READ TRANSLATEOFF TRANSLATEON VERILOGBEGIN VERILOGEND TAB DOLLAR MINEQ
%token VOID TTRUE TFALSE ENDFUNC INC DEC INTEGER EQUALS
%token VOID TTRUE TFALSE ENDFUNC INC DEC INTEGER EQUALS
%token PIFDEF PENDDEF PELSE
%token PIFDEF PIFNDEF PENDDEF PELSE
 
 
%% commands:    /* empty */
%% commands:    /* empty */
|commands command;
|commands command;
 
 
 
 
Line 220... Line 220...
  |
  |
  verilogend
  verilogend
  |
  |
  ifdef
  ifdef
  |
  |
 
  ifndef
 
  |
  endif
  endif
  |
  |
  pelse
  pelse
  |
  |
  ttrue
  ttrue
Line 1282... Line 1284...
    }
    }
  else if (verilog == 1)
  else if (verilog == 1)
    fprintf (file, "#ifdef");
    fprintf (file, "#ifdef");
};
};
 
 
 
ifndef:
 
PIFNDEF
 
{
 
  defineparenthesis = 0;
 
  if (translate == 1 && verilog == 0)
 
    {
 
      if (processfound)
 
        {
 
          ifdeffound = 1;
 
          fprintf (file, "`ifndef");
 
        }
 
      else if (definefound)
 
        {
 
          fprintf (FILE_DEFINES, "`ifndef");
 
        }
 
    }
 
  else if (verilog == 1)
 
    fprintf (file, "#ifndef");
 
};
 
 
endif:
endif:
PENDDEF
PENDDEF
{
{
  defineparenthesis = 0;
  defineparenthesis = 0;
  if (translate == 1 && verilog == 0)
  if (translate == 1 && verilog == 0)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.