[erlang-questions] Erlang documentation -- a modest proposal

Éric Pailleau <>
Wed Sep 28 07:22:19 CEST 2016

I see an interest in keeping all source code in abstract code at least as a compilation option. 
This could allow to beautify code automatically with the rules of owner by rewriting back to disk the source code. 
Numbers of blanks per tabulation,  max width of code,  some want 80 colons, some other 100 for example. 
This could help to create a tool to let respect the coding standard of owner project. 

"Envoyé depuis mon mobile " Eric

---- Richard A. O'Keefe a écrit ----

>Concerning the abstract syntax tree and recording absolutely
>everything about the source code in it; is this really
>What SWI Prolog does to support its debugger is
>- retain the source text in a file
>- in the AST, record the beginning and length of each term.
>For Erlang, 16#fc would be tokenised as
>   {integer,{location,Line,Col,Start,Length},252}
>For a Prolog dialect converter I wrote, I adopted the rule
>that % comments with a preceding token on the same line were
>attached to the *preceding* term while % comments without
>such a token were attached to the *following* term, with
>%comments preceding a predicate attached to the following
>predicate as a whole.  Thus
>    % following predicate
>    foo(...) :- % foo(...)
>       % bar(...)
>       bar(...), % also bar(...).
>       ugh(...). % ugh(...)
>This seemed to fit user expectations pretty well.
>erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160928/f03cbd69/attachment.html>

More information about the erlang-questions mailing list