This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const url = require('url'); | |
const head = { | |
'Content-Type': 'text/html;charset=utf-8', | |
}; | |
const HtmlHead = response => { | |
response.write('<head>'); | |
response.write("<title>Webservice - Fametro</title>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System; | |
//Credits to dwilches - SerialCommUnity | |
//Source >> https://github.com/DWilches/SerialCommUnity | |
public class MessageListener : MonoBehaviour { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string expanded = grammar.Flatten("#Test#"); //Aqui passa a regra que vai ser chamada para gerar a string | |
//assumindo que a gramatica tenha a regra chamada "Test" | |
print(expanded); //Mostrando a string gerada. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Grammar grammar = new Grammar(); //Usando o construtor publico para poder gerar o objeto. | |
//Criar as regras dentro do objeto grammar. | |
grammar.PushRules("Test", new string[] { "Hello, #name#!" }); | |
grammar.PushRules("name", new string[] { "Max", "world", "Pedro", "Henrique" }); |