#include "VRegExpr.hpp"#include "FSM.hpp"Go to the source code of this file.
Compounds | |
| struct | RegExprStackItem |
Defines | |
| #define | STACKITEM_REGEXPR 0 |
| #define | STACKITEM_OPENPARENC 1 |
| #define | STACKITEM_BINOPSTART 2 |
| #define | STACKITEM_SEQ 2 |
| #define | STACKITEM_MINUS 3 |
| #define | STACKITEM_ALT 4 |
| #define | STACKITEM_AND 5 |
Functions | |
| char | ConvertOpCode (unsigned long type) |
| void | ReduceAll (RegExprStackItem **stackptr) |
| void | HandleBinOp (RegExprStackItem **stackptr, unsigned opcode) |
| void | HandleRegExpr (RegExprStackItem **stackptr, VRegExpr *regexpr) |
| void | HandleUnaryOp (RegExprStackItem **stackptr, char opcode, char *curptr) |
| void | HandleOpenParenc (RegExprStackItem **stackptr) |
| void | HandleCloseParenc (RegExprStackItem **stackptr, char *curptr) |
Variables | |
| MemStreamer | tmpmem |
| MemStreamer | mainmem |
| MemStreamer * | vregexprmem |
| TLabelID | elementpoundlabelid |
| TLabelID | attribpoundlabelid |
| char * | vregexprerrptr |
| char * | vregexprerrstr |
|
|
Definition at line 252 of file VRegExpr.cpp. |
|
|
Definition at line 253 of file VRegExpr.cpp. |
|
|
Definition at line 249 of file VRegExpr.cpp. |
|
|
Definition at line 251 of file VRegExpr.cpp. |
|
|
Definition at line 248 of file VRegExpr.cpp. |
|
|
Definition at line 247 of file VRegExpr.cpp. |
|
|
Definition at line 250 of file VRegExpr.cpp. |
|
|
Definition at line 282 of file VRegExpr.cpp. Referenced by HandleBinOp(), and ReduceAll().
00283 {
00284 switch(type)
00285 {
00286 case STACKITEM_SEQ: return VP_ITEMTYPE_SEQ;
00287 case STACKITEM_MINUS:return VP_ITEMTYPE_MINUS;
00288 case STACKITEM_ALT: return VP_ITEMTYPE_ALT;
00289 case STACKITEM_AND: return VP_ITEMTYPE_AND;
00290 }
00291 return 0;
00292 }
|
|
||||||||||||
|
Definition at line 308 of file VRegExpr.cpp. Referenced by HandleOpenParenc(), and VRegExpr::ParseVRegExpr().
00309 {
00310 VRegExpr *regexpr;
00311
00312 if((*stackptr==NULL)||((*stackptr)->type!=STACKITEM_REGEXPR))
00313 {
00314 Error("Binary operation !!\n");
00315 Exit();
00316 }
00317
00318 while(((*stackptr)->prev!=NULL)&&
00319 ((*stackptr)->prev->type>=opcode))
00320 {
00321 regexpr=new VRegExpr(ConvertOpCode((*stackptr)->prev->type),
00322 (*stackptr)->prev->prev->regexpr,
00323 (*stackptr)->regexpr);
00324 *stackptr=new RegExprStackItem(regexpr,(*stackptr)->prev->prev->prev);
00325 }
00326 *stackptr=new RegExprStackItem(opcode,*stackptr);
00327 }
|
|
||||||||||||
|
Definition at line 361 of file VRegExpr.cpp. Referenced by VRegExpr::ParseVRegExpr().
00362 {
00363 ReduceAll(stackptr);
00364
00365 if(((*stackptr)->prev==NULL)||
00366 ((*stackptr)->prev->type!=STACKITEM_OPENPARENC))
00367 {
00368 Error("Unexpected closing bracket");
00369 Exit();
00370 }
00371 VRegExpr *regexpr=new VRegExpr(VP_ITEMTYPE_GROUP,(*stackptr)->regexpr,NULL);
00372
00373 *stackptr=new RegExprStackItem(regexpr,(*stackptr)->prev->prev);
00374 }
|
|
|
Definition at line 352 of file VRegExpr.cpp. Referenced by VRegExpr::ParseVRegExpr().
00353 {
00354 if((*stackptr!=NULL)&&
00355 ((*stackptr)->type==STACKITEM_REGEXPR))
00356 HandleBinOp(stackptr,STACKITEM_SEQ);
00357
00358 *stackptr=new RegExprStackItem(STACKITEM_OPENPARENC,*stackptr);
00359 }
|
|
||||||||||||
|
Definition at line 329 of file VRegExpr.cpp. Referenced by VRegExpr::ParseVRegExpr().
00331 {
00332 if((*stackptr!=NULL)&&
00333 ((*stackptr)->type==STACKITEM_REGEXPR))
00334 HandleBinOp(stackptr,STACKITEM_SEQ);
00335
00336 *stackptr=new RegExprStackItem(regexpr,*stackptr);
00337 }
|
|
||||||||||||||||
|
Definition at line 339 of file VRegExpr.cpp. Referenced by VRegExpr::ParseVRegExpr().
00340 {
00341 if((*stackptr==NULL)||
00342 ((*stackptr)->type!=STACKITEM_REGEXPR))
00343 {
00344 Error("Unexpected unary operator");
00345 Exit();
00346 }
00347
00348 VRegExpr *regexpr=new VRegExpr(opcode,(*stackptr)->regexpr);
00349 *stackptr=new RegExprStackItem(regexpr,(*stackptr)->prev);
00350 }
|
|
|
Definition at line 294 of file VRegExpr.cpp. Referenced by HandleCloseParenc(), and VRegExpr::ParseVRegExpr().
00295 {
00296 VRegExpr *regexpr;
00297
00298 while(((*stackptr)->prev!=NULL)&&
00299 ((*stackptr)->prev->type>=STACKITEM_BINOPSTART))
00300 {
00301 regexpr=new VRegExpr(ConvertOpCode((*stackptr)->prev->type),
00302 (*stackptr)->prev->prev->regexpr,
00303 (*stackptr)->regexpr);
00304 *stackptr=new RegExprStackItem(regexpr,(*stackptr)->prev->prev->prev);
00305 }
00306 }
|
|
|
Definition at line 10 of file VRegExpr.cpp. |
|
|
Definition at line 9 of file VRegExpr.cpp. |
|
|
Definition at line 5 of file VRegExpr.cpp. |
|
|
Definition at line 4 of file VRegExpr.cpp. |
|
|
Definition at line 205 of file VRegExpr.cpp. |
|
|
Definition at line 206 of file VRegExpr.cpp. |
|
|
Definition at line 7 of file VRegExpr.cpp. |
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001