From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Date: Mon, 27 Feb 2012 09:53:11 +0000 From: Mohanasundaram VIT Message-ID: <199d7d8a-c02f-4b21-bb9b-c9be189024bc@w27g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] Config File parsing Topicbox-Message-UUID: 64d87338-ead7-11e9-9d60-3106f5b1d025 global{ verb test rl0 rand (or) rand =0 [Two cases] } thread{ frac_value = (0.2,(0.1,0.5)) random_thread } OUTPUT should be this: If i give the above input to lex and yacc, based upon the checking of [ rand (or) rand=0 ] if it is "rand", then it should print as " verb test rl0 rand frac_value:L=0.1 frac_value:H=0.5" if it is "rand=0", then it should print as " verb test rl0 rand=0 frac_value=0.2". For this could someone please tell me how to write a lex and yacc program.