Skip to content

Latest commit

 

History

History

lark-examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Lark Examples

A bunch of examples written in the lark grammar format. Ideas pulled from various other papers which I have listed here as much as possible.

From mimid (Andreas Zeller work)

  • calc: basic calculator, no whitespace allowed, permissive on the zeroes
  • mathexpr: inspired from this repo
  • netrc: inspired from the spec here, minus macdef, because frankly, that's boring and requires me specifying too many characters(it's just macdef [your code here] NEWLINE). Also, it's order-dependent when it shouldn't be right now, (e.g. should be able to intersperse login and password)
  • json: as defined here. Again, I haven't enumerated all possible characters, so idk.

From GLADE

  • URI: Taken from the grammar in the RFC for URIs. Skips a few features (i.e. IP addresses in place of a host with DNS lookup); only allows a few protocols (http, https, etc); doesn't allow %HX specs of unicode characters.

From REINAM: