Click here to Skip to main content
15,175,834 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Looking for EBNF for Javascript Pin
honey the codewitch28-Aug-21 7:34
mvahoney the codewitch28-Aug-21 7:34 
GeneralRe: Looking for EBNF for Javascript Pin
User 1530175228-Aug-21 7:42
professionalUser 1530175228-Aug-21 7:42 
GeneralRe: Looking for EBNF for Javascript Pin
Richard Andrew x6428-Aug-21 8:35
professionalRichard Andrew x6428-Aug-21 8:35 
GeneralRe: Looking for EBNF for Javascript Pin
honey the codewitch28-Aug-21 8:48
mvahoney the codewitch28-Aug-21 8:48 
GeneralRe: Looking for EBNF for Javascript Pin
Richard Andrew x6428-Aug-21 10:24
professionalRichard Andrew x6428-Aug-21 10:24 
GeneralRe: Looking for EBNF for Javascript Pin
honey the codewitch28-Aug-21 11:46
mvahoney the codewitch28-Aug-21 11:46 
GeneralRe: Looking for EBNF for Javascript Pin
Richard Andrew x6428-Aug-21 11:54
professionalRichard Andrew x6428-Aug-21 11:54 
GeneralRe: Looking for EBNF for Javascript Pin
honey the codewitch28-Aug-21 12:23
mvahoney the codewitch28-Aug-21 12:23 
Well if you already have a control that uses EBNF grammars, go ahead and use that, I suppose.

Except i doubt it will handle comments properly for reasons. You'll want to check. particularly with /* */ in the middle of wo/*like this*/rds

I'd have probably used ICSharpCode.AvalonEdit if i was starting from scratch but that would just be a starting point for me.

Your minification shouldn't use it at all i think though.

What you'll want to do is make code that skips javascript strings and comments.

And then from there you'll want to take what's left over and reduce all whitespace runs to a single space. If you want to get more minified than that you can eliminate all space except when two identifiers are next to each other.
Real programmers use butterflies

GeneralRe: Looking for EBNF for Javascript Pin
Gary R. Wheeler28-Aug-21 9:05
MemberGary R. Wheeler28-Aug-21 9:05 
GeneralRe: Looking for EBNF for Javascript Pin
Richard Andrew x6428-Aug-21 10:27
professionalRichard Andrew x6428-Aug-21 10:27 
Generalto all suffering these days ... at home, in Kabul, or wherever and for whatever Pin
User 1530175228-Aug-21 6:37
professionalUser 1530175228-Aug-21 6:37 
GeneralRe: to all suffering these days ... at home, in Kabul, or wherever and for whatever Pin
User 1530175228-Aug-21 7:09
professionalUser 1530175228-Aug-21 7:09 
GeneralRe: to all suffering these days ... at home, in Kabul, or wherever and for whatever Pin
Nelek28-Aug-21 23:47
protectorNelek28-Aug-21 23:47 
GeneralRe: to all suffering these days ... at home, in Kabul, or wherever and for whatever Pin
User 1530175228-Aug-21 7:39
professionalUser 1530175228-Aug-21 7:39 
GeneralRe: to all suffering these days ... at home, in Kabul, or wherever and for whatever Pin
dandy7231-Aug-21 10:13
Memberdandy7231-Aug-21 10:13 
JokeFound a chickpea senselessly smashed into a pulp... Pin
Sander Rossel28-Aug-21 3:36
professionalSander Rossel28-Aug-21 3:36 
GeneralRe: Found a chickpea senselessly smashed into a pulp... Pin
Mike Hankey28-Aug-21 4:19
professionalMike Hankey28-Aug-21 4:19 
GeneralRe: Found a chickpea senselessly smashed into a pulp... Pin
OriginalGriff28-Aug-21 4:51
mveOriginalGriff28-Aug-21 4:51 
GeneralRe: Found a chickpea senselessly smashed into a pulp... Pin
englebart28-Aug-21 5:21
professionalenglebart28-Aug-21 5:21 
GeneralRe: Found a chickpea senselessly smashed into a pulp... Pin
RickZeeland28-Aug-21 7:24
mveRickZeeland28-Aug-21 7:24 
NewsGood news for physically inactive, coffee drinking developers! Pin
Ravi Bhavnani27-Aug-21 16:09
professionalRavi Bhavnani27-Aug-21 16:09 
GeneralRe: Good news for physically inactive, coffee drinking developers! Pin
Ron Anders27-Aug-21 18:10
MemberRon Anders27-Aug-21 18:10 
GeneralRe: Good news for physically inactive, coffee drinking developers! Pin
Richard Andrew x6427-Aug-21 18:31
professionalRichard Andrew x6427-Aug-21 18:31 
GeneralRe: Good news for physically inactive, coffee drinking developers! Pin
Nelek28-Aug-21 0:57
protectorNelek28-Aug-21 0:57 
GeneralRe: Good news for physically inactive, coffee drinking developers! Pin
Sander Rossel28-Aug-21 1:02
professionalSander Rossel28-Aug-21 1:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.