9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Config File parsing
@ 2012-02-27 13:23 arnold
  2012-02-28  4:03 ` Nick LaForge
  0 siblings, 1 reply; 8+ messages in thread
From: arnold @ 2012-02-27 13:23 UTC (permalink / raw)
  To: 9fans

O'Reilly's "lex & yacc" is somewhat more user-friendly a reference than
the dragon book, although the latter certainly has its value. :-)

Arnold



^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <199d7d8a-c02f-4b21-bb9b-c9be189024bc@w27g2000yqm.googlegroups.co>]
* [9fans] Config File parsing
@ 2012-02-27  9:53 Mohanasundaram VIT
  0 siblings, 0 replies; 8+ messages in thread
From: Mohanasundaram VIT @ 2012-02-27  9:53 UTC (permalink / raw)
  To: 9fans

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-28 16:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 13:23 [9fans] Config File parsing arnold
2012-02-28  4:03 ` Nick LaForge
2012-02-28 14:57   ` Aram Hăvărneanu
2012-02-28 16:46   ` Bakul Shah
2012-02-28 16:57     ` erik quanstrom
     [not found] <199d7d8a-c02f-4b21-bb9b-c9be189024bc@w27g2000yqm.googlegroups.co>
2012-02-27 13:18 ` erik quanstrom
2012-02-27 14:06   ` Jack Norton
  -- strict thread matches above, loose matches on Subject: below --
2012-02-27  9:53 Mohanasundaram VIT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).