Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concrete EBNF syntax of syrup #8

Open
zarutian opened this issue Dec 6, 2022 · 0 comments
Open

concrete EBNF syntax of syrup #8

zarutian opened this issue Dec 6, 2022 · 0 comments

Comments

@zarutian
Copy link

zarutian commented Dec 6, 2022

syrup_any := syrup_boolean | syrup_floatingpointnumber | syrup_integer | syrup_bytestring | syrup_textstring | syrup_symbol | syrup_dictionary | syrup_list | syrup_record | syrup_set
syrup_boolean := syrup_boolean_true | syrup_boolean_false
syrup_boolean_true :=tsyrup_boolean_false :=fsyrup_floatingpointnumber := syrup_floatingpointnumber_singleprecision | syrup_floatingpointnumber_doubleprecision
syrup_floatingpointnumber_singleprecision :=FIEEE754_singleprecision_floatingpointnumber_32bit_bigendian
syrup_floatingpointnumber_doubleprecision :=DIEEE754_doubleprecision_floatingpointnumber_64bit_bigendian
syrup_integer := syrup_posinteger | syrup_neginteger
syrup_posinteger := decimal_digits+syrup_neginteger := decimal_digits-decimal_digits := decimal_digit [ decimal_digits ]
decimal_digit := “0” | “1” | “2” | “3” | “4” | “5” | “6” | “7” | “8” | “9”
syrup_bytestring := length “:” bytes # $length many bytes
syrup_textstring := length “\”” utf8_string # $length many bytes but the bytes are interpreted as utf8 encoded text
syrup_symbol := length “‘“ utf8_string # $length many bytes but the bytes are interpreted as utf8 encoded text
length := decimal_digits
syrup_dictionary := “{“ syrup_dictionary_entries “}”
syrup_dictionary_entries := syrup_dictionary_entry [ syrup_dictionary_entries ]
syrup_dictionary_entry := syrup_dictionary_entry_key syrup_dictionary_entry_value
syrup_dictionary_entry_key := syrup_any
syrup_dictionary_entry_value := syrup_any
syrup_list := “[“ syrup_list_entries “]”
syrup_list_entries := syrup_any [ syrup_list_entries ]
syrup_record(label_txt) := “<“ syrup_record_label(label_txt) [ syrup_record_entries ] “>”
syrup_record_label(label_txt) := syrup_symbol(label_txt) # $label_txt is the utf8_text
syrup_record_entries := syrup_any [ syrup_record_entries ]
syrup_set := “#” [ syrup_set_entries ] “$”
syrup_set_entries := syrup_any [ syrup_set_entries ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant