Alessandro Coglio
d869e17033
[ABNF] Add character literals.
...
These are a new kind of literals that denote char values.
2021-05-12 18:41:58 -07:00
Alessandro Coglio
19d3bf0125
[ABNF] Add char type.
...
This is a new scalar type for characters.
2021-05-12 18:22:08 -07:00
Alessandro Coglio
7ac1de7353
[ABNF] Expand some doc and break some lines.
...
Explain the new syntax for circuit member variables.
Explain the tighter syntax for import declarations.
Keep lines to 80 columns max, so that they fit well in the figures in the LaTeX
document.
2021-05-07 21:33:15 -07:00
gluax
f32a1e9ddb
merge master, add a parser test to try and improve code coverage
2021-05-07 13:34:10 -04:00
gluax
29ca0d9a12
no empty import lists, star is a span, grammar fix
2021-05-05 16:10:51 -04:00
gluax
f4c9c2c1f0
update grammar readme after master merge
2021-05-05 13:18:13 -04:00
Alessandro Coglio
40a2d58a5a
[ABNF] Regenerate the markdown file.
2021-05-03 21:44:29 -07:00
Alessandro Coglio
8df12668c0
[ABNF] Fix (comment in) rule for identifiers.
...
Now the comment says that an identifier must not only be distinct from a
keyword, but also not be or start with 'aleo1'. Even though the grammar does not
capture these extra-grammatical requirements, we use comments to at least
mention them prominently.
2021-05-03 21:41:20 -07:00
Alessandro Coglio
5288f2e2f0
[ABNF] Fix rule for import declarations.
...
The final semicolon was missing.
See https://developer.aleo.org/developer/language/imports .
2021-05-01 18:41:56 -07:00
gluax
c8f1d9913c
rename grammar rule as suggested
2021-04-30 12:07:35 -04:00
Alessandro Coglio
2060d0d249
[ABNF] Improve documentation and layout.
...
Explain better variable and constant declarations.
Leave one blank line between the rules for variable and constant declarations
(not necessary for ABNF, but consistent with the rest of the file and actually
expected by the ABNF-to-LaTeX converter).
Limit lines to 80 columns, by putting the rules for variable and constant
declarations over two lines each, with proper indentation.
2021-04-29 18:16:30 -07:00
gluax
e0cf988261
hacky, but optional comma only allowed on last member variable
2021-04-29 15:22:17 -04:00
gluax
282cbb8840
optional comma at end of member variables
2021-04-29 14:10:22 -04:00
gluax
30d80d191f
require comma or semi-colon for now
2021-04-29 14:03:29 -04:00
Alessandro Coglio
ccbf36e6ec
Merge and resolve conflict on generated README.md.
...
(Since the file is generated, I've simply re-generated it to resolve the
conflict.)
2021-04-28 21:57:34 -07:00
Collin Chin
aaa42bba4c
Merge pull request #705 from AleoHQ/feature/485-defines
...
Feature/485 global consts
2021-04-28 14:06:40 -07:00
gluax
26d569c92a
declaration refactor as suggested
2021-04-28 12:41:42 -04:00
Alessandro Coglio
0882100526
[ABNF] Trim some documentation.
...
The removed text is more of an internal discussion that actual documentation, so
it seems best to keep things slightly more concise.
2021-04-27 22:45:27 -07:00
Alessandro Coglio
244e1a49ee
[ABNF] Fix typo in documentation.
2021-04-26 20:30:15 -07:00
gluax
e82be01d75
regen grammar README.md
2021-04-26 17:53:39 -04:00
gluax
438c20c14d
merge master, resolve conflicts, login test is failing
2021-04-26 14:43:21 -04:00
Alessandro Coglio
df6c4d586c
[ABNF] Use markdown in doc comments, and a few fixes.
...
By using markdown in the documentation comments of the grammar, the markdown
file generated from the grammar includes those markdown features in the text,
making it more readable and better-looking.
Also fixed a few typos in the documentation comments.
Also updated a few documentation comments that were out of date after making
changes to the grammar.
Also removed a now-obsolete grammar rule for "input" parameters of functions.
2021-04-21 22:33:52 -07:00
Alessandro Coglio
02f8736d03
[ABNF] Add some documentation.
...
For both uniformity and clarity of reference from other documentation comments,
add some documentation comments next to every single character definition.
No change to the grammar itself.
2021-04-21 21:56:27 -07:00
Alessandro Coglio
ac5ca5058a
[ABNF] Edit some doc comments for consistency.
...
No change to the grammar, just some edits in comments.
2021-04-21 10:44:40 -07:00
Alessandro Coglio
e08d1f7f36
[ABNF] Move two rules and add some comments.
...
This does not change the grammar, just its presentation in the file.
2021-04-21 10:39:37 -07:00
Collin Chin
25cabe57e2
Merge branch 'master' into feature/abnf-doc-update
2021-04-21 08:46:01 -07:00
Alessandro Coglio
66664ed35c
[ABNF] Regenerate the .md file.
2021-04-20 15:53:29 -07:00
Alessandro Coglio
964883a535
[ABNF] Add full copyright/licensing notice.
...
Make the change to the .txt file.
2021-04-20 15:52:08 -07:00
Alessandro Coglio
7cfa7d6a54
[ABNF] Move the format note to the end of the file.
...
Make this change on the .txt file.
2021-04-20 15:46:48 -07:00
collin
d5783bb0e0
fix license
2021-04-20 14:33:05 -07:00
collin
ce8f02eea0
Merge branch 'master' of https://github.com/AleoHQ/leo into feature/abnf-doc-update
2021-04-20 14:32:16 -07:00
collin
905c889a67
fix grammar readme
2021-04-20 14:25:12 -07:00
Alessandro Coglio
62932ceef2
[ABNF] Update documentation of format strings.
...
The documentation comments were out of date.
2021-04-19 23:24:43 -07:00
Collin Chin
543188049c
Move format note to bottom of abnf grammar
2021-04-16 12:30:58 -07:00
howardwu
4eac040178
chore(leo): bump version for new release
2021-04-15 13:49:42 -07:00
Collin Chin
08d37da2ef
Merge pull request #866 from AleoHQ/dependabot/cargo/abnf-0.11.3
...
Bump abnf from 0.10.2 to 0.11.3
2021-04-15 12:01:27 -07:00
collin
e98079fecf
rename abnf enum
2021-04-15 11:57:52 -07:00
dependabot-preview[bot]
3bc90da57c
Bump abnf from 0.10.2 to 0.11.3
...
Bumps [abnf](https://github.com/duesee/abnf ) from 0.10.2 to 0.11.3.
- [Release notes](https://github.com/duesee/abnf/releases )
- [Commits](https://github.com/duesee/abnf/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-15 10:29:26 +00:00
gluax
2f7ed99f76
pull max's required semi-colon branch to ensure sameness, MD file renamed to readme
2021-04-14 18:38:49 -04:00
gluax
6e595bd845
remove escaped double quote for now, address(...) removed
2021-04-14 17:43:02 -04:00
gluax
cf36a6bfe7
non-ambigious format strings, escaped double quotes allowed
2021-04-14 17:11:02 -04:00
gluax
1803925b08
semi-colon after return statements are required
2021-04-14 16:59:07 -04:00
gluax
bd9297499e
trailing comma in circuit construction expression
2021-04-14 16:19:55 -04:00
gluax
124235c15d
remove cast-expression from abnf for now
2021-04-14 16:17:57 -04:00
gluax
11c78da916
formatted string -> renamed format string
2021-04-14 16:15:27 -04:00
gluax
91634d6479
implicit input, removed from function input
2021-04-14 16:00:19 -04:00
Collin Chin
5b989db49d
Merge pull request #849 from AleoHQ/feature/exponentiation-associativity
...
[ABNF] Make ** right-associative.
2021-04-13 15:18:25 -07:00
howardwu
62ee4c3b8b
chore(leo): bump version for new release
2021-04-09 14:08:52 -07:00
howardwu
34a719d5a5
Update metadata for grammar toml
2021-04-09 13:50:39 -07:00
howardwu
513c6f00ac
Remove keyword from grammar toml
2021-04-09 13:49:11 -07:00
Alessandro Coglio
f26114afa5
[ABNF] Make ** right-associative.
...
As agreed on Slack.
2021-04-09 13:01:59 -07:00
damirka
45986d598c
adds %s to abnf converter and md
2021-04-08 10:45:04 +03:00
Collin Chin
68419f4e10
Merge pull request #835 from AleoHQ/feature/abnf-doc-improvements
...
[ABNF] Improve the documentation of the grammar and fix a rule
2021-04-07 14:26:52 -07:00
Alessandro Coglio
d7d15b1bc4
[ABNF] Regenerate markdown file.
2021-04-06 16:41:12 -07:00
Alessandro Coglio
f19af30f0e
[ABNF] Fix rule for affine group literals.
...
This was
affine-group-literal = "(" group-coordinate "," group-coordinate ")" %s"group"
instead of
affine-group-literal = "(" group-coordinate "," group-coordinate %s")group"
(note the different ending).
This change should have been part of the PR for whitespace in group literals,
but apparently I failed to do that, along with the other changes.
This commit rectifies that omission.
2021-04-06 16:39:07 -07:00
Alessandro Coglio
7da8a3c033
[ABNF] Improve consistency of documentation.
2021-04-06 16:37:18 -07:00
Alessandro Coglio
5f85308444
[ABNF] Improve the syntactic grammar section documentation.
...
Update some comments that were now out of date.
Clarify some text.
Fix some typos.
2021-04-06 16:35:47 -07:00
Alessandro Coglio
f0bac48093
[ABNF] Improve lexical grammar documentation.
...
Fix some typos, clarify some text, remove/update some obsolete references.
2021-04-06 16:03:28 -07:00
Alessandro Coglio
e035743f96
[ABNF] Improve naming convention section of documentation.
...
Some tweaks and some clarifications.
2021-04-06 15:19:41 -07:00
Collin Chin
e31bace4cb
Merge pull request #830 from AleoHQ/dependabot/cargo/abnf-0.10.2
...
Bump abnf from 0.10.1 to 0.10.2
2021-04-06 15:15:53 -07:00
Alessandro Coglio
fdaab572f9
[ABNF] Improve operator precedence section of documentation.
...
Fix a typo. Tweak some text layout.
2021-04-06 15:14:08 -07:00
Alessandro Coglio
11c0d60021
[ABNF] Improve structure section of documentation.
...
Make this more concise and clear by just presenting the lexical and syntactic
grammar as the way we define the Leo syntax, as opposed to discussing
alternatives like PEGs.
2021-04-06 14:59:52 -07:00
Alessandro Coglio
c7fb2905c0
[ABNF] Improve background section of documentation.
...
Explicate references to RFCs a bit.
Use the term 'sequence of terminals' instead of 'string' to avoid any confusion.
(Still use 'string' to refer to the actual strings in double quotes that are
part of the ABNF notation itself.)
2021-04-06 14:45:23 -07:00
Alessandro Coglio
742e3b33ea
[ABNF] Improve introduction section of documentation.
...
Update to say that grammar is no longer just a draft.
Put primary motivation and purpose of grammar first.
Mention use in formalization second, and slightly simplify that part, given that
the formalization is not public yet.
2021-04-06 14:43:55 -07:00
Alessandro Coglio
48635e5dbe
[ABNF] Fix typos in documentation.
2021-04-06 14:22:15 -07:00
dependabot-preview[bot]
751b42ab5b
Bump abnf from 0.10.1 to 0.10.2
...
Bumps [abnf](https://github.com/duesee/abnf ) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/duesee/abnf/releases )
- [Commits](https://github.com/duesee/abnf/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-06 10:36:36 +00:00
Alessandro Coglio
880f2cd200
[ABNF] Remove explicit author info, as discussed.
2021-04-05 21:55:19 -07:00
Alessandro Coglio
797e8ceffd
[ABNF] Tweak some layout.
...
Just for consistency with the rest of the file.
2021-04-05 21:54:18 -07:00
Alessandro Coglio
c0ea8798a2
[ABNF] Remove leftover reference.
...
This was uncovered by running the grammar through the ACL2 build: among other
things, the build checks that every nonterminal referenced in the right side of
each rule has a definition in the grammar.
2021-04-05 21:47:28 -07:00
Alessandro Coglio
5f875a4e93
[ABNF] Allow const self.
...
This still needed to be updated. The rules only supported self and mut self.
2021-04-05 21:27:37 -07:00
Collin Chin
9b9fe0b8c7
Merge pull request #822 from AleoHQ/dependabot/cargo/abnf-0.10.1
...
Bump abnf from 0.10.0 to 0.10.1
2021-04-05 21:13:23 -07:00
Alessandro Coglio
b535a5fde3
[ABNF] Allow spaces in affine group literals.
2021-04-05 13:55:05 -07:00
dependabot-preview[bot]
b51471a6a8
Bump abnf from 0.10.0 to 0.10.1
...
Bumps [abnf](https://github.com/duesee/abnf ) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/duesee/abnf/releases )
- [Commits](https://github.com/duesee/abnf/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-05 10:40:52 +00:00
gluax
7b4542ae54
pull latest abnf grammar
2021-03-31 13:41:12 -04:00
gluax
bcb0838e0d
last bit of clippy, push grammar md it should now be in the repo
2021-03-31 13:22:25 -04:00
collin
ba53d143ee
cargo clippy
2021-03-31 09:57:02 -07:00
gluax
34f0f1519a
merge latest abnf branch
2021-03-30 19:38:37 -04:00
gluax
67f9748866
depend on grammar branch, update parser to reflect
2021-03-29 15:03:04 -04:00
damirka
60f5a91bd9
changes grammar to leo-abnf, adds keywords and version
2021-03-26 18:50:11 +03:00
damirka
673997d975
adds grammar binary package for markdown conversion
2021-03-26 18:41:24 +03:00
gluax
f9d8f48577
clean up last bit of leftover access
2021-03-25 16:24:01 -04:00
gluax
001056f8bd
rename-access expression rule and parse function to postfix
2021-03-25 14:34:16 -04:00
gluax
3571fa2080
I think this is the best way to handle access_expressions in ABNF to reflect the parser
2021-03-24 15:25:56 -04:00
gluax
5ed7582b22
tentative parse expression grammar rule
2021-03-24 13:54:53 -04:00
gluax
5ae7771050
cast-expression in abnf
2021-03-24 13:38:45 -04:00
gluax
f71d77762c
comment out bitwise, mod, &&= and ||= for now
2021-03-24 13:28:01 -04:00
gluax
e0200ff789
tentative cast-expression abnf rule, refactor fuzzy rule to conditional expression
2021-03-24 12:33:52 -04:00
gluax
600cf120f9
idents in annotation name and for arguements, no white space between @ and annotation-name
2021-03-24 12:08:07 -04:00
gluax
fd52192d58
_ token in parser and symbol in abnf
2021-03-24 11:40:26 -04:00
gluax
0663227741
order tokens to try and match ABNF
2021-03-23 13:45:57 -04:00
gluax
1adc8cee14
consistent keyword order and names
2021-03-23 12:11:42 -04:00
gluax
bac54b21de
make sure we keep crlf for abnf grammar file
2021-03-22 15:12:33 -04:00
gluax
dde8ab59fa
initial commit, so I can open retroactive pr
2021-03-22 14:38:38 -04:00
Protryon
d400764e00
parser rewrite
2021-03-03 09:59:24 -08:00
howardwu
77a0af18fe
chore(leo): bump version for new release
2021-02-26 19:42:35 -08:00
gluax
f952da330c
re-add syntax in, then add deprecation warning for it
2021-02-16 15:33:31 -05:00
gluax
d549fda7b5
rebase and replace const keyword in tests
2021-02-16 14:19:20 -05:00
gluax
42bea9e93a
Merge branch 'master' of github.com:AleoHQ/leo into feature/515-eliminate-const-vars
2021-02-16 14:02:49 -05:00
Collin Chin
20a046bbbb
Merge pull request #643 from AleoHQ/feat/readme_license
...
Adds READMEs and LICENSEs to each Leo workspace member
2021-02-11 00:58:22 -08:00
bors[bot]
b72b5ac125
Merge #620
...
620: Feature/254 strengthen import rules r=collinc97 a=gluax
Grammar changes are a bit different than what was suggested in the original feature request #254 . However, it should be logically equivalent and I think makes more sense on the rust side.
Closes #254
Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 07:31:56 +00:00