URL
https://opencores.org/ocsvn/sc2v/sc2v/trunk
[/] [sc2v/] [trunk/] [src/] [sc2v_step3.l] - Blame information for rev 4
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
4 |
jcastillo |
/* -----------------------------------------------------------------------------
|
2 |
|
|
*
|
3 |
|
|
* SystemC to Verilog Translator v0.2
|
4 |
|
|
* Provided by OpenSoc Design
|
5 |
|
|
*
|
6 |
|
|
* www.opensocdesign.com
|
7 |
|
|
*
|
8 |
|
|
* -----------------------------------------------------------------------------
|
9 |
|
|
* This program is free software; you can redistribute it and/or modify
|
10 |
|
|
* it under the terms of the GNU General Public License as published by
|
11 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
12 |
|
|
* (at your option) any later version.
|
13 |
|
|
*
|
14 |
|
|
* This program is distributed in the hope that it will be useful,
|
15 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
* GNU Library General Public License for more details.
|
18 |
|
|
*
|
19 |
|
|
* You should have received a copy of the GNU General Public License
|
20 |
|
|
* along with this program; if not, write to the Free Software
|
21 |
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
22 |
|
|
*/
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
%{
|
26 |
|
|
#include
|
27 |
|
|
#include "y.tab.h"
|
28 |
|
|
|
29 |
|
|
extern int yylval;
|
30 |
|
|
|
31 |
|
|
%}
|
32 |
|
|
|
33 |
|
|
%%
|
34 |
|
|
"module"[" "]*[a-zA-Z][_a-zA-Z0-9]*[" "]*["("] yylval=(int)strdup(yytext); return MODULE;
|
35 |
|
|
"("[" "]*[a-zA-Z][_a-zA-Z0-9" "\[\]:]*[,] yylval=(int)strdup(yytext); return WORD;
|
36 |
|
|
"(" return OPENPAR;
|
37 |
|
|
")" return CLOSEPAR;
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
%%
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.