cost 89 ms
Rust Nom How to use ? in parsers

It's the first time I have used a parser combinator, so maybe I just have a misunderstanding about how I should use a parser combinator. I have the f ...

2023-01-14 05:52:49   1   44    rust / nom  
Extract substring between `\"` with nom

From input "\"Name 1\" something else" I want to extract "Name 1" and the remaining string as " something else". Notice the escaped \". My current so ...

2022-12-08 20:28:52   1   34    rust / nom  
Parse hex and decimal number

Just started to use the crate nom. Tried the simplest example: Additionally, if I include sign, things are getting more complicated: It looks li ...

2022-11-16 01:38:17   1   105    rust / nom  
How to write fallible nom parsers

If I want to write a nom parser that could fail internally, how do I propagate the error? As an example, something to parse a NaiveDate might look li ...

2022-04-24 01:42:18   1   279    rust / nom  
State with nom (>5) and `alt`

After trying some tree structures in Rust, I finally decided to built up a linearized tree, e.g. something like struct AST { exprs: Vec<Expr> ...

2022-01-12 17:47:02   1   31    rust / nom  
Parse allowing nested parentheses in nom

I'm using nom. I'd like to parse a string that's surrounded by parentheses, and allowing for additional nested parentheses within the string. So (a + ...

2022-01-08 07:54:09   1   65    rust / nom  
Read binary u32 using nom

I'm having a hard time finding any useful examples of how to use nom to parse a binary file, since it seems that the documentation is heavily biased t ...

2021-11-17 03:46:11   1   10    rust / nom  

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM