Questions tagged [pest]

Pest.rs is a parser in Rust that accepts PEG grammars

You can find more information on Pest.rs on their website.

50 questions
0
votes
1 answer

Pest errors in random tests, what to do?

I have about 90 tests written with Pest for my Laravel application. Most of the time all the tests pass but sometimes even if I don't make any change to the codebase i get an error. The error is the same but it occurs of different tests each time.…
Cata
  • 29
  • 4
0
votes
1 answer

In pest.rs, pest-ast crate, how do I derive an enum fields?

I have an example Pest grammar: WHITESPACE = _{ " " } identifier = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "_")* } int_literal = { DECIMAL_NUMBER+ } assignment_op = { ":=" } formula = { (identifier ~ assignment_op ~ int_literal) | int_literal…
Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91
0
votes
2 answers

PEG grammar to parse identifier name which is not a keyword

I am using Pest.rs for parsing. I need to parse identifiers but reject them if they happen to be a reserved keyword. For example, bat is a valid identifier name but this is not since that has a specific meaning. My simplified grammar is as…
AppleGrew
  • 9,302
  • 24
  • 80
  • 124
-2
votes
1 answer

Want to copy S.No (A1,A2,A3,A4.......) one by one from sheet "filter_data" to sheet "cheque print" , into Cell (Y22) using VBA

I have two Excel sheets with the name Filter data and Cheque Print on the same workbook, In the Filter Data, I have Cheque Serial Number in Column A2, A3, A4, A5...... and in the Cheque Print, Cheque Print format using VLOOKUP. I want to copy…
-4
votes
1 answer

Writing a small app using Rust, pest; how can I fix this error?

Have been doing a small project on Rust. My app must paint a graph of a linear expression that it has been given. The libraries I am using are pest and plotters. The issue is in the PEG grammar. Here are two versions (both don't work): 1. number =…
effrereal
  • 1
  • 1
1 2 3
4