FlashKeepers

Programming Concepts · College · College and University

Compilers and Interpreters

Lexing, parsing, ASTs, semantic analysis, intermediate representations, code generation, JIT, bytecode and virtual machines.

About this set

39 basic cards for College Programming Concepts. It opens with "What is lexical analysis?" and "What is a token?". Study it alongside the other College sets below.

39 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is lexical analysis?
Show answerBreaking source code into tokens
What is a token?
Show answerThe smallest unit of syntax (keyword, identifier, operator, etc)
What is a lexeme?
Show answerThe actual text string matched by a token pattern
What role do regular expressions play in lexers?
Show answerThey define patterns that identify and classify tokens
What is a finite automaton in lexing?
Show answerA state machine used to recognize patterns and define tokens
What is syntax analysis?
Show answerConverting a sequence of tokens into a hierarchical tree structure
What does a context-free grammar (CFG) define?
Show answerThe syntax rules of a language using production rules (rewrite rules)
What is the difference between a parse tree and an AST?
Show answerParse trees show every grammar derivation step; ASTs show only semantically relevant nodes
What is recursive descent parsing?
Show answerA top-down parsing approach where each grammar rule is implemented as a recursive function
What does an LL(1) parser do?
Show answerReads input left-to-right and produces a leftmost derivation with one-token lookahead
What does an LR parser do?
Show answerPerforms bottom-up parsing by shifting tokens onto a stack and reducing via grammar rules
What does lookahead mean in parsing?
Show answerExamining the next token(s) to decide which grammar rule to apply
What is semantic analysis?
Show answerChecking that code follows language rules beyond syntax (types, scope, declarations)
What is a symbol table?
Show answerA data structure that records identifiers, their types, and their scope information
What is type checking?
Show answerVerifying that operations apply to values of compatible types

24 more cards in the app

Study this set free