FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/build0.sh at main · Python51888/lpython · GitHub
Python51888
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
build0.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (22 loc) · 972 Bytes
Breadcrumbs
lpython
/
build0.sh
Copy path
File metadata and controls
executable file
·
28 lines (22 loc) · 972 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!
/usr/bin/env bash
set
-e
set
-x
#
Generate the `version` file
ci/version.sh
#
Generate a Python AST from Python.asdl (Python)
python grammar/asdl_py.py
#
Generate a Python AST from Python.asdl (C++)
python src/libasr/asdl_cpp.py grammar/Python.asdl src/lpython/python_ast.h
#
Generate a Fortran ASR from ASR.asdl (C++)
python src/libasr/asdl_cpp.py src/libasr/ASR.asdl src/libasr/asr.h
#
Generate a wasm_visitor.h from src/libasr/wasm_instructions.txt (C++)
python src/libasr/wasm_instructions_visitor.py
#
Generate the tokenizer and parser
(cd src/lpython/parser
&&
re2c -W -b tokenizer.re -o tokenizer.cpp)
(cd src/lpython/parser
&&
bison -Wall -d -r all parser.yy)
python -c
"
file = 'src/lpython/parser/parser.tab.cc'
with open(file, 'r') as f: text = f.read()
with open(file, 'w') as f:
f.write('[[maybe_unused]] int yynerrs'.join(text.split('int yynerrs')))
"
grep -n
"
'
"
src/lpython/parser/parser.yy
&&
echo
"
Single quote not allowed
"
&&
exit
1
echo
"
OK
"
Back
|
FazBrowse Home
|
New Git URL