Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPEEK[start..end] #334
Conversation
| Rule::quote, | ||
| Rule::single_quote | ||
| ], | ||
| positives: vec![Rule::term], |
This comment has been minimized.
This comment has been minimized.
flying-sheep
Nov 6, 2018
Contributor
no idea why I had to change this. is this a bug on master or did my added rule really change something?
This comment has been minimized.
This comment has been minimized.
dragostis
Nov 8, 2018
Collaborator
This may be a bug. I can take a closer look at it. It's weird that this particular example shouldn't be influenced by the changes you've made.
This comment has been minimized.
This comment has been minimized.
dragostis
Nov 17, 2018
Collaborator
I'll take a jab at this right now to see exactly what's going on.
This comment has been minimized.
This comment has been minimized.
pest/src/parser_state.rs Outdated
pest/src/parser_state.rs Outdated
flying-sheep
referenced this pull request
Nov 8, 2018
Open
Unclear completeness of RST implementation #4
meta/src/grammar.pest Outdated
| Rule::quote, | ||
| Rule::single_quote | ||
| ], | ||
| positives: vec![Rule::term], |
This comment has been minimized.
This comment has been minimized.
dragostis
Nov 8, 2018
Collaborator
This may be a bug. I can take a closer look at it. It's weird that this particular example shouldn't be influenced by the changes you've made.
pest/src/stack.rs Outdated
meta/src/parser.rs Outdated
pest/src/parser_state.rs Outdated
flying-sheep
force-pushed the
flying-sheep:peek-slice
branch
from
f123d3a
to
2d5e03b
Nov 9, 2018
This comment has been minimized.
This comment has been minimized.
|
OK, one problem: Compiling pest_grammars v2.0.0 (/home/phil/Dev/Rust/pest/grammars)
error[E0433]: failed to resolve. Use of undeclared type or module `state`
--> derive/tests/grammar.rs:15:10
|
15 | #[derive(Parser)]
| ^^^^^^ Use of undeclared type or module `state`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
error: Could not compile `pest_derive`.I don’t know what I did differently than the other generator code. What did I miss? |
generator/src/generator.rs Outdated
generator/src/generator.rs Outdated
This comment has been minimized.
This comment has been minimized.
|
oh, whoops! thank you! I also fixed the next problem: Compiling pest_derive v2.0.1 (/home/phil/Dev/Rust/pest/derive)
error[E0308]: mismatched types
--> derive/tests/grammar.rs:15:10
|
15 | #[derive(Parser)]
| ^^^^^^
| |
| expected enum `std::option::Option`, found i32
| help: try using a variant of the expected type: `Some(-2i32)`
|
= note: expected type `std::option::Option<i32>`
found type `i32`the problem was that I fixed it as described in dtolnay/quote#20 |
vm/tests/grammar.rs Outdated
flying-sheep
changed the title
PEEK[start..end] (work in progress)
PEEK[start..end]
Nov 9, 2018
flying-sheep
referenced this pull request
Nov 15, 2018
Open
Bug: Non-matching rule changes parsing result #338
dragostis
requested changes
Nov 17, 2018
This is pretty close. I'll take a look at the error reporting issue right now and let you know as soon as I figure it out.
derive/src/lib.rs Outdated
meta/src/ast.rs Outdated
meta/src/grammar.pest Outdated
| Rule::quote, | ||
| Rule::single_quote | ||
| ], | ||
| positives: vec![Rule::term], |
This comment has been minimized.
This comment has been minimized.
dragostis
Nov 17, 2018
Collaborator
I'll take a jab at this right now to see exactly what's going on.
| pub fn stack_match_peek_slice(mut self: Box<Self>, start: i32, end: Option<i32>, match_dir: MatchDir) -> ParseResult<Box<Self>> { | ||
| let range = match constrain_idxs(start, end, self.stack.len()) { | ||
| Some(r) => r, | ||
| None => return Err(self), |
This comment has been minimized.
This comment has been minimized.
dragostis
Nov 17, 2018
Collaborator
Should being out-of-range be considered a hard error or a match fail? Currently, POP-ing on an empty stack causes a panic, but I feel like this approach is probably more expressive, if more error-prone.
pest/src/parser_state.rs Outdated
pest/src/stack.rs Outdated
pest/src/stack.rs Outdated
This comment has been minimized.
This comment has been minimized.
|
Also, brackets should be added in |
flying-sheep
force-pushed the
flying-sheep:peek-slice
branch
2 times, most recently
from
4307654
to
ec331e9
Nov 17, 2018
This comment has been minimized.
This comment has been minimized.
|
i added the brackets, all done! |
flying-sheep
force-pushed the
flying-sheep:peek-slice
branch
from
d28442b
to
74be17d
Nov 17, 2018
This comment has been minimized.
This comment has been minimized.
|
bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
bors r+ |
This comment has been minimized.
This comment has been minimized.
Merge conflict |
flying-sheep
added some commits
Nov 6, 2018
flying-sheep
and others
added some commits
Nov 9, 2018
flying-sheep
force-pushed the
flying-sheep:peek-slice
branch
from
a5c6f6e
to
9a63e1b
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
|
bors r+ |
bot
added a commit
that referenced
this pull request
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
Build succeeded |
bors
bot
merged commit 7bf4ed6
into
pest-parser:master
Nov 19, 2018
flying-sheep
deleted the
flying-sheep:peek-slice
branch
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Yay 🥳 Too bad it wasn't a squash merge, that's some messy series of commits |
flying-sheep commentedNov 6, 2018
•
edited
fixes #329