Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-M
perl-MarpaX-ESLIF
perl-MarpaX-ESLIF.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-MarpaX-ESLIF.spec of Package perl-MarpaX-ESLIF
# # spec file for package perl-MarpaX-ESLIF # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name MarpaX-ESLIF Name: perl-MarpaX-ESLIF Version: 6.0.35.1 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: ESLIF is Extended ScanLess InterFace URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/J/JD/JDDPAUSE/%{cpan_name}-%{version}.tar.gz BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Archive::Tar) BuildRequires: perl(Config::AutoConf) BuildRequires: perl(Devel::GlobalDestruction) BuildRequires: perl(ExtUtils::CBuilder) >= 0.280224 BuildRequires: perl(File::Which) BuildRequires: perl(File::chdir) BuildRequires: perl(JSON::MaybeXS) >= 1.004000 BuildRequires: perl(Log::Any) BuildRequires: perl(Log::Any::Adapter) BuildRequires: perl(Perl::OSType) BuildRequires: perl(Probe::Perl) BuildRequires: perl(Safe::Isa) BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::Deep::NoTest) BuildRequires: perl(Test::More::UTF8) BuildRequires: perl(Try::Tiny) BuildRequires: perl(namespace::clean) BuildRequires: perl(parent) Requires: perl(Devel::GlobalDestruction) Requires: perl(JSON::MaybeXS) >= 1.004000 Requires: perl(namespace::clean) Requires: perl(parent) %{perl_requires} %description ESLIF is derived from perl's Marpa::R2, and has its own BNF, documented in MarpaX::ESLIF::BNF. The main features of this BNF are: * Embedded Lua language Actions can be writen directly in the grammar. * Regular expressions Matching supports natively regular expression using the at http://www.pcre.org/ library. * Streaming Native support of streaming input. * Sub-grammars The number of sub grammars is unlimited. Beginners might want to look at MarpaX::ESLIF::Introduction. In both cases, the output will be: ok 1 - '1' parse is ok ok 2 - '1' value is 1 ok 3 - '1/2' parse is ok ok 4 - '1/2' value is 0.5 -------------------------------------------- Recognizer progress (grammar level 0 (Grammar level 0)): [P1@0..0] exp ::= . exp[0] [P2@0..0] exp[0] ::= . exp[1] [P3@0..0] exp[1] ::= . exp[2] [P4@0..0] exp[2] ::= . exp[3] [P10@0..0] exp[3] ::= . /[\d]+/ [P11@0..0] exp[3] ::= . "(" [P11@0..0] exp[0] [P11@0..0] ")" [P13@0..0] exp[2] ::= . exp[3] [P13@0..0] Internal[5] [P13@0..0] exp[2] [P15@0..0] exp[1] ::= . exp[1] [P15@0..0] Internal[6] [P15@0..0] exp[2] [P17@0..0] exp[1] ::= . exp[1] [P17@0..0] Internal[7] [P17@0..0] exp[2] [P19@0..0] exp[0] ::= . exp[0] [P19@0..0] Internal[8] [P19@0..0] exp[1] [P21@0..0] exp[0] ::= . exp[0] [P21@0..0] Internal[9] [P21@0..0] exp[1] Expected symbol: /[\d]+/ (symbol No 7) Expected symbol: "(" (symbol No 8) <<<<<< FAILURE AT LINE No 1 COLUMN No 1, HERE: >>>>>> UTF-8 converted data after the failure (1 bytes) at 1:1: 0x000000: 78 x -------------------------------------------- ok 5 - 'x' parse is ko ok 6 - '(1*(2+3)/4**5)' parse is ok ok 7 - '(1*(2+3)/4**5)' value is 0.0048828125 1..7 MarpaX::ESLIF also provide native JSON encoder/decoder: use Log::Any qw/$log/, default_adapter => qw/Stdout/; use MarpaX::ESLIF; my $eslif = MarpaX::ESLIF->new($log); my $json = MarpaX::ESLIF::JSON->new($eslif); my $perl_hash = $json->encode({data => { 1 => [ 2, "3" ] } }); $log->infof('JSON Encoder: %s', $perl_hash); my $json_string = $json->decode($perl_hash); $log->infof('JSON decoder: %s', $json_string); # Output: # JSON Encoder: {"data":{"1":[2,"3"]}} # JSON decoder: {data => {1 => [2,3]}} %prep %autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README.txt %license LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor