> I repro this with Ctrl+R. Sometimes the hotkey doesn't seem to he wired up. Activating the code pane fixes it though. I think the fix would be to explicitly activate a code pane on startup... after making sure there's one to activate (IIRC hotkeys wire up when a code pane is activated).

> I repro this with Ctrl+R. Sometimes the hotkey doesn't seem to be wired up. Activating the code pane fixes it though. I think the fix would be to explicitly activate a code pane on startup... after making sure there's one to activate (IIRC hotkeys wire up when a code pane is activated).

@Duga IDK if this is related but I think it bears noting that I noticed weird behavior when selecting code and running Extract Method. If I drag from right to left, it won't be enabled. Select the same block by dragging from left to right, it's enabled.

Duck check: In VBIDE.CodeModule there is the property ProcCountLines. Its second parameter is ProcKind As vbext_ProcKind is just designating what the procedure is? Whether it's a (Get, Set, Let)er or a procedure.

Using a technique described in this StackOverflow answer by @David Murdoch I created a custom class with methods to speed up Excel (Activate turns off screen updates and set the calculation mode to manual) and to restore it to normal settings (Shutdown). When the object reaches the end of its li...

@ThunderFrame that's perhaps true but this is literally my first time I saw anyone else using it still now - this isn't a guy who built few once upon a time and then went on to other things, never had to update his knowledge. This is a guy who does this professionally.

1. TBH, I don't use that feature myself because I already use OASIS, which is more specialized for Access rather than just VBA

2. We use a tool named ANTLR. It was originally written in Java, but they have ported it to various target, including C++, C#, JavaScript, among other things. To build the grammar we use the .g4 files which allow us to define grammar in a declarative manner and thus generate C# classes from it. There's some explanation here: github.com/rubberduck-vba/Rubberduck/wiki/The-Parsing-Process

2. I've googled a bit ANTLR and I tried to update my RD ANTLR to the last version just to see what gets broken. But what I'm wondering at the moment is how to construct the .g4 files, like, what syntax and semantics it's using ANTLR to build the grammars. Do you know of any tutorial about this?

@NelsonVides Currently, we are on Antlr 4.3, which cannot be built in VS2017. However, it can be built in VS2015, which cannot build the solution. So any grammar changes have to be done in VS2015 atm and then one has to switch back to VS2017 to actually build the solution.

@NelsonVides The Antlr syntax is basically like regex, with the difference that you can reference other rules within a rule. SCREAM CASE rules refer to lexer tokens, which are defined in the lexer .g4.

@M.Doerner I need to take again those notes about grammars, I read them back in the days but I didn't have an actual problem to face so I just read them superficially even though they were very interesting.

@this I'm gonna go for MIDL and this beautiful oleview for a while, thanks a lot!

Situation:
I am trying to print off reports for selected budget holders (selected from a Budget Holder Table), using the budget holder name to feed into a slicer which then updates various pivot tables.
Objective:
The objective is to populate efficiently the slicer with a single budget holder...

As you can read in the Wikipedia article you liked to, there is an algorithm to turn left-recursive grammars into purely right-recursive ones. However, the parse tree you get after the transformation can look very different from what it would have looked like with respect to the original grammar.

IIRC, antlr takes a somewhat different approach to resolving direct left-recursion. Instead of adding additional rules, it adds predicates to rules that dynamically limit the depth of the left-recursion.

As a consequence, the preprocessed grammar is no longer context insensitive.

Regarding why left-recursion is a problem for a top-down parser, a left-recursion has no guarantee to ever stop if you are reading the input left to right, which you need to do if you want to be able to support potentially infinite streams.

In contrast, a right-recursive rule always consumes tokens (to the left) before recursing.

Thus, for a finite input, the parser knows after finite time whether a rule matches or not.

Your VBA project is embedded in an Excel workbook. It references the VBA standard library; it references the library that exposes the host application’s (i.e. in this case, Excel’s) object model; it includes global-scope objects of types that are declared in these libraries – like Sheet1 (an Excel.Worksheet instance) and ThisWorkbook (an Excel.Workbook instance). These free, g…

> The lower bound of an array created using the Array function is determined by the lower bound specified with the Option Base statement, unless Array is qualified with the name of the type library (for example VBA.Array ). If qualified with the type-library name, Array is unaffected by Option Base.

Because what is an array? A contiguous block of memory allocated to a N elements of same data type. How do we access the elements? By doing pointer arithmetic with the first element's pointer address the base. Therefore, 3 to 5 has to be pure syntactic sugar.

But holy moly, this kind of nonsense has entrapped far too many people with unnecessary one-off errors.

@ThunderFrame I have to admit that this feels very ... arbitrary. Don't worry, if you incant the magic incantations, all that will go away!

@this I've done consulting jobs where the client was on the verge of pulling the 64-bit trigger ("64-bits, is more bits, it must be better, right?"), only to realize that they're hugely dependent on 3rd party libraries and controls that won't work on 64-bit, and none of their code has been written defensively for bitness.

@this think about the positive, where a user assigns a value that they expect to update the original - the inspection can't distinguish between a real case and a false positive. Your fix would be to use a temporary variable?