소스 검색

Examples: A few minor changes

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.12.0
Erez Sh 3 년 전
부모
커밋
7fdd59849b
3개의 변경된 파일23개의 추가작업 그리고 2356개의 파일을 삭제
  1. +3
    -0
      examples/advanced/create_ast.py
  2. +20
    -0
      examples/standalone/README.md
  3. +0
    -2356
      examples/standalone/json_parser.py

+ 3
- 0
examples/advanced/create_ast.py 파일 보기

@@ -1,4 +1,7 @@
"""
Creating an AST from the parse tree
===================================

This example demonstrates how to transform a parse-tree into an AST using `lark.ast_utils`.

create_transformer() collects every subclass of `Ast` subclass from the module,


+ 20
- 0
examples/standalone/README.md 파일 보기

@@ -0,0 +1,20 @@
# Standalone example
To initialize, cd to this folder, and run:
````bash
./create_standalone.sh
```
Or:
```bash
python -m lark.tools.standalone json.lark > json_parser.py
````
Then run using:
```bash
python json_parser_main.py <path-to.json>
```

+ 0
- 2356
examples/standalone/json_parser.py
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장