<!doctype html><html><head><metacharset="utf-8"><title>CodeMirror: Pig Latin mode</title><linkrel="stylesheet"href="../../lib/codemirror.css"><scriptsrc="../../lib/codemirror.js"></script><scriptsrc="pig.js"></script><linkrel="stylesheet"href="../../doc/docs.css"><style>.CodeMirror{border:2pxinset#dee;}</style></head><body><h1>CodeMirror: Pig Latin mode</h1><form><textareaid="code"name="code">-- Apache Pig (Pig Latin Language) Demo
/*
This is a multiline comment.
*/
a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray);
b = GROUP a BY (x,y,3+4);
c = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z;
STORE c INTO "\path\to\output";
--
</textarea></form><script>vareditor=CodeMirror.fromTextArea(document.getElementById("code"),{lineNumbers:true,indentUnit:4,mode:"text/x-pig"});</script><p> Simple mode that handles Pig Latin language.
</p><p><strong>MIME type defined:</strong><code>text/x-pig</code> (PIG code)
</html>