« first day (440 days earlier)      last day (2740 days later) » 
00:00 - 21:0021:00 - 00:00

21:00
Just as well Case "A" To "Z" is valid...
0
Q: Loop trough a column cells and compare value with a Collection in VBA

Artyom2033I have a Collection of 166 elements: Dim MyCollection As New Collection MyCollection.Add ("%") MyCollection.Add ("%O") MyCollection.Add ("D") MyCollection.Add ("CMS") ... I want to compare them to the value of the cells in a column. If the value of a cell is not in MyCollection, I change the b...

@Mat'sMug Umm...so I put it in the wrong room, but INTEGERLITERAL will not suffice for the Select Case statement To blocks.
> Additionally, upon further research, in VB.NET the `To` style of `Case` statements can have alphabetical values, and double values as well. I.e.:

Select Case Foo
Case "a"
Case "bolts" To "nuts"
Case Else
End Select

And:

Select Case Foo
Case Is < 15, 19.5
Case 15 To 22.5, 46
Case 22.5 To 40, 45, Is > 47
Case 40 To 47
Case Else
End Select

This means that `INTEGERLITERAL` in the `TO` syntax tree
@Hosch250 unit test the resolver
but even that wouldn't be enough
@Mat'sMug Can you move all my messages in The 2nd Monitor starting at chat.stackexchange.com/transcript/message/23564347#23564347 here?
(Only four of them.)
21:09
5 messages moved from The 2nd Monitor
oops, moved 5
THat's fine.
I'll throw some updated grammar to try to fix those problems in that issue tonight...
Provided you can do a quick VBA test of the two case statements I added in my latest comment, to verify it's allowed.
I need to document the "workflow" I do when I modify the grammar file..
it's a bit convoluted
I believe it, especially with ANTLR.
INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ ( ('e' | 'E') INTEGERLITERAL)* ('#' | '&')?;
DOUBLELITERAL : (PLUS|MINUS)? ('0'..'9')* '.' ('0'..'9')+ ( ('e' | 'E') (PLUS|MINUS)? ('0'..'9')+)* ('#' | '&')?;
Those are bugged as well, it appears.
huh, how so?
As far as INTEGERLITERAL stands, it could be 1e1e5e1.
That should validate true by that rule.
21:12
oh wow
:)
Like I said, second pair of eyes.
  <data name="DeclarationType_Control" xml:space="preserve">
    <value>control</value>
  </data>
Where's that one applied?
I'll comment some updated grammar rules tonight.
@IsmaelMiguel same as the other DeclarationType_Xxxx ones - that one's a bit special though, "control" stands for a "form control" (a button, textbox, dropdown, whatever)
That one is a kick in my nuts :/
21:14
sorry
Lets see what I can make up here
It's not your fault
You did a nice work
Simon and Vogel had quite a bit of a hard time translating that one
thanks
It really is hard to translate
But then again, it's different languages and this kind of difficulty will always happen when translating
@EBrown one assumption RD is making, is that the VBA code is compilable when it parses
we're making an add-in, not a compiler ;-)
@IsmaelMiguel I believe you
@Mat'sMug Still doesn't mean the grammar cannot be thorough.
21:16
@Mat'sMug I believe me too
@EBrown indeed
INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ [ ('e' | 'E') ('0'..'9')+ ] ('#' | '&')?;
DOUBLELITERAL : (PLUS|MINUS)? ('0'..'9')* '.' ('0'..'9')+ [ ('e' | 'E') (PLUS|MINUS)? ('0'..'9')+ ] ('#' | '&')?;
still, it was better to start with a grammar that works for 80% of the code, than to write one from scratch
Provided ANTLR can properly work with the optional ([]) blocks, that should fix those two.
optional would be (...)?
21:17
No, that's just grouping.
Option is brackets ([]).
@EBrown What about 1.1e2? It is an integer and that treats it as decimal
"?" was part of it...
INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ ( ('e' | 'E') INTEGERLITERAL)* ('#' | '&')?;
DOUBLELITERAL : (PLUS|MINUS)? ('0'..'9')* '.' ('0'..'9')+ ( ('e' | 'E') (PLUS|MINUS)? ('0'..'9')+)* ('#' | '&')?;
It's a question, it ends with ?
21:18
That's the original definition.
I'm just saying an edge-case
Notice, all I did was change ( ... INTEGERLITERAL)* to [ ... ('0'...'9')+ ] on the INTEGERLITERAL.
I noticed
I'm just informing you
And changed ( ... )* to [ ... ] on the DOUBLELITERAL.
@IsmaelMiguel I wasn't talking to you.
the operators work like in regex. ? is "0 or once", + is "at least once" and * is "0 or more"
21:19
Oh
and | is "or"
anyway, TTQW
@Mat'sMug Right, and what you had was ( ( 'e' | 'E') INTEGERLITERAL)*, which would read as "the group of 'e' or 'E' followed by another integer literal, repeated any number of times."
Which means, 1e1e5e1 would pass that test.
indeed
21:21
Which is...not ideal...lol
So, by using [ ... ] in place of ( ... )*, it should treat that like an optional. Though, you could replace it with ( ... )? instead.
I'll be back later, will catch up on the transcript - feel free to "rubberduck" at will :)
Alright, I won't be on much after now. I'm leaving work as well.
I don't usually get on "chat" at home.
I will try to update that issue with new grammar, though. (Hopefully valid.)
I'll setup a test-environment where I can test just the grammar updates.
LMK if you have any questions about how to build the updated grammar into Rubberduck.Parsing.dll, if you need to
  <data name="RemoveParamsDialog_RemoveIllegalSetterLetterParameter" xml:space="preserve">
    <value>Cannot remove last parameter from setter or letter.</value>
  </data>
Was it really supposed to be "letter"?
21:38
@IsmaelMiguel there's no real term for it. It's a setter for a value-type property
Property Set Foo(value)
^^ only valid for reference types
Property Let Foo(value)
^^ value is a value type
"Let-mutator" would be appropriate too
I'll leave it in English then
I wonder what Portuguese MSDN calls them
Garbage, probably
Some Brazillian mashup
Or another hedious name
lol. Ok, gone/driving now
22:25
@Mat'sMug I'll leave that to the professionals. :)
22:40
@Mat'sMug Should I submit an issue for the INTEGERLITERAL and DOUBLELITERAL grammar issues?
I have one prepared, just need to press "Submit new issue" if you would like.
22:57
> Alright, so after reading through a lot of the grammar, I think the following solution should take care of this issue:

Replace the current `Select Case` grammar:

> selectCaseStmt :
SELECT WS CASE WS valueStmt NEWLINE+
sC_Case*
WS? END_SELECT
;

> sC_Case :
CASE WS sC_Cond WS? (':'? NEWLINE* | NEWLINE+)
(block NEWLINE+)?
;

> // ELSE first, so that it is not interpreted as a variable call
sC_Cond :
[antlr/antlr4] parrt created tag 4.5.1-1
New version of ANTLR?
The link to that repo is bugged.
@EBrown sure!
@Mat'sMug Already did before you responded...lol
@Duga hasn't picked it up yet.
I also added two other concerns in it, in case you wanted to implement them.
23:16
> I noticed an issue with the following grammar when I was reading over it:

> INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ ( ('e' | 'E') INTEGERLITERAL)* ('#' | '&')?;
DOUBLELITERAL : (PLUS|MINUS)? ('0'..'9')* '.' ('0'..'9')+ ( ('e' | 'E') (PLUS|MINUS)? ('0'..'9')+)* ('#' | '&')?;

These allow for invalid values, such as `1e1e5e1`, and `1.5e4e3`.

Possible solution:

INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ ( E ('0'..'9')+ )? ('#' | '&')?;
DOUBLELITERAL : (PLUS|MINUS)?
There's @Duga with the win.
Thanks @EBrown, that's awesome!
@Mat'sMug I may as well help all you guys out with this stuff, after all, you guys have helped me here on CR plenty before. :)
So, if all I'm really able to do is go around and fix minor issues, then so be it. :)
So now rubberduck-vba/Rubberduck shows up under "Repositories you contribute to" on my Git homepage.
Eh, any grammar issue is a major issue that ripples across the whole app
@Mat'sMug Well, then maybe I can help fix some "major" issues then. :)
Uh oh. I see grammar snippets. =;)-
23:44
@RubberDuck Heh, figured I'd chip in some grammar help a bit.
I'm going to run through the entire grammar file at some point (maybe this weekend) and take some notes and open some issues if I think any changes would be beneficial.
Ohhhh. 87 stars!
Happy to have any help we can get @EBrown.
@RubberDuck Glad I can offer some. :) I'm thinking I'm going to use this (and having one of my dozen+ projects on Git) to get myself back in the C# groove.
I've lost my mojo lately.
Trying to get it back.
Though, I'm probably not going to make any PR's for the grammar stuff, so you guys will need to do that. (I'll provide the fixes in issues so you can run-and-gun with them, though.)
Good call on the calculation Chip. — RubberDuck 36 secs ago
It's cool @EBrown. However you want to pitch in. I find myself with a lot less time and motivation these days. Which sucks because there's a not quite done feature that needs to be finished.
00:00 - 21:0021:00 - 00:00

« first day (440 days earlier)      last day (2740 days later) »