2 /* This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # include "libs/Parse.h"
21 /* Suppress definition of yyunput() and yyinput(), as we do not use it. */
33 str [^ = \t \n \( \) \< \> \} \{]+
34 gstr \{[^\{\}\n]*[\}\n]
47 ^{bl}+UseGettext { return USEGETTEXT; }
48 ^{bl}+WindowTitle { return WINDOWTITLE; }
49 ^{bl}+ChangeWindowTitle { return CHWINDOWTITLE; }
50 ^{bl}+ChangeWindowTitleFromArg { return CHWINDOWTITLEFARG; }
51 ^{bl}+WindowLocaleTitle { return WINDOWLOCALETITLE; }
52 ^{bl}+WindowSize { return WINDOWSIZE; }
53 ^{bl}+WindowPosition { return WINDOWPOSITION; }
54 ^{bl}+ForeColor { return FORECOLOR; }
55 ^{bl}+BackColor { return BACKCOLOR; }
56 ^{bl}+ShadowColor { return SHADCOLOR; }
57 ^{bl}+HilightColor { return LICOLOR; }
58 ^{bl}+Colorset { return COLORSET; }
59 ^{bl}+Widget { return OBJECT; }
60 ^{bl}+Property { return PROP; }
61 ^{bl}+Main { return MAIN; }
62 ^{bl}+End { return END; }
66 rest = GetNextToken(yytext, &tmp); /* skip Font */
67 GetNextToken(rest, &yylval.str); /* get the font */
73 ^{bl}+Type { return TYPE; }
74 ^{bl}+Size { return SIZE; }
75 ^{bl}+Position { return POSITION; }
76 ^{bl}+Value { return VALUE; }
77 ^{bl}+MinValue { return VALUEMIN; }
78 ^{bl}+MaxValue { return VALUEMAX; }
79 ^{bl}+Title { return TITLE; }
80 ^{bl}+LocaleTitle { return LOCALETITLE; }
81 ^{bl}+SwallowExec { return SWALLOWEXEC; }
82 ^{bl}+Icon { return ICON; }
83 ^{bl}+Flags { return FLAGS; }
84 Hidden { return HIDDEN; }
85 NoFocus { return NOFOCUS; }
86 NoReliefString { return NORELIEFSTRING; }
87 Center { return CENTER; }
89 Right { return RIGHT; }
91 ^{bl}+Do { return EXEC; }
92 ^{bl}+HideWidget { return HIDE; }
93 ^{bl}+ShowWidget { return SHOW; }
94 ^{bl}+ChangeValue { return CHVALUE; }
95 ^{bl}+ChangeMaxValue { return CHVALUEMAX; }
96 ^{bl}+ChangeMinValue { return CHVALUEMIN; }
97 GetTitle { return GETTITLE; }
98 GetValue { return GETVALUE; }
99 GetMinValue { return GETMINVALUE; }
100 GetMaxValue { return GETMAXVALUE; }
101 GetFore { return GETFORE; }
102 GetBack { return GETBACK; }
103 GetHilight { return GETHILIGHT; }
104 GetShadow { return GETSHADOW; }
105 GetOutput { return GETOUTPUT; }
106 NumToHex { return NUMTOHEX; }
107 HexToNum { return HEXTONUM; }
111 StrCopy { return STRCOPY; }
112 LaunchScript { return LAUNCHSCRIPT; }
113 GetScriptFather { return GETSCRIPTFATHER; }
114 ReceivFromScript { return RECEIVFROMSCRIPT; }
115 RemainderOfDiv { return REMAINDEROFDIV; }
116 GetTime { return GETTIME; }
117 GetScriptArgument { return GETSCRIPTARG; }
118 GetPid { return GETPID; }
119 SendMsgAndGet { return SENDMSGANDGET; }
120 Parse { return PARSE; }
121 LastString { return LASTSTRING; }
122 Gettext { return GETTEXT; }
123 ^{bl}+ChangePosition { return POSITION; }
124 ^{bl}+ChangeSize { return SIZE; }
125 ^{bl}+ChangeTitle { return TITLE; }
126 ^{bl}+ChangeLocaleTitle { return LOCALETITLE; }
127 ^{bl}+ChangeIcon { return ICON; }
128 ^{bl}+ChangeFont { return CHFONT; }
129 ^{bl}+ChangeForeColor { return CHFORECOLOR; }
130 ^{bl}+ChangeBackColor { return CHBACKCOLOR; }
131 ^{bl}+ChangeColorset { return CHCOLORSET; }
132 ^{bl}+Set { return SET; }
133 ^{bl}+SendSignal { return SENDSIGN; }
134 ^{bl}+Quit { return QUIT; }
135 ^{bl}+Init { return INIT; }
136 ^{bl}+PeriodicTasks { return PERIODICTASK; }
137 ^{bl}+QuitFunc { return QUITFUNC; }
138 ^{bl}+For { return FOR; }
139 ^{bl}+WarpPointer { return WARP; }
140 ^{bl}+WriteToFile { return WRITETOFILE; }
141 ^{bl}+SendToScript { return SENDTOSCRIPT; }
142 ^{bl}+SingleClic { return SINGLECLIC; }
143 ^{bl}+DoubleClic { return DOUBLECLIC; }
144 ^{bl}+Key { return KEY; }
147 ^{bl}+If { return IF; }
148 Then { return THEN; }
149 Else { return ELSE; }
151 {inf} { return INF; }
152 {infeq} { return INFEQ; }
153 {supeq} { return SUPEQ; }
154 {sup} { return SUP; }
155 {diff} { return DIFF; }
156 {equal} { return EQUAL; }
157 {get} { return GET; }
159 ^{bl}+While { return WHILE; }
160 ^{bl}+Case+[ \t]+message+[ \t]of { return CASE; }
161 ^{bl}+Begin { return BEG; }
163 [\(] { return BEGF; }
164 [\)] { return ENDF; }
167 {nb} { yylval.number=atoi(yytext);
172 yylval.str=(char*) safestrdup(yytext+1);
173 yylval.str[yyleng-1]='\0';
177 {gstr} { /* Str entre "" */
178 yylval.str=(char*) safestrdup(yytext+1);
179 yylval.str[yyleng-2]='\0';
183 {str} { yylval.str=(char*) safestrdup(yytext);
184 yylval.str[yyleng]='\0';