Skip to content

Commit

Permalink
Updates for FAME metamodel reference types
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhrmanator authored Feb 2, 2021
1 parent 7a4bbc4 commit dc79346
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mse.pegjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Quick-and-dirty PEG.js grammar from EBNF published in https://arxiv.org/abs/2011.10975
// Quick-and-dirty PEG.js grammar from EBNF published in https://www.researchgate.net/publication/265428652_MSE_and_FAMIX_30_an_Interexchange_Format_and_Source_Code_Model_Family
// Try it with https://pegjs.org/online
// Created by Christopher Fuhrman
Root = d:Document ? {return {nodes:d}}
Expand All @@ -22,11 +22,11 @@ TRUE = _ t:"true" _ {return t}
FALSE = _ t:"false" _ {return t}
ELEMENTNAME "ElementName" = _ letter ( letter / digit ) * ( "." letter ( letter / digit ) * ) _ {return text().trim()}
SIMPLENAME "Simplename" = _ letter ( letter / digit ) * _ {return text().trim()}
TYPENAME "Typename" = 'Object' / 'Number' / 'Boolean' / 'String'
TYPENAME "Typename" = 'Object' / 'Character' / 'Number' / 'Fraction' / 'String' / 'Symbol' / 'Boolean'
INTEGER "Integer" = _ digit + _ {return text().trim()}
NUMBER = _ "-" ? digit + ( "." digit + ) ? ( ( "e" / "E" ) ( "-" / "+" ) ? digit + ) ? _ {return text().trim()}
STRING = _ ( "\'" [^'] * "\'" ) + _ {return text().trim()}
letter = [A-Za-z]
digit = [0-9]
_ = space*
space "whitespace" = [ \t\n\r]
space "whitespace" = [ \t\n\r]

0 comments on commit dc79346

Please sign in to comment.