From 85b81988facc919908d522bd5a7b9ff99cef8f2d Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Wed, 5 Sep 2018 17:19:53 -0300 Subject: Comment --- data/misc/700000items.gram | 12 +++++++----- data/misc/nimble.gram | 5 +++-- src/main/java/bjc/rgens/parser/RGrammarParser.java | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/data/misc/700000items.gram b/data/misc/700000items.gram index 77bb6e7..fda8c61 100755 --- a/data/misc/700000items.gram +++ b/data/misc/700000items.gram @@ -1,10 +1,12 @@ -[isaac-item-name] {@adjs:=[adj]} [act-isaac-item-name] +pragma grammar-name 70000items -[act-isaac-item-name] [noun] +[isaac-item-name] [noun] -pragma prefix-with [act-isaac-item-name] [post] -pragma prefix-with [act-isaac-item-name] <&1..2> [@adjs] -pragma prefix-with [act-isaac-item-name] [pre] +pragma autovivify-rule {@adjs:=[adj]} + +pragma prefix-with [isaac-item-name] [post] +pragma prefix-with [isaac-item-name] <&1..2> [@adjs] +pragma prefix-with [isaac-item-name] [pre] pragma suffix-with [isaac-item-name] [end] diff --git a/data/misc/nimble.gram b/data/misc/nimble.gram index dee0862..0362409 100755 --- a/data/misc/nimble.gram +++ b/data/misc/nimble.gram @@ -1,3 +1,5 @@ +pragma grammar-name nimblebimble + [bimble] <^4> bimble <^4> nimble dindle @@ -18,8 +20,7 @@ [nimble] [bimble] -[nimble-bimble] <^2> {empty} - [bimble] +[nimble-bimble] [bimble] pragma prefix-with [nimble-bimble] [nimble-plural] pragma suffix-with [nimble-bimble] [nimble-plural] diff --git a/src/main/java/bjc/rgens/parser/RGrammarParser.java b/src/main/java/bjc/rgens/parser/RGrammarParser.java index 3fe4886..4014baa 100755 --- a/src/main/java/bjc/rgens/parser/RGrammarParser.java +++ b/src/main/java/bjc/rgens/parser/RGrammarParser.java @@ -619,6 +619,23 @@ public class RGrammarParser { doChance = true; } else if (partToAdd.matches("\\<\\<\\>")) { + /* + * @NOTE + * + * One, am I even using this feature anywhere? + * As far as I can tell, this says to apply the + * current set of case part rules to the + * previous case part. This may be useful in + * certain cases, but none come to mind at the + * moment. + * + * @PERF + * + * For performance reasons, we may want to + * consider setting the chance/serial values as + * a setting on CaseElement, instead of having + * their own CaseElement type. + */ CaseElement elm = caseParts.popLast(); if(repCount == 0) { -- cgit v1.2.3