(function(){function e(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n])}function t(e,t){if(!Array.prototype.indexOf){var n=e.length;while(n--)if(e[n]===t)return!0;return!1}return e.indexOf(t)!=-1}function n(e,t,n){var r=e.getCursor(),i=n(e,r),s=i;/^[\w$_]*$/.test(i.string)||(i=s={start:r.ch,end:r.ch,string:"",state:i.state,className:i.string==":"?"pig-type":null});if(!o)var o=[];o.push(s);var u=d(i,o);return u=u.sort(),u.length==1&&u.push(" "),{list:u,from:CodeMirror.Pos(r.line,i.start),to:CodeMirror.Pos(r.line,i.end)}}function r(e){return n(e,s,function(e,t){return e.getTokenAt(t)})}function d(n,r){function l(e){e.indexOf(u)==0&&!t(i,e)&&i.push(e)}function d(t){t==":"?e(f,l):(e(c,l),e(h,l),e(p,l),e(a,l),e(f,l),e(s,l),e(o,l))}var i=[],u=n.string;if(r){var v=r.pop(),m;v.type=="variable"?m=v.string:v.type=="variable-3"&&(m=":"+v.string);while(m!=null&&r.length)m=m[r.pop().string];m!=null&&d(m)}return i}CodeMirror.pigHint=r,CodeMirror.registerHelper("hint","pig",hinter);var i="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE",s=i.split(" "),o=i.toLowerCase().split(" "),u="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP",a=u.split(" "),f=u.toLowerCase().split(" "),l="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER",c=l.split(" ").join("() ").split(" "),h=l.toLowerCase().split(" ").join("() ").split(" "),p="BagSize BinStorage Bloom BuildBloom ConstantSize CubeDimensions DoubleAbs DoubleAvg DoubleBase DoubleMax DoubleMin DoubleRound DoubleSum FloatAbs FloatAvg FloatMax FloatMin FloatRound FloatSum GenericInvoker IntAbs IntAvg IntMax IntMin IntSum InvokeForDouble InvokeForFloat InvokeForInt InvokeForLong InvokeForString Invoker IsEmpty JsonLoader JsonMetadata JsonStorage LongAbs LongAvg LongMax LongMin LongSum MapSize MonitoredUDF Nondeterministic OutputSchema PigStorage PigStreaming StringConcat StringMax StringMin StringSize TextLoader TupleSize Utf8StorageConverter".split(" ").join("() ").split(" ")})();