Skip to content

Gramatica

Lucas de Macedo Terças edited this page Aug 17, 2017 · 15 revisions

Gramática da linguagem em EBNF

  • Start = {Media | Port | Context | Region | Link};

  • Letras = "a" | "b" | "c" | ... | "z" | "A" | "B" | "C" | ... | "Z";
  • Numeros = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
  • Simbolos = "@" | "_" | "/" | "." | "%" | "," | "-";
  • AlphaNumeric = {Letras | Numeros};
  • AlphaNumericSymbols = {Letras | Numeros | Simbolos};

  • String = '"' AlphaNumeric '"';
  • Property = AlphaNumeric "=" String;
  • Refer = "refer" "=" AlphaNumeric;

  • Port = "port" AlphaNumeric AlphaNumeric;

  • Region = "region" AlphaNumeric {Region | Property} "end";

  • Media = "media" AlphaNumeric {Area | Refer | Property} "end";

  • Area = "area" AlphaNumeric {Property} "end";

  • Context = "context" AlphaNumeric {Port | Property | Media | Context | Link} "end";

  • Link = {Condition*} {Action} "end";

  • Condition = AlphaNumeric AlphaNumeric ("and" | "do");

  • Action = ActionMedia ActionParam "end";

  • ActionMedia = AlphaNumeric AlphaNumeric;

  • ActionParam = AlphaNumeric "=" String;

Clone this wiki locally