Commit Graph

6 Commits (2fd35df83aa74034af02c9e580e5ea15d303f8bb)

Author SHA1 Message Date
Danny Yoo 2fd35df83a Correct location calculations for non-terminals.
The prior code constructed the location of nonterminal maches out of
the the state of the stream after parsing.  This isn't right for a few
reasons:

    1.  It doesn't get starting location correctly.

    2.  It doesn't behave when the non-terminal production did not
        actually consume tokens for its parse.

This patch modifies the parsers to also pass along a
"last-consumed-token"; it, along with a few other changes, provides
the parsers enough information to accurately construct the locations,
even when no tokens have been consumed during the parse.  We
synthesize a sentinel last-consumed-token token to take location from
the head of the stream.

original commit: 6e21e34ec7c7a3e9cf23a3f24bfafd6155e1f14a
12 years ago
Danny Yoo 33ebcd7a78 Modernize cfg-parser from mzscheme to Racket libraries.
original commit: 4ff4c677bd354cb1a26adf0c3e0e4de03a7a3939
12 years ago
Robby Findler e4eafd14e1 Added @literal-algol{} and started an algol60 test suite (apologies
if there already was one that I didn't find). Also fixed syntax
error raising procedure.

closes PR 12859

original commit: c0b928c758cc64b7b902fbe38838d31a3c1bc008
13 years ago
Matthew Flatt 181de9ebc3 fix `cfg-parser' to more closely match `parser'
original commit: c1ceebb92a86fce791eb3965d885917195e03eb4
13 years ago
David Van Horn cb1c226c0e Fixes more spelling errors.
original commit: 760a58b65df2b91010d2bcc2739ddab2a4489729
14 years ago
Matthew Flatt b0a5e55273 rename all files .ss -> .rkt
original commit: 28b404307793f041bb3363135a2968e283855318
15 years ago