Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:35
    Nadrieril edited #416
  • 18:34
    Nadrieril edited #416
  • 18:34
    Nadrieril edited #416
  • 18:33
    Nadrieril opened #416
  • Sep 18 20:47
    Nadrieril commented #399
  • Sep 13 03:17
    bookmoons commented #415
  • Sep 13 03:15
    bookmoons commented #412
  • Sep 13 03:15
    bookmoons opened #415
  • Sep 12 15:26
    Visic closed #413
  • Sep 12 15:26
    Visic commented #413
  • Sep 11 22:10
    bookmoons commented #412
  • Sep 11 16:25
    dragostis commented #412
  • Sep 08 01:55
    CAD97 commented #414
  • Sep 05 16:54
    yodalee edited #414
  • Sep 05 16:43
    yodalee edited #414
  • Sep 05 16:43
    yodalee opened #414
  • Sep 02 08:36

    dragostis on master

    Revert pest_derive version bump. (compare)

  • Sep 02 08:33

    dragostis on v2.1.2-pest

    (compare)

  • Sep 02 08:30

    dragostis on v2.1.2-meta

    (compare)

  • Sep 02 08:29

    dragostis on v2.1.1-generator

    (compare)

Vincent Prouillet
@Keats
in the generated lexer I meant
Arvid E. Picciani
@aep
is there any example of a programming language in pest? i find it extremely difficult to work around the recursion restriction
Christopher Durham
@CAD97
@aep there's no general recursion restriction
The restriction is on specifically "left recursion" or "non-advancing recursion"
The big trick is that instead of parsing e.g. expr = expr binop expr | non_binary_expr in a traditional CFG specification manner, you line up your grammar more with how you'd write a parser: maybe_binary_expr = non_binary_expr {binop non_binary_expr}*
Dardan
@darddan
Hi, I'm having trouble writing a pest file for a python-like syntax. I am working on a language where higher indented (tabs only) expressions are children of the lower indented ones (first lower indented expression above from them).
I've tried stuff with using PUSH-POP but I'm not having any success. Has anyone done something similar? can you share some example code so I can look into it?
Caleb Winston
@calebwin
When text is parsed, Pest can automatically report errors - right?
Is there a way to report errors after the text is parsed?
SasakiSaki
@GalAster
How to define SOL(Start of Line), some expr must start in a new line
Tesla Ice Zhang‮
@ice1000
mental
@mental32
Is it possible to not match against a rule? for instance "some" ~ NOT(ASCII_DIGIT+) ~ ("thing" | "one") to match something or someone but not some1
Laurent Wandrebeck
@lwandrebeck
@mental32 : not is ! with pest
mental
@mental32
@lwandrebeck Thanks!
mental
@mental32
Is it possible to conditionally silence rules?
for example rule's a and b require that rule c matches too but I want to silence c when matching a but I not in b
Tesla Ice Zhang‮
@ice1000
You can ignore the .next()'s return value conditionally
mental
@mental32
yeah I ended up doing just that, thanks :)
mental
@mental32
@ice1000 does pest support stream parsing?
rbenua
@rbenua
Hi there, I'm seeing this strange message when trying to use the & behavior: https://pest.rs/?bin=1bsukd#editor
Is this a pest bug or just a confusing error message?
(and, if i'm doing it wrong, what would be the standard way to exclude a list of specified keywords from the space of identifiers? I feel like that must be a pretty common thing to have to do)
mental
@mental32
@rbenua I use this trick https://pest.rs/?bin=slfd1#editor
have a rule that matches all identifiers without discrimination, then just pair it as !keyword ~ raw_ident
If you want to allow identifiers to resemble keywords see True being a keyword and True_ being a valid identifier then filter a valid keyword by excluding any matches that are followed by another rule such as ASCII_ALPHA | "_"
you may want to silence the raw_ident rule in that example
Vincent Prouillet
@Keats
Has anyone got an idea on where the issue in pest-parser/pest#402 could be? Is there a way to output a generated parser as a valid Rust file?
Dragoș Tiselice
@dragostis
It probably has something to r
Dragoș Tiselice
@dragostis
... with a rule that recurses a lot. I'll try to a better look when I get the chance. You can try to debug this with the debugger branch on pest.
Vincent Prouillet
@Keats
I'm going on holiday very soon, I'll have a look when I get back
I might have time to create a testcase at least though, where should it be?
Y0hy0h
@Y0hy0h
Hi! I have written a grammar for the R language and while testing it with a real world code file, I noticed that nested if statements make the parser run noticably slow. I'm not surprised that this happens, it feels like exponential complexity growth, but I was wondering whether I could do some improvements to my grammar. I've no previous experience with parsers nor PEGs.
If you'd like to have a look, I've created a bin at https://pest.rs/?bin=10fbo7#editor. You can copy and paste more while (TRUE) to the end of the file to get a feel for when it starts to become slow. (It takes a lot of nestings! :) )
By the way, pest is pretty awesome, no performance issues whatsoever except for this excessive nesting! Really cool!
Christopher Durham
@CAD97
>.> I got all excited because the pest-parser org has Actions but I still don't have access for my normal account >.>
Christopher Durham
@CAD97
image.png
Finally
Vincent Prouillet
@Keats
@dragostis where should I add a testcase for the timeout issue?
Tesla Ice Zhang‮
@ice1000
I noticed pest has got few updates lately
Andrey Cherkashin
@andoriyu
can someone help me with this: https://pest.rs/?bin=1d8kor#editor
it's matching 2 lines, but not 3
nvm missing '%' in my rules
amazing
Laurent Wandrebeck
@lwandrebeck
@andoriyu : would you be working on stratis or something ?
Martins Talbergs
@talbergs
I see no docs for PEEK_ALL and other.. hard to scape information out from issues
Nam Jeonghyun
@cr0sh
Hi. I'm trying to fix #407 on my own, but some tests(75 out of 450) fails with initial clone setup. But travis seems good with latest commit. Did I do something wrong?
I did git clone github.com/pest-parser/pest --recursive, cargo bootstrap, cargo test with stable-x86_64-pc-windows-gnu toolchain.
Laurent Wandrebeck
@lwandrebeck
@talbergs : indeed. could you list items with missing doc and open an issue please ?
@cr0sh : trying here, will tell you asap if it fails the same way (linux)
@cr0sh : worked like a charm here, just a couple tests ignored, no fail.
Laurent Wandrebeck
@lwandrebeck
@CAD97 : I’ve just done the into_span -> as_span cleanup (I saw your branch too late…). Everything looks fine from a cargo test POV, are you to commit that one soon ?
Nam Jeonghyun
@cr0sh
@lwandrebeck Oh, I was running cargo test on workspace. Inside pest crate it worked without any errors(is it a bug or usual behavior of cargo? I'm such a rust newbie xD). Thanks!