[Haskell-beginners] Parsing keywords

Mike Houghton mike_k_houghton at yahoo.co.uk
Sat Oct 3 09:12:20 UTC 2015


Hi,

What is the idiomatic way of parsing keywords, in a case agnostic fashion, for a ‘mini-language’?

For example I’m creating some structured text…

project{

     env{

     }

    setup{

   }

   run{

  }
}

that has ‘project’, ‘env’, ‘setup’ and ‘run’ as keywords and I want to parse in such a way that   ‘PROJECT’, ‘ProJect’ etc are all recognised as the keyword ‘project’ similarly for ‘env’ etc.

I’m using monadic rather than applicative parsing.


Many Thanks

Mike



More information about the Beginners mailing list