about summary refs log tree commit diff
path: root/src/grammar
AgeCommit message (Collapse)AuthorLines
2019-09-30Remove legacy grammarErin Power-2757/+0
2018-12-25Remove licensesMark Rousskov-50/+0
2018-12-04syntax: Rename some keywordsVadim Petrochenkov-2/+2
`CrateRoot` -> `PathRoot`, `::` doesn't necessarily mean crate root now `SelfValue` -> `SelfLower`, `SelfType` -> `SelfUpper`, both `self` and `Self` can be used in type and value namespaces now
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-3/+0
Closes #22181, #27779
2017-10-08Update grammar to parse current rust syntaxBrian Leibig-186/+271
2017-06-13changed upper bound digit in octal rule to 7Arthur Arnold-1/+1
2017-05-08Re-add LALR grammar.Mark Simulacrum-0/+2725
2017-05-02Remove ANTLR grammar.Mark Simulacrum-4221/+0
It is unused and not maintained.
2017-04-28Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichtonbors-1/+1
Implement a file-path remapping feature in support of debuginfo and reproducible builds This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler. This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages. r? @alexcrichton
2017-04-26 support `default impl` for specializationGianni Ciccarelli-14/+15
`[default] [unsafe] impl` and typecheck
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-1/+1
reproducible builds.
2017-04-25 support `default impl` for specializationGianni Ciccarelli-11/+17
pr review
2017-03-27Fix various useless derefs and slicingsOliver Schneider-3/+3
2017-02-15Fix typoDmitry Guzeev-3/+3
2016-11-27Use keywords::InvalidStefan Schindler-13/+15
2016-11-27Resolve visibility issuesStefan Schindler-14/+12
use syntax::ast::Name; is a reexport of syntax::symbol::Symbol(u32);
2016-11-27Finishing d2f8fb0a0a9dd from @jseyfriedStefan Schindler-3/+5
2016-11-16Fix grammar verificationStefan Schindler-9/+24
* Use `make check-lexer` to verify the grammar. * Extend grammar/README * Add make clean-grammar rule * Add target `check-build-lexer-verifier` to `make tidy`, so it will build the verifier with every build and catch future errors * Search for antlr4 with configure and find
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-5/+5
2016-05-25antlr grammar verification script now compiles under latest nightlyMichael Rosenberg-106/+108
2015-12-24Fix whitespace alignmentMichael McConville-2/+2
Trivial, but my eye is twitching.
2015-11-26fix rustc-testAriel Ben-Yehuda-1/+4
2015-10-27Adjust src/grammar for the introduced <- opSimonas Kazlauskas-4/+14
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-4/+4
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-03Use consistent terminology for byte string literalsVadim Petrochenkov-24/+24
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-08-08rustc: rename multiple imports in a listSean McArthur-0/+1
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-05-18Auto merge of #25337 - bleibig:update-grammar, r=nikomatsakisbors-23/+34
* Correctly lex CRLF in string literals * Update `extern CRATE as NAME` syntax * Allow leading `::` in view paths * Allow TySums in type ascriptions and impls * Allow macros to have visibility and attributes * Update syntax for qualified path types and expressions * Allow block expressions to be called () and indexed []
2015-05-17Revert "Panic if the grammar verifier sees a token it doesn't recognize"Carol Nichols-1/+1
This reverts commit 9c7d5ae57c27ebfc019c2c23283bb905d8c3b74f. This was wrong... the `continue` was to ignore the latter half of the tokens file. Another mechanism will have to be used to keep the model grammar's tokens in sync with the actual grammar's tokens :-/
2015-05-14syntax: replace sess.span_diagnostic.cm with sess.codemap().Eduard Burtescu-4/+2
2015-05-12Update the bison grammar for various language changesBrian Leibig-23/+34
2015-05-05Panic if the grammar verifier sees a token it doesn't recognizeCarol Nichols-1/+1
To prevent the reference grammar from getting out of sync with the real grammar, panic if RustLexer.tokens contains an unknown token in a similar way that verify.rs panics if it encounters an unknown binary operation token.
2015-05-05Declare other tokens used later in the reference grammarCarol Nichols-3/+3
There were some tokens used in the grammar but not declared. Antlr doesn't really seem to care and happily uses them, but they appear in RustLexer.tokens in a potentially-unexpected order.
2015-05-05Correct a typo in a declared token in the reference grammarCarol Nichols-1/+1
This appears to not have too much of a detrimental effect, but it doesn't seem to be what is intended either. antlr doesn't mind that `PLUS` isn't declared in `tokens` and happily uses the `PLUS` that appears later in the file, but the generated RustLexer.tokens had PLUS at the end rather than where it was intended: NOT=10 TILDE=11 PLUT=12 MINUS=13 ... PLUS=56
2015-04-23Functional changes for associated constants. Cross-crate usage of associated ↵Sean Patrick Santos-2/+21
constants is not yet working.
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-104/+102
2015-04-19Finished unicode support in the model lexer.Piotr Czarnecki-18/+229
Completed XID_Start and XID_Continue rules
2015-04-19Add proper XID_Start and XID_Continue rules and use CharPos for span ↵Florian Hahn-7/+676
comparison, closes #15679
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2015-03-01Bison grammar: parse higher ranked constraints in where clausesBrian Leibig-2/+12
2015-03-01Bison grammar: allow ExprQualifiedPath to have optional "as TRAIT_REF"Brian Leibig-13/+18
2015-03-01Bison grammar: support parsing default trait implsBrian Leibig-0/+8
2015-02-10Bison grammar: fix precedence with ranges followed by blocksBrian Leibig-1/+3
2015-02-10Bison grammar: refactor items to allow "extern crate" in stmtsBrian Leibig-8/+2
2015-02-10Bison grammar: add qualified path expressionsBrian Leibig-0/+31
2015-02-10Bison grammar: refactor index expressions to use ordinary expressions as ↵Brian Leibig-74/+12
indexes, remove index_expr and expr_norange
2015-02-08Auto merge of #22011 - fhahn:separate-parse-fail-tests, r=nikomatsakisbors-12/+20
This PR moves all `compile-fail` tests that fail at the parsing stage to a `parse-fail` directory, in order to use the tests in the `parse-fail` directory to test if the new LALR parser rejects the same files as the Rust parser. I also adjusted the `testparser.py` script to handle the tests in `parse-fail` differently. However during working on this, I discovered, that Rust's parser sometimes fails during parsing, but does not return a nonzero return code, e.g. compiling `/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` prints an error message, but returns status code 0. Compiling the same file without `-Z parse-only`, the same error message is displayed, but error code 101 returned. I'll look into that over the next week.
2015-02-06Move compile-fail tests that are rejected by the parser to parse-failFlorian Hahn-12/+20
2015-02-06Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnikManish Goregaokar-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-05testparser has long linesBrian Anderson-0/+3