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: Naming Conventions sidebar_label: Naming Conventions

String and Character

PHP doesn't have a separate type for strings and characters, as opposed to some languages where string is defined as a list of characters. Still, as a convention in Parsica and its documentation, we generally use 'a', '1' (single quoted) to indicate a single character, and "a", "abc123" (double quoted) to indicate a string.

We also use single quotes to indicate constant strings or symbols, such as 'STATUS_SUCCESS';

Predicates

Predicates are either prefixed with is or suffixed with pred.

<?php
$predicate = orPred(isEqual('5'), isEqual('6'));
assertTrue($predicate('6'));

Character Parsers

A parser for a single character is always suffixed with Char, as in digitChar(). These always output a string.

Case

Some parsers have case-insensitive versions. These are sufficed with 'I'.

<?php
$parser = stringI('hello world'); 
$result = $parser->tryString("hElLO WoRlD"); 
assertEquals("hElLO WoRlD", $result->output());
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
milesj/emojibase
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