8 Answered Questions for the topic parsing


Why can't a recursive-descent parser handle left recursion?

Could someone please explain to me why recursive-descent parsers can't work with a grammar containing left recursion?
Parsing Grammar Idioms


Grammar parsing for "if need be"?

I have the following question. There is an idiom 'if need be'. The meaning is clear, but I can't comprehend it from a grammatical point of view. How should I parse it? 'if [smth] needs to be'? Why... more
Parsing Java Logic Algorithm


Parsing Java Source Code?

I am asked to develop a software which should be able to create Flow chart/ Control Flow of the input Java source code. So I started researching on it and arrived at following solutions: To create... more


How do I parse a string to a float or int in Python?

In Python, how can I parse a numeric string like `"545.2222"` to its corresponding float value, `545.2222`? Or parse the string `"31"` to an integer, `31`?I just want to know how to parse a *float*... more

How to determine whether a language is LL(1) LR(0) SLR(1)?

Is there a simple way to determine whether a grammar is LL(1), LR(0), SLR(1)... just from looking on the grammar without doing any complex analysis? For instance: To decide whether a BNF Grammar is... more
Parsing Logic Javascript


Why does javascript accept commas in if statements?

I stumbled across some javascript syntax that seemed like it should produce a parse error of some kind but doesn't: if (true, true) {console.log('splendid')} else {console.log('horrid')} //... more
Parsing Python Json


Parsing values from a JSON file?

I have this JSON in a file: { "maps": [ { "id": "blabla", "iscategorical": "0" }, { "id": "blabla", ... more
Parsing Linux Bash Shell


How to join multiple lines of file names into one with custom delimiter?

I would like to join the result of `ls -1` into one line and delimit it with whatever i want. Are there any standard Linux commands I can use to achieve this?

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.