Dec 05

Creating Your Own Generator Component for Spirit.Karma

By Hartmut Kaiser Karma Example Comments Off on Creating Your Own Generator Component for Spirit.Karma

In the good tradition of highlighting Spirits both major sub-libraries based on similar use cases I will talk about Karma today. In a previous installment (see Creating Your Own Parser Component for Spirit.Qi) I presented the steps needed to create a parser terminal. Our topic here is the creation of a new generator directive allowing to group output elements in columns.

See the full article here.

GD Star Rating
loading...
Tagged with:
Nov 27

Generate Escaped String Output Using Spirit.Karma

By Hartmut Kaiser Karma Example Comments Off on Generate Escaped String Output Using Spirit.Karma

This is another article in the series of “How To’s” providing you with shrink wrapped grammars directly usable in any project. I’m going to describe a Karma grammar you can use to generate output for quoted strings, where all contained special characters are properly escaped.

See full article here.

GD Star Rating
loading...
Tagged with:
Nov 18

Output Generation from a List of Key-Value Pairs Using Spirit.Karma

By Hartmut Kaiser Karma Example Comments Off on Output Generation from a List of Key-Value Pairs Using Spirit.Karma

Even if it feels a bit like cheating I decided to get back to the example highlighting lists of key/value pairs I initially wrote about here. On the other hand looking at this very same problem from the standpoint of generating output allows me to highlight a couple a interesting facilities Spirit provides you with.

See full article here.

GD Star Rating
loading...
Tagged with:
preload preload preload