[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter gives an overview of major components of semantic and how they interact with each other to perform its job.
The first step of parsing is to break up the input file into its fundamental components. This step is called lexing. The output of the lexer is a list of tokens that make up the file.
syntax table, keywords list, and options | | v input file ----> Lexer ----> token stream |
The next step is the parsing shown below.
bovine table | v token stream ---> Parser ----> parse tree |
The end result, the parse tree, is created based on the "bovine table", which is the internal representation of the BNF language grammar used by semantic.
Semantic database provides caching of the parse trees by saving them into files named `semantic.cache' automatically then loading them when appropriate instead of re-parsing. The reason for this is to save the time it takes to parse a file which could take several seconds or more for large files.
Finally, semantic provides an API for the Emacs-Lisp programmer to access the information in the parse tree.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |