Click here to Skip to main content
15,914,225 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.

 
AnswerRe: Entertainment/Food/Hotel segment... Pin
Amarnath S26-Jul-20 0:44
professionalAmarnath S26-Jul-20 0:44 
AnswerRe: Entertainment/Food/Hotel segment... Pin
Maximilien26-Jul-20 1:43
Maximilien26-Jul-20 1:43 
AnswerRe: Entertainment/Food/Hotel segment... Pin
F-ES Sitecore26-Jul-20 5:31
professionalF-ES Sitecore26-Jul-20 5:31 
GeneralRe: Entertainment/Food/Hotel segment... Pin
DRHuff26-Jul-20 5:55
DRHuff26-Jul-20 5:55 
AnswerRe: Entertainment/Food/Hotel segment... Pin
kmoorevs26-Jul-20 12:07
kmoorevs26-Jul-20 12:07 
GeneralHeck yeah! Free insight Pin
honey the codewitch25-Jul-20 14:00
mvahoney the codewitch25-Jul-20 14:00 
GeneralRe: Heck yeah! Free insight Pin
Member 1298255826-Jul-20 23:27
Member 1298255826-Jul-20 23:27 
GeneralRe: Heck yeah! Free insight Pin
honey the codewitch26-Jul-20 23:38
mvahoney the codewitch26-Jul-20 23:38 
Member 12982558 wrote:
Can you elaborate a little on how to decide when to activate one (or more) of
the (sub?) parsers?


The share a symbol table, so when you reference a symbol from a foreign grammar it invokes the subparser

like here's an excerpt of a grammar i wrote:
/ SlangStatement.xbnf
// This is the XBNF spec for Slang Statements (gplex version - unicode enabled)
// Slang is a CodeDOM compliant subset of C#
@import "SlangExpression.xbnf";
// Statements

// we use this with our skipped lists to get comments on to relevant nodes
Comments<abstract>; // { lineComment | blockComment }
Directives<abstract>; // { directive }

VariableDeclarationStatement= varType Identifier "=" Expression ";" | Type Identifier [ "=" Expression ] ";";


Here I bolded the import line which will cause this parser to reference the SlangExpression parser generated by SlangExpression.xbnf (a grammar like this one)

I also bolded all the foreign symbols. These invoke a subparse when encountered

Member 12982558 wrote:
Of course you can activate a number of parsers simaultaneuously on a given input (sub)string


I think maybe I wasn't clear about where the parallelization opportunity is. It's in the generation of the parser source code from the grammars. That's what I can make parallel. It means faster dev cycles for the parser because it doesn't take as long to generate. ETA: but i could parallelize the backtracking. Not sure if I would gain or lose perf doing that though

Member 12982558 wrote:
Long, long time ago in one of the compilers we used a mix of bottom up and top down (recursive descent) parsers, is that (more or less) similar to what you are describing?


It sounds like it. Here's I'm assuming your parsers call other parsers like the top-down delegates to the bottom-up for some things. If so, this is like that except it's all top down, not several different algorithms.
Real programmers use butterflies

GeneralOpinions on Blazor Pin
Richard Andrew x6425-Jul-20 8:19
professionalRichard Andrew x6425-Jul-20 8:19 
GeneralRe: Opinions on Blazor Pin
honey the codewitch25-Jul-20 8:27
mvahoney the codewitch25-Jul-20 8:27 
GeneralRe: Opinions on Blazor Pin
Richard Andrew x6425-Jul-20 8:30
professionalRichard Andrew x6425-Jul-20 8:30 
GeneralRe: Opinions on Blazor Pin
Marc Greiner at home28-Jul-20 2:54
Marc Greiner at home28-Jul-20 2:54 
GeneralRe: Opinions on Blazor Pin
Marc Clifton25-Jul-20 9:24
mvaMarc Clifton25-Jul-20 9:24 
GeneralRe: Opinions on Blazor Pin
Richard Andrew x6425-Jul-20 9:46
professionalRichard Andrew x6425-Jul-20 9:46 
GeneralRe: Opinions on Blazor PinPopular
Super Lloyd25-Jul-20 16:07
Super Lloyd25-Jul-20 16:07 
GeneralRe: Opinions on Blazor Pin
Marc Clifton26-Jul-20 3:28
mvaMarc Clifton26-Jul-20 3:28 
GeneralRe: Opinions on Blazor Pin
Super Lloyd26-Jul-20 6:09
Super Lloyd26-Jul-20 6:09 
GeneralRe: Opinions on Blazor Pin
jsc4225-Jul-20 10:18
professionaljsc4225-Jul-20 10:18 
GeneralRe: Opinions on Blazor Pin
Richard Andrew x6425-Jul-20 10:25
professionalRichard Andrew x6425-Jul-20 10:25 
GeneralRe: Opinions on Blazor Pin
jsc4226-Jul-20 23:31
professionaljsc4226-Jul-20 23:31 
GeneralRe: Opinions on Blazor Pin
Sandeep Mewara25-Jul-20 10:27
mveSandeep Mewara25-Jul-20 10:27 
JokeRe: Opinions on Blazor Pin
Maximilien25-Jul-20 12:03
Maximilien25-Jul-20 12:03 
QuestionRe: Opinions on Blazor Pin
Eddy Vluggen25-Jul-20 12:15
professionalEddy Vluggen25-Jul-20 12:15 
GeneralRe: Opinions on Blazor Pin
harold aptroot26-Jul-20 1:53
harold aptroot26-Jul-20 1:53 
GeneralRe: Opinions on Blazor Pin
Pete O'Hanlon26-Jul-20 8:25
mvePete O'Hanlon26-Jul-20 8:25 

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.