Skip to content

Commit

Permalink
test: failing test for issue #150
Browse files Browse the repository at this point in the history
  • Loading branch information
igordejanovic committed Jun 7, 2024
1 parent a64b3d3 commit de0de80
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './sub.pg' ;
main: sub.Rule+ ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import './base.pg' ;
main: base.main ;
terminals
base.sub.SEP: ',' ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Rule: ITEM+[SEP] ;
terminals
ITEM: /\w+/ ;
SEP: '.' ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from os.path import dirname, join

from parglare import GLRParser, Grammar


def test_import_plus_raises_keyerror():

this_folder = dirname(__file__)
grammar = Grammar.from_file(join(this_folder, 'base.pg'))
GLRParser(grammar)

grammar = Grammar.from_file(join(this_folder, 'overrider.pg'))
GLRParser(grammar)

0 comments on commit de0de80

Please sign in to comment.