This is a discussion on Struck with this Task within the C and C++ forums, part of the Programming Talk category; I have working knowledge in C and now I have read some concepts of compiler design and I am trying ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Struck with this Task
I have working knowledge in C and now I have read some concepts of compiler design and I am trying to implement the basics of these in my C program. I am struck with the task of breaking the given string into token for further analyzing them in parser. Can anyone suggest me a method for accomplishing this task?
|
|
|||
|
Suppose you want to break the string every 2 bits and make it as tokens you can use the below code to do the same.
char a[20]; int l; while((l = fread(a,2,f)) > 0) display(buf,l); By using the above code you can break the given string into token for further analyzing them in parser. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Struck Abstract with Abstract Class | priyaraji | C and C++ | 2 | 05-01-2007 10:04 AM |
| Task Oriented Programming | Thusitha | Software Patterns | 4 | 01-09-2005 12:13 PM |
| Comp.Sys.Acorn.FAQ part 1 of 4 | Paul Vigay | Tech FAQ | 0 | 05-31-2004 09:00 PM |
| Comp.Sys.Acorn.FAQ part 1 of 4 | Paul Vigay | Tech FAQ | 0 | 04-30-2004 09:00 PM |