Stefan pushed to branch report/els-2017 at Stefan / Typer
Commits: 653cd145 by Stefan Monnier at 2017-02-06T18:17:56-05:00 -
- - - - -
1 changed file:
- paper.tex
Changes:
===================================== paper.tex ===================================== --- a/paper.tex +++ b/paper.tex @@ -568,7 +568,7 @@ context free grammars, much more restrictive than LALR, for example.
You can think of the job of an OPG parser as trying to add parentheses to recover the document's structure: whenever the parser sees something of the -form ``$\id{kw}_1~e~\id{kw}_2$'' (where $\id{kw}_1$ and $\id{kw}_3$ are +form ``$\id{kw}_1~e~\id{kw}_2$'' (where $\id{kw}_1$ and $\id{kw}_2$ are keywords and $e$ is a sequence of non-keyword tokens or fully parenthesized sub-trees), it just needs to decide whether that should be parenthesized as ``$\id{kw}_1~(e~\id{kw}_2$'' or @@ -599,8 +599,9 @@ Then parsing uses the following rule: when we see and the left precedence of $\id{kw}_2$, and we then attach $e$ to whichever is higher.
-While it enjoys an efficient implementation, the motivation behind the -choice of an OPG parser was not efficiency but rather the following aspects: +While it enjoys a simple and efficient implementation, the motivation behind +the choice of an OPG parser was not efficiency but rather the following +aspects: \begin{itemize} \item Extensible grammars suffer from an inherent lack of modularity, since the combination of two extensions can always lead to conflicts or @@ -627,8 +628,8 @@ is basically parsed as \begin{verbatim} let (x = (a; b)) in ((x = a); b) \end{verbatim} -Notice that before the \id{in} keyword the ; has higher precedence than -= and after it it's the opposite. So if Typer supported +Notice that before the \id{in} keyword the \Char{;} has higher precedence than +\Char{=} and after it it's the opposite. So if Typer supported a similar grammar, when faced with a macro call of the form \begin{verbatim} mymacro (x = a; b) @@ -1146,6 +1147,7 @@ rather primitive. Our main focus is on developing its macro facilities to have convenient access to typing information.
\begin{acks} + We would like to thank Christopher League for his comments. The work is supported by the \grantsponsor{NSERC}{National Science and Engineering Research of Canada} {http://www.nserc-crsng.gc.ca/%7D
View it on GitLab: https://gitlab.com/monnier/typer/commit/653cd14510f68010462ebebecf61e601a0da...