Parsing - Computerphile

preview_player
Показать описание
Parsing applies to human language as much as computer code. Giancarlo Sandoval on the basics of parsing.

This video was filmed and edited by Sean Riley.

Рекомендации по теме
Комментарии
Автор

YES!! Please make this into a full-blown series about compilers!

Michael-vsmw
Автор

"My dad is coming home"

No need to brag, dude.

superscatboy
Автор

I am EXTREMELY interested in compilers and parsing. This speaker, however, didn't seem very prepared for this video and wasn't able to ad-lib an explanation coherently. Please make more language videos, though!

gloverelaxis
Автор

I tried to understand this video, but I think I'll parse.

ArcanePath
Автор

And what was that?
That was parsing?
First a gloss over the Lex Analyser, then a hint at context-free grammar and then infer from that a vulnerability.
A decent context free grammer takes error cases into account as well, otherwise it cannot recover from syntax errors and the parse process has to be aborted halfa**ed.
I know what he was talking about and he still almost managed to confuse me.
I think this would warrant a few flicks to explain it properly.

helmutzollner
Автор

please revisit this topic again with a better prepared speaker, don't get me wrong but even for a short video it could be better messing things up at the end... or do it with the same host just let him practice and get some advices from some of the other speakers to get more fluent on this topic and speaking about it

fkhg
Автор

First time I'm actually disappointed with a Computerphile video.
But give the guy a chance. It's not always easy to sit in front of a camera explaining stuff. I'm sure it will get better with time and a little patience.

ZeedijkMike
Автор

Great topic. But it needs a better explanation.

veaarthur
Автор

Great topic — very poor presentation (this was a „just wing it“ compared to the rest of the computerphile league...)

dinoscheidt
Автор

I was actually really invested in this but Giancarlo seemed as though he needed some practice with his delivery. Definitely bring him back because he made his description easy to follow and understand, even if his speaking voice wasn't the best.

VoilaTadaOfficial
Автор

>Parsers are only for compilers
This is wrong. Parsing is used for many different purposes such as config files or network packets.
>Parsers must have a lexing stage
No, this just simplifies your parser. Depending on what you are parsing, a lexing stage might even be pointless to do.
>Handmade parsers are unsafe
No, using an insecure language from the 70s is what is unsafe.

gyroninjamodder
Автор

Allow me to correct you. A Lexer reads a syntax, analyzes it and aligns it's individual characters for the Parser as an AST(Abstract Syntax Tree).

The Parser tokenizes the Lexer's AST and aligns and label's it's character sets and groups of characters to be iterated through these tokens to either evaluate the program in a base language as an Interpreter or to convert its AST into Assembly for conversion to binary.

Essentially a Lexer outputs something similar to the following:

DECLFUNCTION myAdd LPAR INT a COMA INT b RPAR LBRK BEGINFUNCTION
INT x1 EQUAL 100 ENDTAG NWLN y1 EQUAL ENDTAG NWLN PRINT LPAR +1 ADD y1 RPAR ENDTAG NWLN RBRK ENDFUNCTION ENDTAG NWLN
a1 EQUAL(=) 500 ENDTAG(;) NWLN IF LPAR a1 EQEQUAL(==) 500 RPAR LBRK NWLN PRINT LPAR DQUOTE It does ! DQUOTE RPAR RBRK ENDTAG NWLN

An Math Expression Engine is also at work setting state switch triggers, counters and temp variables to hold temporary variables that hold values for math calculations, operators, precedencies, enumerators and operands. These token strings are generally called Expressions and are where string token values are converted to real numeric values using the following methods:

stod()
stof()
stoi()
stol()
stold()
stoll()
stoul()
stoull()

aboutmount
Автор

We made a small compiler in our compilers class. It was all fun until we had to convert to assembly language.

e-maxwell
Автор

Don't just write down the things you're saying. A visual aide should complement and illustrate the verbal content, for example, you might show examples.

HebaruSan
Автор

What happens, during the parsing process, when the syntax of our code happens to be wrong?
like forgetting to write a " : " in front of our Python "for" loop ?

GeoffryGifari
Автор

I hope you would do more videos on this topic.

iuxgjve
Автор

Is the information necessary to do lexical analysis already built-in (inside the compiler)?

GeoffryGifari
Автор

I am studying compiler design right now. Great timing.

arkadipmaitra
Автор

really liking this new addition to the computerphile team! The guy clearly knows his stuff and explains it well. More of Giancarlo and more videos on compilers please

featherednoumena
Автор

I'm pretty disappointed with this episode. As a computer science student, I just study compiler last semester and I realy think that without this knowledge I wouldn't be able to anderstand a word of this video. The description of the main steps of compilation was very confuse while it can be at first presented with a few general words to begin with and then eventually go into details. because here I think we never anderstand why it is like that, nor what each step realy do that the others don't finaly more important where are you going to.

kasonnara