Skip to content

Commit

Permalink
report: Remove the last TODOs and extend the types section.
Browse files Browse the repository at this point in the history
  • Loading branch information
mewmew committed Apr 15, 2016
1 parent 9071732 commit c2d48f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions report/sections/3_syntactic_analysis/1_design_decisions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ \subsubsection{Unified Types}

To simplify the design of the syntactic analysis phase, types have been given a unified representation in the grammar. As a consequence of this design decision, certain invalid type declarations are syntactically valid, such as \texttt{void x[10];}. To facilitate separation of concern between components of the compiler, proper type checking has initially been postponed to the semantic analysis phase\footnote{Postpone type checking to the semantic analysis phase: \url{https://github.com/mewmew/uc/issues/33}}.

Furthermore, this design decision is essential for future extensions of the language to support larger subsets of C, which include the type \texttt{void *}.

\subsubsection{Unified Declarations}

To further simplify the grammar, variable and function declarations have been given a unified representation in the grammar\footnote{Evaluate merging TopLevelDecl with Decl to simplify grammar: \url{https://github.com/mewmew/uc/issues/38}}. As a consequence of this design decision, nested function declarations are syntactically valid (see listing \ref{fig:nested_func_decl}), but not necessarily semantically valid.
Expand Down
4 changes: 0 additions & 4 deletions report/sections/3_syntactic_analysis/2_implementation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ \subsubsection{Syntax Tree Representation}

See Appendix~\ref{app:parser/ast_doc}.

% You should also describe the representation of syntax trees and list the different kinds of nodes.

% TODO: Add syntax tree representation.

\subsubsection{Dangling Else}

The dangling else problem is the canonical example of a shift-reduce conflict for LR grammars, and it is present in the µC grammar presented in Appendix~\ref{app:parser/gocc}. When generating a parser from this grammar, Gocc was capable of identifying the shift-reduce conflict introduce by the dangling else problem. Furthermore, Gocc provided an option for automatically resolving shift-reduce conflicts\footnote{Dangling else: \url{https://github.com/mewmew/uc/issues/31}} by applying \textit{maximum-munch}, as further described by the following extract from the Gocc user guide \cite{gocc_user_guide}.
Expand Down
2 changes: 0 additions & 2 deletions report/sections/3_syntactic_analysis/3_validation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ \subsection{Validation}

\subsubsection{Quiet Test Cases}

% TODO: Add output from quiet/lexer/l05.c.

For listings, see Appendix~\ref{app:parser/quiet}: \nameref{app:parser/quiet}:
\input{inc/uparse/quiet/lexer/listref.tex}
\input{inc/uparse/quiet/parser/listref.tex}
Expand Down

0 comments on commit c2d48f3

Please sign in to comment.