This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 rivejä
554 B

  1. from lark import Lark
  2. parser = Lark(open('examples/lark.lark'), parser="lalr")
  3. grammar_files = [
  4. 'examples/python2.lark',
  5. 'examples/python3.lark',
  6. 'examples/lark.lark',
  7. 'examples/relative-imports/multiples.lark',
  8. 'examples/relative-imports/multiple2.lark',
  9. 'examples/relative-imports/multiple3.lark',
  10. 'lark/grammars/common.lark',
  11. ]
  12. def test():
  13. for grammar_file in grammar_files:
  14. tree = parser.parse(open(grammar_file).read())
  15. print("All grammars parsed successfully")
  16. if __name__ == '__main__':
  17. test()