Skip to content

Commit

Permalink
Allow underscore in constructor names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gohla committed Oct 1, 2021
1 parent f3a26eb commit a5253d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion org.metaborg.meta.lang.spt/syntax/spt/ATerm.sdf3
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TermAnno.Anno = <<PreTerm>{<{PreTerm ", "}*>}>
// Lists conflict with fragment markers, so they can't be ATerm in our grammar
TermList.List = <[<{Term ", "}*>]>

Term.Appl = <<ID>(<{MidTerm ", "}*>)>
Term.Appl = <<CONS>(<{MidTerm ", "}*>)>
Term.Tuple = <(<{MidTerm ", "}*>)>
Term.Int = <<INT>>
Term.String = <<ASTRING>>
Expand Down
2 changes: 2 additions & 0 deletions org.metaborg.meta.lang.spt/syntax/spt/Common.sdf3
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ lexical syntax
MODULE-PATH = {MODULE-ID "/"}+
LANG = [a-zA-Z] [a-zA-Z0-9\-\_]*
SORT = [a-zA-Z] [a-zA-Z0-9\-\_]*
CONS = [a-zA-Z] [a-zA-Z0-9\-\_]*
STRAT = [a-zA-Z] [a-zA-Z0-9\-\_\']*
INT = "-"? [0-9]+
STRING = "\"" StringChar* "\""
Expand All @@ -33,6 +34,7 @@ lexical restrictions
MODULE-ID -/- [a-zA-Z0-9\-\_\']
LANG -/- [a-zA-Z0-9\-\_\']
SORT -/- [a-zA-Z0-9\-\_\']
CONS -/- [a-zA-Z0-9\-\_\']
STRAT -/- [a-zA-Z0-9\-\_\']
INT -/- [0-9]

Expand Down

0 comments on commit a5253d1

Please sign in to comment.