![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert a tab delimited/variable length file to fixed length file | Everton_Silveir | UNIX for Dummies Questions & Answers | 2 | 12-19-2008 06:21 PM |
| What the command to find out the record length of a fixed length file? | tranq01 | UNIX for Dummies Questions & Answers | 9 | 12-04-2008 04:04 PM |
| actions before parsing rules in lex n yacc | supritjain | High Level Programming | 0 | 11-26-2008 06:00 AM |
| creating a fixed length output from a variable length input | r1500 | Shell Programming and Scripting | 2 | 12-03-2003 01:09 PM |
| Validating fixed length field... | giannicello | UNIX for Dummies Questions & Answers | 12 | 05-22-2003 11:19 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to specify the token length in a yacc file?
sample input format <field1,data type ans,fixed length 6> followed by <field2,data type ans,fixed length 3> Example i/p and o/p Sample Input: "ab* d2 9o" O/p : "Field1 [ab* d2] Field2 [ 9o] " yacc/bison grammar: record : AlphaNumericSpecialOfLength6 AlphaNAumericSpecialOfLength3 /** not like record : FIELD1 FIELD2 { ....}; FIELD1 : ANS ANS ANS ANS ANS ANS; FIELD2 : ANS ANS ANS { ...} ; ***/ { printf("Field1 [%s] Field2 [%s] \n", $1 , $2); } How to define grammar for this in yacc/bison? |
| Bookmarks |
| Tags |
| bison, length, parsing, token, yacc |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|