buck-yeh / parsergen Goto Github PK
View Code? Open in Web Editor NEWSelf-hosted parser/scanner generator from LR grammar with semantic annotations in C++20
License: MIT License
Self-hosted parser/scanner generator from LR grammar with semantic annotations in C++20
License: MIT License
> ./docker_build
Sending build context to Docker daemon 33.28MB
Step 1/10 : FROM archlinux/archlinux
---> 3f4d16de804d
Step 2/10 : USER root
---> Using cache
---> 3d18db5381bf
Step 3/10 : RUN echo $'Server = http://archlinux.cs.nctu.edu.tw/$repo/os/$arch\nServer = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch\n' | tee /etc/pacman.d/mirrorlist && if [[ -n "$PACDAY" ]]; then sed -Ei "s|^Include\s*=.+$|SigLevel = PackageRequired\nServer=https://archive.archlinux.org/repos/$PACDAY/\$repo/os/\$arch|g" /etc/pacman.conf ; fi && sed -Ei 's|^#TotalDownload\s*$|TotalDownload|g' /etc/pacman.conf && sed -Ei 's|^#VerbosePkgLists\s*$|VerbosePkgLists|g' /etc/pacman.conf && pacman -Sy --needed --noconfirm cmake make gcc git binutils fmt fakeroot sed gawk && rm -rf /root/.cache
---> Using cache
---> d6293db64c75
Step 4/10 : RUN useradd -m guest
---> Using cache
---> affcccdf0354
Step 5/10 : USER guest
---> Using cache
---> 067bea616d71
Step 6/10 : RUN echo $'PS1=\"\\[\\033[01;37m\\]\\D{%m/%d %H:%M:%S} \\[\\033[01;32m\\]\\u@\\h\[\\033[00m\\]:\\[\\033[01;43m\\]\\w\\[\\033[00m\\] \"\nalias ll=\'ls -lF --color=auto --time-style=\"+%y/%m/%d %H:%M:%S\"\'\nexport LANG=en_US.UTF-8\nlocale-gen\n' >> ~/.bashrc
---> Using cache
---> 5a60055674c8
Step 7/10 : COPY --chown=guest:guest PKGBUILD /home/guest/Duty/
---> 0d62b18b0df2
Step 8/10 : RUN cd ~/Duty && makepkg -s
---> Running in ea24e73afc5c
==> WARNING: Cannot find the sudo binary. Will use su to acquire root privileges.
==> Making package: parsergen 1.7.2-1 (Fri 03 Jun 2022 06:20:27 AM UTC)
==> Checking runtime dependencies...
warning: config file /etc/pacman.conf, line 34: directive 'TotalDownload' in section 'options' not recognized.
==> Checking buildtime dependencies...
warning: config file /etc/pacman.conf, line 34: directive 'TotalDownload' in section 'options' not recognized.
==> Retrieving sources...
==> Extracting sources...
==> Starting prepare()...
git: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by git)
==> ERROR: A failure occurred in prepare().
Aborting...
Removing intermediate container ea24e73afc5c
The command '/bin/sh -c cd ~/Duty && makepkg -s' returned a non-zero code: 4
[ 42% 21/38] : && /usr/local/bin/g++10 -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -Wall -Wextra -Wshadow -Wconversion -Ofast -std=c++20 -Wno-shadow -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 ParserGen/CMakeFiles/grammarstrip.dir/GrammarStrip.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/BNFContext.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Parser.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParseFile.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParserGenBase.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Scanner.cpp.o -o ParserGen/grammarstrip -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -Wl,-rpath,/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src:/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -lbracketPairing -lbux -lfmt -lstdc++ && :
FAILED: ParserGen/grammarstrip
: && /usr/local/bin/g++10 -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -Wall -Wextra -Wshadow -Wconversion -Ofast -std=c++20 -Wno-shadow -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 ParserGen/CMakeFiles/grammarstrip.dir/GrammarStrip.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/BNFContext.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Parser.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParseFile.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParserGenBase.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Scanner.cpp.o -o ParserGen/grammarstrip -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -Wl,-rpath,/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src:/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -lbracketPairing -lbux -lfmt -lstdc++ && :
/usr/local/bin/ld: cannot find -lbracketPairing
/usr/local/bin/ld: cannot find -lbux
collect2: error: ld returned 1 exit status
$Error grammar rules to tip:
If the answer is negative ? Whichever else can ?
For instance, I want to represent library dependencies like:
libfmt.a => libBux.a => libjson.a
libfmt.a => libBux.a => libbracketPairing.a => parsergen scannergen grammarstrip
libfmt.a => libBux.a => parsergen / scannergen generated code
$Id = <RegExpr>
$Id = <RegExpr> >> <LexExpr>
$Id = <RegExpr> >> <LexExpr> @ <Integer>
$Id = <RegExpr> >> <LexExpr> @ if <LexExpr>
$Id = <RegExpr> >> <LexExpr> @ <Integer> if <LexExpr>
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/BNFContext.cpp:1:
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/BNFContext.h:5:
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/Logger.h:3:
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:44:31: error: expected concept name with optional arguments
{ holder.stream() }-> std::convertible_to<std::ostream*>;
^
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:152:15: error: no template named 'derived_from' in namespace 'std'
template<std::derived_from<std::ostream> T_Sink>
~~~~~^
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:153:26: error: template argument for template type parameter must be a type
struct C_AutoSinkHolderT<T_Sink>
^~~~~~
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:98:16: note: template parameter is declared here
template<class C_LogImpl>
^
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:189:15: error: no template named 'derived_from' in namespace 'std'
template<std::derived_from<I_SnapT<std::ostream*>> T_Sink>
~~~~~^
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:190:26: error: template argument for template type parameter must be a type
struct C_AutoSinkHolderT<T_Sink>
^~~~~~
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/SyncLog.h:98:16: note: template parameter is declared here
template<class C_LogImpl>
^
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/BNFContext.cpp:3:
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/include/bux/FsUtil.h:4:10: fatal error: 'ranges' file not found
#include <ranges> // std::ranges::forward_range<>
^~~~~~~~
6 errors generated.
clang-12
FreeBSD 13
#pragma once
-y
to say yes to all overwrites upon outputting of both parsergen
& scannergen
#pragma once
. There is no way to turn this off until some use cases are observed.Build fails:
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/Parser.cpp:5:
In file included from /disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/ParseFile.h:3:
/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/Parser.h:6:10: fatal error: 'bux/LR1.h' file not found
#include <bux/LR1.h>
^~~~~~~~~~~
Creteria: Uploadable to AUR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.