Re: [Parser-devel] [token.c] A new functionality
Status: Beta
Brought to you by:
jineshkj
From: Jinesh K J <jin...@gm...> - 2006-10-04 02:17:05
|
> Ok, I uploaded my first attempt, but I'm wondering whether the input > always has '[' and ']'? Can there be stuff outside the brackets? eg > @[group 1] hello@ -> @group 1@ If anything comes outside the box, let us ignore that. What do you say? Could there be a better way? Also, note that I've updated the test cases. I hope the assertion can be avoided and I've updated the test cases to include those cases. 116 char * getgroup(const char *string) 117 { 118 assert(string[0] == '['); > > I wish if we can just do an exit(-1), whenever such an error occurs. > > > I put that in, but isn't there any better way to signal errors? Yes ! This policy must be changed. But, let's keep it aside, since memory allocation is least likely to fail in Linux. We can clean this stuff as soon as we get our functionalities right. Regards, Jinesh. |