A common idiom for bash is is to use \ to escape the newline at the end of the line,
If a \ pair appears, and the backslash is not itself quoted, the \ is treated as a line continuation (that is, it is removed from the input…
I have the following Pest (https://pest.rs) grammar
name = {ASCII_ALPHA+}
fragment = { "fragment" ~ name }
When I try to parse fragment name using this I get this error:
--> 1:9
|
1 | fragment name
| ^---
|
= expected name
Right now I'm rewriting some unit tests to use Pest and noticed every test creates a new user. The tests need the id that creating the user returns. I would like to know if it is possible to put this in the beforeEach function Pest provides so I can…
Exim uses a really awkward comment syntax,
Blank lines in the file, and lines starting with a # character (ignoring leading white space) are treated as comments and are ignored. Note: A # character other than at the beginning of a line is not…
Pest.rs gives us a method of doing comments,
COMMENT - runs between rules and sub-rules
But if we're building a linter we may want the comments. Is there a way to have them saved on the tree?
Using pest parser I am trying to build a grammar that can recognize variable names, but I can't get the variables to end at the next space/non-alpha character. I tried using...
var_name = {!reserved ~ ASCII_ALPHA+} which works perfectly for…
Pest.rs provides different stack functions like PUSH. These seem to work for me, but I would like to know if there is a way to debug the stack operations? If things aren't going as planned, is there an easy way to trigger a debug operation such that…
I am writing a PEG file to be used in pest for our dsl. There is need where i need to parse a key value where value is a regex within triple quote. I am unable to write a pest rule for it.
The value is """Some regex here"""
Rule I defined is:
TQ =…
I'm using the pest crate to implement a recursive grammar in Rust:
id = _{ ASCII_ALPHA_LOWER ~ (ASCII_ALPHANUMERIC|"_")* }
integer = _{ (ASCII_NONZERO_DIGIT ~ ASCII_DIGIT*)|"0" }
real = _{ ((integer ~ "." ~ ASCII_DIGIT*) | (integer? ~ "." ~…
I'd like to write a PEG that matches filesystem paths. A path element is any character except / in posix linux.
There is an expression in PEG to match any character, but I cannot figure out how to match any character except one.
The peg parser I'm…
I am a complete novice in testing and I wanted to know if someone could guide me on what I'm doing wrong. I want to test the following function in my php laravel project:
public static function getFlatSupplierAddress($supplier_address_id): string
…
I need to do a check before launching the php artisan test command.
I need this because I currently have 2 databases for DEV, one local and one shared with my collaborators. I want to prevent the tests from running on the shared database.
I already…
I'm encountering a hurdle in parsing nested blocks.
Specifically, I would like to parse (a small, defined subset of) LaTeX, and I'm having an issue at properly parsing nested \begin{} and \end{} pairs:
\begin{document}
Some text.
\begin{quote}
A…
Recently I updated the Php version of my app, and now the tests are getting failed.
it is giving me the following error:
Declaration of Filament\Support\Components\ViewComponent::view(string $view): static must be compatible with…
I've got the following method in my controller:
public function assignCustomer(string $orderID) : JsonResponse
{
$customersID = \request()->get('customers_id');
try {
$order =…