Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bottom-up-parsing

An upward parser, also known as a "bottom-up parser," represents a specific type of syntactic analyzer employed in compiler theory to carry out the processing and analysis of the grammatical structure of a source program. Instead of commencing the analysis from the initial symbol, upward parsers construct the syntax tree from the leaves, i.e., the terminal symbols, up to the root, represented by the language's initial symbol.

Specifically, a bottom-up parser, such as the LR(1) parser, follows a syntactic approach based on reducing symbols to the right-hand production of a grammar rule. The notation "LR" stands for "left-to-right," indicating the order in which input symbols are processed, while the "R" emphasizes the construction of the derivation more to the "right" in the production derivation process.

Below is an example implemented in the C programming language, following a functional programming approach.

parser table of LR(1) grammar

Lenguaje

C 

Grammar

grammar LR(1) of parser

Parser Table

parser table of LR(1) grammar

Execution

$ cd source
$ gcc sintactico_ascendente.c -o sintactico_ascendente
$ ./sintactico_ascendente string_with_atom_string

About

simulation to exemplify the process of analyzing a chain of atoms

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages