aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr/grammar.lalrpop
AgeCommit message (Collapse)Author
2021-11-17Implement -gamemodeDaniel Schadt
-gamemode is a more general version of -raid/-fractal/...
2021-11-17Add a game-mode filterDaniel Schadt
2021-11-12Minor code smell fixesDaniel
2020-10-04update to newest evtclibDaniel
There's a good chance that this will be evtclib 0.5, so we want to adapt our API usage (mainly replacing evtclib::Boss with evtclib::Encounter). The naming is a bit all over the place now, as we sometimes refer to bosses and sometimes to encounters, but I hope to make a sensible decision at *some point* about what we're actually doing here.
2020-06-12implement -after/-before in terms of -timeDaniel
It makes sense to unify this implementation to avoid code duplication and bugs that might be hidden. -after and -before can stay for now, as shortcuts for -time < and -time >, the same way we have other shortcuts as well.
2020-06-12add a count(player) to count all playersDaniel
2020-06-12implement count(player: ...) constructDaniel
2020-06-12allow durations with minutes as wellDaniel
This allows things like "2m 50s" but also "5m". humantime would allow even more, but we need a regular expression to catch them for lalrpop, so for now this are the only two supported formats (together with "50s"). Considering the usual time of fights in GW2, I doubt we'll need anything bigger than minutes.
2020-06-12initial work on comparison based filtersDaniel
This enables filters such as -time > 2020-01-01 -time < 2020-02-03 ... for time and duration, and later possibly also for more things (such as a COUNT(...) construct). This work tries to integrate them into the existing filter system as seamless as possible, by providing a Comparator which implements LogFilter. The "type checking" is done at parse time, so nonsensical comparisons like -time > 12s flat out give a parse error. This however might be changed to a more dynamic system with run-time type checking, in which case we could do away with the type parameter on Producer and simply work with a generic Value. The comparator would then return an error if two non-identical types would be compared. Note that the system does not support arithmetic expressions, only simple comparisons to constant values.
2020-05-13clean up SearchField related codeDaniel
With the addition of our own parser, we no longer need the FromStr implementation for SearchField. Furthermore, it is now only used in player::NameFilter, so the definition has been moved there. The import in the grammar was unused as well, so it has been removed.
2020-05-12make regular expressions case-insensitiveDaniel
Most users probably don't need the capitalization, and character names always have a predefined capitalization anyway.
2020-05-12add a -cm filterDaniel
2020-05-04add -class player filterDaniel
2020-05-04exclude : from words againDaniel
This causes issues with the player: prefix used in any() and all() constructs, as player: will now be parsed as a word instead of the proper token. For now, : is disallowed in words again until there is a better solution.
2020-05-04Add a -log-before & -log-after predicateDaniel
With the file name heuristic for -before and -after in place, we might want a way for the user to disable it. For now, we simply do this by providing a new set of predicates without the filter. In the future, we might have a --disable-heuristics switch to disable the heuristics, in case we ever add more.
2020-05-01improve requoting heuristicDaniel
First of all, this allows : to be part of a word. This has been added because the account names start with a colon, so -player :Dunje should work. Furthermore, the re-quoting now also quotes strings that contain a .+*, as those are characters usually used in regular expressions. A command line like raidgrep -- -player "G.dric" should work, so we either have to re-quote words with a dot, or allow the dot to be part of a (lexical) word as well. For now, we're re-quoting it, but if it turns out to be too troublesome, we might change that.
2020-05-01change LogFilter to take EarlyLogResultDaniel
This allows us to attach some additional metadata that is not found in the PartialEvtc otherwise, such as the file name.
2020-05-01fix timestamp handlingDaniel
As it turns out, the "local timestamp" as advertised by arcdps is a bit misleading, because the timestamp is still in UTC. The "local" refers to the fact that it can lag behind the server timestamp a bit (but usually they seem to be within +-1 of each other), not that the timestamp is in the local timezone. This makes date handling a bit harder for raidgrep, but thanks to chrono, not by much. The idea is that we simply deal with Utc pretty much everywhere, except at the user boundary. This means that 1. Input timestamps for -before and -after are converted to Utc right after input 2. When outputting, we convert to a local timestamp first This makes the output consistent with the filenames now (and the "wall time" that the player saw).
2020-04-29allow quoted strings as boss namesDaniel
With evtclib 0.2, every boss has at least one name without space, so every boss can be used. Still, for completeness's and consistency's sake, we want to allow users to also specify boss names with spaces in them. For example, if we print "Qadim the Peerless" as the name of the boss, we might expect raidgrep -- -boss "Qadim the Peerless" to work (instead of -boss qadimp). Therefore, we now allow boss names to be quoted, so that we can properly persist the whitespace.
2020-04-29update evtclib to 0.2.0Daniel
2020-04-25add -include and -excludeDaniel
2020-04-25use free functions instead of Filter::newDaniel
Having a ::new on each of the filter types was a bit weird, especially because we returned Box<dyn ...> instead of Self (and clippy rightfully complained). With this patch, we now have a bunch of normal functions, and we don't show to the outside how a filter is actually implemented (or what struct is behind it).
2020-04-21grammar: fix precendence rulesDaniel
If we don't allow the higher-tier on the left side, we cannot chain multiple or/and on the same level. Since or is associative, we shouldn't expect the user to write (... or (... or ...)) and instead provide the flattened version as well.
2020-04-21add "or" and "and" to the list of tokensDaniel
Otherwise they'd get tokenized as word and we couldn't build conjunctions/disjunctions.
2020-04-21better error outputsDaniel
2020-04-20Add -player as a shortcut to search player namesDaniel
2020-04-18first version of the new filter pipelineDaniel