On Friday, 19 July 2013 at 20:49:27 UTC, Brian Schott wrote:
Status update:
excluding c-style array declarations, which I'm convinced are
broken and should be removed from the language
+1
I found for myself that "native" style arrays are more natural.
On 2013-07-19 22:49, Brian Schott wrote:
Status update:
My parser is at a point where it can parse all of phobos (well,
excluding c-style array declarations, which I'm convinced are broken and
should be removed from the language).
I've been updating the grammar definition as I worked on the par
Am Fri, 19 Jul 2013 22:49:25 +0200
schrieb "Brian Schott" :
> Status update:
>
> My parser is at a point where it can parse all of phobos (well,
> excluding c-style array declarations, which I'm convinced are
> broken and should be removed from the language).
>
> I've been updating the grammar
On Friday, 19 July 2013 at 20:49:27 UTC, Brian Schott wrote:
Status update:
My parser is at a point where it can parse all of phobos (well,
excluding c-style array declarations, which I'm convinced are
broken and should be removed from the language).
I've been updating the grammar definition
On Friday, 19 July 2013 at 20:57:14 UTC, H. S. Teoh wrote:
Really? Those still exist in Phobos? Shouldn't they be
rewritten to the
"native" style?
Yes.
https://github.com/D-Programming-Language/phobos/pull/1412/files
On Friday, 19 July 2013 at 20:52:33 UTC, Mr. Anonymous wrote:
https://rawgithub.com/Hackerpilot/DGrammar/master/grammar.html
;)
I learn something new every day.
Status update:
My parser is at a point where it can parse all of phobos (well,
excluding c-style array declarations, which I'm convinced are
broken and should be removed from the language).
I've been updating the grammar definition as I worked on the
parser. An HTML version is available for
On Fri, Jul 19, 2013 at 10:49:25PM +0200, Brian Schott wrote:
> Status update:
>
> My parser is at a point where it can parse all of phobos (well,
> excluding c-style array declarations, which I'm convinced are broken
> and should be removed from the language).
Really? Those still exist in Phobos
As threatened at DConf, I've started filing bugs against the
grammar specification. Anyone interested can track bug 10233[1],
which I've marked as blocked by the various issues I've been
finding.
As usual, my best guess at D's actual grammar[2] is located
here[3].
Top secret project is hint
I wrote a small program to take the grammar and generate input to
the dot program from Graphviz. You can generate the diagrams with
some scripts available on Github or view a prebuilt version here:
http://hackerpilot.org/d/dgrammar.zip
Please take a look at this and let me know if you find any
On Thursday, 2 May 2013 at 17:13:46 UTC, Russel Winder wrote:
On Thu, 2013-05-02 at 17:44 +0100, Bruno Medeiros wrote:
[…]
To be honest, that's one of the reasons that put me off
working with ANLTR. It seems easy to create a parser with
ANTLR, but to create an efficient, well-behaved parser it
On Thursday, 2 May 2013 at 16:44:44 UTC, Bruno Medeiros wrote:
(at moments it feels like you have to take a degree to learn
how to use it effectively...)
That or buy the documentation. Or both...
On Thu, 2013-05-02 at 17:44 +0100, Bruno Medeiros wrote:
[…]
> To be honest, that's one of the reasons that put me off working with
> ANLTR. It seems easy to create a parser with ANTLR, but to create an
> efficient, well-behaved parser it looks quite complicated, in the sense
> that you can't ab
On 26/04/2013 21:44, Brian Schott wrote:
On Saturday, 20 April 2013 at 08:31:34 UTC, Brian Schott wrote:
This uses ANTLR, as the other parser generators can't handle D's grammar.
I'm beginning to think that ANTRL is not up to the task either. I've
somehow managed to get the grammar to the poin
On Wed, 2013-05-01 at 17:34 +0200, Tobias Pankrath wrote:
> On Friday, 26 April 2013 at 20:44:12 UTC, Brian Schott wrote:
> > On Saturday, 20 April 2013 at 08:31:34 UTC, Brian Schott wrote:
> >> This uses ANTLR, as the other parser generators can't handle
> >> D's grammar.
Which other parser gene
On Friday, 26 April 2013 at 20:44:12 UTC, Brian Schott wrote:
On Saturday, 20 April 2013 at 08:31:34 UTC, Brian Schott wrote:
This uses ANTLR, as the other parser generators can't handle
D's grammar.
I'm beginning to think that ANTRL is not up to the task either.
I've somehow managed to get t
On 4/28/13 8:16 PM, Brian Schott wrote:
On Friday, 26 April 2013 at 20:44:12 UTC, Brian Schott wrote:
I'm beginning to think that ANTRL is not up to the task either. I've
somehow managed to get the grammar to the point where it correctly
parses several phobos modules but takes a half hour to do
On Friday, 26 April 2013 at 20:44:12 UTC, Brian Schott wrote:
I'm beginning to think that ANTRL is not up to the task either.
I've somehow managed to get the grammar to the point where it
correctly parses several phobos modules but takes a half hour
to do so.
I think I'm done with this gramma
On Saturday, 20 April 2013 at 08:31:34 UTC, Brian Schott wrote:
This uses ANTLR, as the other parser generators can't handle
D's grammar.
I'm beginning to think that ANTRL is not up to the task either.
I've somehow managed to get the grammar to the point where it
correctly parses several phob
On Wednesday, April 24, 2013 08:39:21 Jacob Carlborg wrote:
> On 2013-04-24 03:40, Jonathan M Davis wrote:
> > That would mean creating more keywords, which would break code. By using
> > @, we avoid having to create new keywords, which I believe was the whole
> > point in the first place. Which at
On Wednesday, 24 April 2013 at 01:40:52 UTC, Jonathan M Davis
wrote:
On Tuesday, April 23, 2013 21:51:54 Stewart Gordon wrote:
Er, do away with the meaningless @? Since nobody seems to have
succeeded in explaining how the @-attributes differ from the
rest, it
seems the right way to go.
That
On 2013-04-24 03:40, Jonathan M Davis wrote:
That would mean creating more keywords, which would break code. By using @, we
avoid having to create new keywords, which I believe was the whole point in
the first place. Which attributes got @ on them was fairly arbitrary, but they
do definitely ser
On Wednesday, April 24, 2013 00:34:54 Diggory wrote:
> If at some point custom attributes will be allowed, @ would be a
> nice syntax for that.
>
> Things like @safe could be attributes implemented by the standard
> library - would cut down on the number of keywords.
We already have custom attrib
On Tuesday, April 23, 2013 21:51:54 Stewart Gordon wrote:
> Er, do away with the meaningless @? Since nobody seems to have
> succeeded in explaining how the @-attributes differ from the rest, it
> seems the right way to go.
That would mean creating more keywords, which would break code. By using @
If at some point custom attributes will be allowed, @ would be a
nice syntax for that.
Things like @safe could be attributes implemented by the standard
library - would cut down on the number of keywords.
On 02/04/2013 03:13, Walter Bright wrote:
On 4/1/2013 4:18 PM, Brian Schott wrote:
1) Grammar defined in terms of things that aren't tokens. Take,
for example, PropertyDeclaration. It's defined as an "@" token
followed by... what? "safe"? It's not a real token. It's an
identifier. You can't pa
On 04/20/2013 08:36 PM, Walter Bright wrote:
On 4/9/2013 3:20 AM, Bruno Medeiros wrote:
A bit more annoying is the case with the extern declaration, with the C++
parameter:
extern(C++)
here you have to look at a special identifier (the C, D, PASCAL part)
and see if
there is a ++ token ahead,
On 4/9/2013 3:20 AM, Bruno Medeiros wrote:
A bit more annoying is the case with the extern declaration, with the C++
parameter:
extern(C++)
here you have to look at a special identifier (the C, D, PASCAL part) and see if
there is a ++ token ahead, it's a bit more of special-casing in the parse
20-Apr-2013 12:31, Brian Schott пишет:
I've moved my work on the grammar to the following location on Github:
https://github.com/Hackerpilot/DGrammar
This uses ANTLR, as the other parser generators can't handle D's
grammar.
Great. IMHO ANTLR is one of the sanest.
> Several rules from the off
I've moved my work on the grammar to the following location on
Github:
https://github.com/Hackerpilot/DGrammar
This uses ANTLR, as the other parser generators can't handle D's
grammar. Several rules from the official grammar were removed,
and several others were added (Such as an actual rule
On 2013-04-02 04:13, Walter Bright wrote:
1) Grammar defined in terms of things that aren't tokens. Take, for
example,
PropertyDeclaration. It's defined as an "@" token followed by... what?
"safe"?
It's not a real token. It's an identifier. You can't parse this based on
checking the token type.
On 04/09/13 12:24, Bruno Medeiros wrote:
> On 07/04/2013 16:14, Artur Skawina wrote:
>>> The "1..2" is actually mentioned in the spec:
>>> >"An exception to this rule is that a .. embedded inside what looks like
>>> >two floating point literals, as in 1..2, is interpreted as if the .. was
>>> >se
On 02/04/2013 03:13, Walter Bright wrote:
1) Grammar defined in terms of things that aren't tokens. Take, for
example,
PropertyDeclaration. It's defined as an "@" token followed by... what?
"safe"?
It's not a real token. It's an identifier. You can't parse this based on
checking the token type.
On 07/04/2013 16:14, Artur Skawina wrote:
The "1..2" is actually mentioned in the spec:
>"An exception to this rule is that a .. embedded inside what looks like two
floating point literals, as in 1..2, is interpreted as if the .. was separated by a space
from the first integer."
>so it's there,
> However in an old discussion someone said that the D grammar isn't LALR(1)
> or LR(1), so I don't think that is possible with current D parser
> generators. Do we have a pegged grammar for D?
>
Yes, it comes with the project. But, it's still buggy (sometimes due to my
own mistakes, sometimes due
On Monday, 8 April 2013 at 21:50:12 UTC, Christopher Bergqvist
wrote:
On Tuesday, 2 April 2013 at 19:00:21 UTC, Tobias Pankrath wrote:
I'm wondering if it's possibly to mechanically check that
what's in the grammar is how DMD behaves.
Take the grammar and (randomly) generate strings with it
On Tuesday, 2 April 2013 at 19:00:21 UTC, Tobias Pankrath wrote:
I'm wondering if it's possibly to mechanically check that
what's in the grammar is how DMD behaves.
Take the grammar and (randomly) generate strings with it and
check if DMD does complain. You'd need a parse only don't check
s
On 04/07/13 00:35, Bruno Medeiros wrote:
> On 06/04/2013 20:52, Artur Skawina wrote:
>> On 04/06/13 17:21, Bruno Medeiros wrote:
>>> On 02/04/2013 00:18, Brian Schott wrote:
I've pretty much finished up my work on the std.d.lexer module. I am
waiting for the review queue to make some prog
On 06/04/2013 20:52, Artur Skawina wrote:
On 04/06/13 17:21, Bruno Medeiros wrote:
On 02/04/2013 00:18, Brian Schott wrote:
I've pretty much finished up my work on the std.d.lexer module. I am
waiting for the review queue to make some progress on the other (three?)
modules being reviewed before
On 04/06/13 17:21, Bruno Medeiros wrote:
> On 02/04/2013 00:18, Brian Schott wrote:
>> I've pretty much finished up my work on the std.d.lexer module. I am
>> waiting for the review queue to make some progress on the other (three?)
>> modules being reviewed before starting a thread on it.
>>
>
> B
On Saturday, April 06, 2013 16:21:12 Bruno Medeiros wrote:
> On 02/04/2013 00:18, Brian Schott wrote:
> > I've pretty much finished up my work on the std.d.lexer module. I am
> > waiting for the review queue to make some progress on the other (three?)
> > modules being reviewed before starting a th
On 02/04/2013 00:18, Brian Schott wrote:
I've pretty much finished up my work on the std.d.lexer module. I am
waiting for the review queue to make some progress on the other (three?)
modules being reviewed before starting a thread on it.
BTW, even in the lexer spec I've found an issue. How doe
On 02/04/2013 00:18, Brian Schott wrote:
I've pretty much finished up my work on the std.d.lexer module. I am
waiting for the review queue to make some progress on the other (three?)
modules being reviewed before starting a thread on it.
In the meantime I've started some work on an AST module fo
I'm wondering if it's possibly to mechanically check that
what's in the grammar is how DMD behaves.
Take the grammar and (randomly) generate strings with it and
check if DMD does complain. You'd need a parse only don't check
semantics flag, though.
This will not check if the strings are pa
On 2013-04-02 15:21, Stewart Gordon wrote:
Indeed, the published grammar needs to be thoroughly checked against
what DMD is actually doing, and any discrepancies fixed (or filed in
Bugzilla to be fixed in due course). And then they need to be kept in
sync.
Has the idea of using a parser genera
On 02/04/2013 00:18, Brian Schott wrote:
I think that we need to be able to create a grammar description that:
* Fits in to a single file, so that a tool implementer does not need to
collect bits of the grammar from the various pages on dlang.org.
* Can be verified to be correct by an existing t
On 4/1/2013 4:18 PM, Brian Schott wrote:
I've pretty much finished up my work on the std.d.lexer module. I am waiting for
the review queue to make some progress on the other (three?) modules being
reviewed before starting a thread on it.
In the meantime I've started some work on an AST module fo
I've pretty much finished up my work on the std.d.lexer module. I
am waiting for the review queue to make some progress on the
other (three?) modules being reviewed before starting a thread on
it.
In the meantime I've started some work on an AST module for
Phobos that contains the data types
48 matches
Mail list logo