-
When running this example:
```
grammar = """
start: ab_ b_ a_ | a_ bb_ a_
a_: "a"
b_: "b"
ab_: "ab"
bb_: "bb"
"""
l = Lark(grammar, parser='earley', ambiguity='explicit', lexer='standard')
…
uriva updated
6 years ago
-
I have a regex rule in my grammar that looks like this (modified from the python sample):
`comment: /\/\/[^\n]*/`
Which matches fine when a comment does NOT have a trailing space, like this:
…
-
I tested the first example on the site (CSS color), but the parser ignores the "(" in the code.
Eg. something like `earley-test -i "rgb(2,2,2)" csscolor.js` returns:
`Error: invalid syntax at line 1…
-
I'm getting some results that I didn't expect, so maybe my expectations are wrong.
```
template_parser = lark.Lark("""
expr : (varref | literal)+
varref.5 : "${" VARNAME "}"
literal.1 : L…
-
parser=Lark(open("python2.g.txt").read())
fails with
Traceback (most recent call last):
File "D:/Users/502744471/Desktop/Projects/GEPyPlot/code/GMC_parser.py", line 53, in
parser=Lark(…
-
When running this code:
```
grammar = """
expression: "c" | "d" | "c" "d"
unit: expression "a"
| "a" expression
| "b" unit
| "b" expression
start: unit*
%import common.WS
%ig…
uriva updated
6 years ago
-
I defined a simple grammar like this:
start: policy
policy: OPERATION APP
OPERATION: "Y" | "X"
APP: "any"
Sample input: X any
it gives me the following error:
…
-
Running the following [lambda calculus](http://www.cis.upenn.edu/~bcpierce/sf/current/Stlc.html) parser on Python 3.6 exhibits non-determistic behaviour. That is, the exact same code run multiple time…
-
After performing `Transformer`, the position information in `Token` is lost.
It would be convenient to have the information also in `Tree`.
BTW, adding an API that return the original text of a `T…
-
We are seeing a 'Critical dependency' warning being logged in console when building the app (i.e. react, angular..). We should resolve this in some way or use different html parser that works in all e…