initial (hacky af)
This commit is contained in:
13
examples/golike.py
Normal file
13
examples/golike.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import gll
|
||||
|
||||
ws = gll.many(gll.whitespace)
|
||||
|
||||
function = function
|
||||
|
||||
package_name = gll.seq(gll.skip(gll.string("package")), gl.skip(ws),
|
||||
gll.regex(".*$"), tag="package_name")
|
||||
|
||||
package = gll.seq(package_name, gll.many(function, tag="package_body"),
|
||||
tag="package")
|
||||
|
||||
parser = gll.all(package)
|
Reference in New Issue
Block a user