Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #666 > unrolled thread

Blog: Parsing command line parameters with Yacc & Flex

Started byJohann 'Myrkraverk' Oskarsson <myrkraverk@yahoo.com>
First post2012-06-05 17:12 +0000
Last post2012-06-06 10:43 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.compilers


Contents

  Blog: Parsing command line parameters with Yacc & Flex Johann 'Myrkraverk' Oskarsson <myrkraverk@yahoo.com> - 2012-06-05 17:12 +0000
    Re: Blog: Parsing command line parameters with Yacc & Flex Johann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com> - 2012-06-06 10:43 +0000

#666 — Blog: Parsing command line parameters with Yacc & Flex

FromJohann 'Myrkraverk' Oskarsson <myrkraverk@yahoo.com>
Date2012-06-05 17:12 +0000
SubjectBlog: Parsing command line parameters with Yacc & Flex
Message-ID<12-06-005@comp.compilers>
Hi all,

I wrote a blog tutorial about how to use yacc & (re)flex to parse
command line arguments.  Here is the blurb:

> Every once in a while someone comes along and asks how to parse
> command line parameters with Yacc & Flex. This is rather straight
> forward, but requires some knowledge of the generated code to get
> right.

> Here we present a source template that does this. The user only has to
> edit the grammar and scanning rules. Some knowledge of C, Yacc and
> Flex is assumed.
>
> The code is Boost licensed
>
> The template is written for Berkeley Yacc and the reflex variant of
> Flex. It may be made to work with GNU Bison and SourceForge Flex,
> possibly with a few changes.

I feel this tutorial is about 20 years too late, but no matter, it's
here now.  There are questions on stack exchange which might benefit
from a pointer to the blog entry.  Depending on the promptness of our
moderator, the blog entry may be referenced there by the time you're
reading this.

If you want to use this in a project and don't want to read and
understand the boost license, I can put up another WTFPL licensed
download.


--
  Have fun,

  Johann

[toc] | [next] | [standalone]


#667

FromJohann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com>
Date2012-06-06 10:43 +0000
Message-ID<12-06-006@comp.compilers>
In reply to#666
Sorry about the missing URL, it's below.

> I wrote a blog tutorial about how to use yacc & (re)flex to parse
> command line arguments.  Here is the blurb: ...
>
http://my.opera.com/myrkraverk/blog/2012/06/05/parsing-command-line-parameters-with-yacc-flex

If it becames mangled somehow it's easily enough retrievable at

  http://my.opera.com/myrkraverk/blog/

--
   Johann Oskarsson                http://www.2ndquadrant.com/    |[]
   PostgreSQL Development, 24x7 Support, Training and Services  --+--
                                                                  |
   Blog: http://my.opera.com/myrkraverk/blog/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.compilers


csiph-web