Lexical And Syntax Analysis 2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards
  1. Automated Generation

  2. State Transition Diagram

  3. Table-Driven Appraoach

Approaches to Building a Lexer

2
New cards

Automated Generation

Use tools like lex to define token patterns.

3
New cards

State Transition Diagram (Manual Coding)

Design a finite automaton that tracks

character transitions.

4
New cards

Table-Driven Approach

Create a lookup table for state transitions.

5
New cards

state diagram

represents a finite automaton used for token recognition.

6
New cards

Character classes

simplify transitions:

7
New cards

Terminal Symbols

These are keywords, operators, or punctuation marks that cannot be broken down further.

8
New cards

Non Terminal Symbols

are like the branches of a tree—abstract structures built by combining terminals or other nonterminals

9
New cards

String of Terminals

is a valid sequence of these basic symbols.

10
New cards

Mixed Strings

combine terminals and nonterminals.

11
New cards

O(n3)

These algorithms operate with ________ time complexity which creates exponentially longer processing times according to the length of the input string.

12
New cards

O(n)

Parsing algorithms running inside modern compilers operate with a time

complexity that matches ____

13
New cards

factor

is the smallest unit of an arithmetic expression.