Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Parsica Laravel Package

parsica-php/parsica

Parsica is a PHP parser combinator library for building custom parsers from small reusable pieces. Compose complex grammars with a fluent API, parse strings into structured results, and handle errors cleanly—ideal for DSLs, config formats, and language tooling.

View on GitHub
Deep Wiki
Context7

title: Installation & Requirements

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

<Tabs defaultValue="cli" values={[ { label: 'Command line', value: 'cli', }, { label: 'composer.json', value: 'composer', }, ] }> <TabItem value="cli">

composer require parsica-php/parsica
"require": {
    "parsica-php/parsica": "dev-main"
}

Requirements

(@TODO: add polyfill for mbstring).

Usage

In a .php file, make sure the Composer autoloader is included:

require_once __DIR__.'/../vendor/autoload.php';

Import parsers and combinators:

use function Parsica\Parsica\char;

You can combine multiple imports in one statement:

use function Parsica\Parsica\{between, char, atLeastOne, alphaChar};

Finally, add some code:

<?php
$parser = between(char('{'), char('}'), atLeastOne(alphaChar()));
$result = $parser->tryString("{Hello}");
echo $result->output();
// outputs "Hello"
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4