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.

19 lines
410 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. 'lark/grammars/common.lark',
  8. ]
  9. def test():
  10. for grammar_file in grammar_files:
  11. tree = parser.parse(open(grammar_file).read())
  12. print("All grammars parsed successfully")
  13. if __name__ == '__main__':
  14. test()