Lines Matching refs:syntax

95 function syntax(sev,msg,a1,a2,a3,a4){var s={fname:parse.fname,istart:parse.istart+parse.line.index}
100 syntax(1,"Unsecure code")}
2762 if(isNaN(scale)||scale<=0.5){syntax(1,"Bad scale value in %%font")
2792 default:syntax(1,errs.bad_val,"%%"+xxxfont)
2875 if(isNaN(v)){syntax(1,"Bad integer value");break}
2881 if(isNaN(f)){syntax(1,errs.bad_val,'%%'+cmd)
2894 syntax(1,errs.bad_val,"%%chordalias")
2900 syntax(1,errs.bad_val,'%%'+cmd)
2906 case"print-leftmargin":syntax(0,"$1 is deprecated - use %%printmargin instead",'%%'+cmd)
2909 if(isNaN(f)){syntax(1,errs.bad_val,'%%'+cmd)
2922 case"fullsvg":if(parse.state!=0){syntax(1,errs.not_in_tune,"%%fullsvg")
2928 if(isNaN(Number(v[i]))){syntax(1,errs.bad_val,"%%gracespace")
2940 if(isNaN(f)||f<1||f>2){syntax(1,errs.bad_val,"%%"+cmd)
2955 if(isNaN(v)){syntax(1,errs.bad_val,'%%'+cmd)
2957 if(v<100){syntax(1,"%%staffwidth too small")
2960 if(v<2){syntax(1,"%%staffwidth too big")
2972 case"combinevoices":syntax(1,"%%combinevoices is deprecated - use %%voicecombine instead")
3012 if(!font){syntax(1,"Unknown font $1",'$'+fn[1]);return gene.curfont}
3118 if(!user.read_file){syntax(1,"No read_file support")
3120 if(include>2){syntax(1,"Too many include levels")
3123 if(!file){syntax(1,"Cannot read file '$1'",fn)
3215 if(eol==bol){if(parse.state==1){parse.istart=bol;syntax(1,"Empty line in tune header - ignored")}else if(parse.state>=2){end_tune()
3235 if(i<0){syntax(1,"No $1 after %%$2",end.slice(1),a[1]);parse.eol=eof
3241 switch(a[1]){case"select":if(parse.state!=0){syntax(1,errs.not_in_tune,"%%select")
3249 case"tune":if(parse.state!=0){syntax(1,errs.not_in_tune,"%%tune")
3276 case"voice":if(parse.state!=0){syntax(1,errs.not_in_tune,"%%voice")
3295 if(line0=='+'){if(!last_info){syntax(1,"+: without previous info field")
3299 switch(line0){case'X':if(parse.state!=0){syntax(1,errs.ignored,line0)
3332 case'm':if(parse.state>=2){syntax(1,errs.ignored,line0)
3335 if(!a||!a[2]){syntax(1,errs.bad_val,"m:")
3354 default:if("ABCDFGHNOSZ".indexOf(line0)>=0){if(parse.state>=2){syntax(1,errs.ignored,line0)
5566 default:syntax(1,"Unknown clef '$1'",clef_def)
5586 if(!note){if(i!=1||!score){syntax(1,errs.bad_transp)
5599 default:syntax(1,"Bad value '$1' in %%linebreak - ignored",item)
5603 if(!a){syntax(1,'Lack of starting [, ! or " in U: / %%user')
5611 if(k>=128){syntax(1,errs.not_ascii)
5616 default:syntax(1,"Bad user character '$1'",c)
5648 if(item.slice(-1)=='='&&!a.length){syntax(1,errs.bad_val,item)
5662 syntax(1,errs.bad_val,item)
5666 syntax(1,errs.bad_val,item)
5690 if(val==undefined){syntax(1,errs.bad_val,item[0])
5698 syntax(1,errs.bad_val,"%%voicescale")
5702 case"score=":if(cfmt.nedo){syntax(1,errs.notransp)
5709 case"shift=":if(cfmt.nedo){syntax(1,errs.notransp)
5713 case"sound=":if(cfmt.nedo){syntax(1,errs.notransp)
5724 syntax(1,"Bad %%stafflines value")
5732 syntax(1,"Bad %%staffnonote value")
5738 syntax(1,"Bad %%staffscale value")
5742 case"transpose=":if(cfmt.nedo){syntax(1,errs.notransp)
5745 if(val==undefined){syntax(1,errs.bad_transp)}else{curvoice.sndtran=val
5794 if(sf<-1){switch(param[0]){case'H':if(param[1].toLowerCase()!='p'){syntax(1,"Unknown bagpipe-like key")
5801 case'P':syntax(1,"K:P is deprecated");sf=0;s.k_drum=true;key_end=true
5830 syntax(1,"No accidental after 'exp'");exp=true}
5874 default:if(p[i]<='0'||p[i]>'9'){syntax(1,"Bad char '$1' in M:",p[i])
5882 if(p[i]=='/'){i++;if(p[i]<='0'||p[i]>'9'){syntax(1,"Bad char '$1' in M:",p[i])
5902 if(!val){syntax(1,"Bad duration '$1' in M:",p.substring(i))
5921 syntax(1,"Invalid note duration $1",c)}
5926 if(!c){syntax(1,"Unterminated string in Q:")
5952 if(!s.tempo||isNaN(s.tempo)){syntax(1,"Bad tempo value")
5974 if(!d2){syntax(1,"Bad L: value")
6015 default:syntax(0,"'$1:' line ignored",info_type)
6076 if(!c){syntax(1,"No end of repeat string")
6141 if(!a){syntax(1,errs.bad_val,"%%score")
6146 switch(e){case'[':if(parenth||brace+bracket>=2){syntax(1,errs.misplaced,'[');err=true
6150 case'{':if(parenth||brace||bracket>=2){syntax(1,errs.misplaced,'{');err=true
6154 case'(':if(parenth){syntax(1,errs.misplaced,'(');err=true
6163 case']':case'}':case')':syntax(1,"Bad voice ID in %%score");err=true
6169 switch(e){case']':if(!(flags_st&OPEN_BRACKET)){syntax(1,errs.misplaced,']');err=true
6173 case'}':if(!(flags_st&OPEN_BRACE)){syntax(1,errs.misplaced,'}');err=true
6177 case')':if(!(flags_st&OPEN_PARENTH)){syntax(1,errs.misplaced,')');err=true
6184 if(vids[vid]){syntax(1,"Double voice in %%score")}else{vids[vid]=true
6191 if(flags_st!=0){syntax(1,"'}', ')' or ']' missing in %%score");err=true}
6198 if(!a){syntax(1,"Unterminated string")
6224 if(pit<16){syntax(1,"'$1' is not a note",line.buffer[line.index-1])
6290 syntax(1,"End of slur without start")}
6366 i=c.charCodeAt(0);if(i>=128){syntax(1,errs.not_ascii)
6375 if(!c){syntax(1,"No end of decoration")
6426 syntax(1,"Misplaced dot")
6440 if(s.grace&&s.type!=C.NOTE){syntax(1,errs.bad_grace)
6442 if(tie_s&&s.type!=C.NOTE){syntax(1,"Bad tie")
6563 syntax(1,"Bad length of the macro sequence")
6597 if(idx>=128){syntax(1,errs.not_ascii)
6611 case'&':if(grace){syntax(1,errs.bad_grace)
6619 if(c>'0'&&c<='9'){if(grace){syntax(1,errs.bad_grace)
6625 if(c>'0'&&c<='9'){rplet=line.get_int();c=line.char()}else{syntax(1,"Invalid 'r' in tuplet")
6632 if(c=='&'){if(grace){syntax(1,errs.bad_grace)
6645 if(!s){syntax(1,errs.bad_char,c)
6659 if(!c){line.index=i;syntax(1,"No end of decoration")
6663 case'"':if(grace){syntax(1,errs.bad_grace)
6670 if('|[]: "'.indexOf(c_next)>=0||(c_next>='1'&&c_next<='9')){if(grace){syntax(1,errs.bar_grace)
6674 if(line.buffer[line.index+2]==':'){if(grace){syntax(1,errs.bad_grace)
6677 if(i<0){syntax(1,"Lack of ']'")
6707 case'<':if(!curvoice.last_note){syntax(1,"No note before '<'")
6709 if(grace){syntax(1,"Cannot have a broken rhythm in grace notes")
6716 case'{':if(grace){syntax(1,"'{' in grace note")
6726 case'|':if(grace){syntax(1,errs.bar_grace)
6731 if(!grace||!s){syntax(1,errs.bad_char,c)
6734 syntax(1,"Decoration ignored");grace.extra=grace.next;grace.extra.prev=null;grace.next=null;curvoice.last_sym=grace;grace=null
6741 default:syntax(1,errs.bad_char,c)
6756 syntax(1,"Start of slur without note")
6757 if(grace){syntax(1,"No end of grace note sequence");curvoice.last_sym=grace.prev;curvoice.last_note=last_note_sav
7690 s.sls.push({ty:sl.ty,note:{s:s2}})}else{syntax(1,"Lack of ending slur(s)")}}}
7704 case C.MREST:if(s.next&&s.next.type!=C.BAR){syntax(1,"Lack of bar after multi-measure rest")
7798 if(a.length<3){syntax(1,not_enough_p)
7809 if(!note){syntax(1,"Bad note in %%map")
7830 for(;i<a.length;i++){switch(a[i]){case"heads=":if(!a[++i]){syntax(1,not_enough_p)
7834 case"print=":case"play=":if(!a[++i]){syntax(1,not_enough_p)
7842 case"color=":if(!a[++i]){syntax(1,not_enough_p)
7850 syntax(0,"Mix of old and new transposition syntaxes");if(cfmt.transp!=undefined||curvoice.transp!=undefined||curvoice.shift!=undefined)
7918 if(isNaN(val)||val<-36||val>36){syntax(1,errs.bad_transp)
7952 if(isNaN(val)){syntax(1,errs.bad_val,"%%maxsysstaffsep")
7964 case"new":if(!multicol){syntax(1,"%%multicol new without start")
7969 case"end":if(!multicol){syntax(1,"%%multicol end without start")
7974 default:syntax(1,"Unknown keyword '$1' in %%multicol",param)
7981 if(isNaN(n)||n<-2||n>2){syntax(1,errs.bad_val,"%%ottava")
7990 if(!curvoice.last_sym){syntax(1,"%%repeat cannot start a tune")
7993 if(isNaN(n)||n<1||(curvoice.last_sym.type==C.BAR&&n>2)){syntax(1,"Incorrect 1st value in %%repeat")
7995 if(isNaN(k)){k=1}else{if(k<1){syntax(1,"Incorrect 2nd value in %%repeat")
8004 if(isNaN(h1)||isNaN(h2)||isNaN(len)){syntax(1,errs.bad_val,"%%sep")
8017 if(isNaN(val)||val<1){syntax(1,"Bad %%setbarnb value")
8027 if(isNaN(val)){syntax(1,"Bad %%staff value '$1'",param)
8034 if(st<0||st>nstaff){syntax(1,"Bad %%staff number $1 (cur $2, max $3)",st,curvoice.cst,nstaff)
8045 if(isNaN(val)){syntax(1,errs.bad_val,"%%staffbreak")
8057 if(isNaN(val)){syntax(1,errs.bad_val,"%%sysstaffsep")
8073 if(val==undefined){syntax(1,errs.bad_transp)
8095 if(isNaN(val)){syntax(1,errs.bad_val,"%%vskip")
8097 if(val<0){syntax(1,"%%vskip cannot be negative")
8123 if(j<0){syntax(1,"No </style> in %%beginsvg sequence")
8131 if(j<0){syntax(1,"No </defs> in %%beginsvg sequence")
8144 function generate(in_mc){var s,v,p_voice;if(parse.tp){syntax(1,"No end of tuplet")
8149 if(vover){syntax(1,"No end of voice overlay");get_vover(vover.bar?'|':')')}
8290 if(type=='|'||type==')'){if(!curvoice.last_note){syntax(1,errs.nonote_vo)
8293 if(!vover){syntax(1,"Erroneous end of voice overlay")
8295 if(curvoice.time!=vover.p_voice.time){syntax(1,"Wrong duration in voice overlay");if(curvoice.time>vover.p_voice.time)
8300 if(type=='('){if(vover){syntax(1,"Voice overlay already started")
8304 if(!curvoice.last_note){syntax(1,errs.nonote_vo)
8319 vover.time=s.time}else{if(curvoice!=vover.p_voice&&curvoice.time!=vover.p_voice.time){syntax(1,"Wrong duration in voice overlay")
8417 if(vid=='*'){syntax(1,"Cannot have V:* in tune body")
8449 if(!s){syntax(1,"+: symbol line without music")
8453 if(!s){syntax(1,"s: without music")
8462 if(!s){syntax(1,"Not enough measure bars for symbol line")
8468 if(i<0){syntax(1,c=='!'?"No end of decoration":"No end of guitar chord");i=p.length
8477 syntax(1,errs.bad_char,c)
8481 if(!s){syntax(1,"Too many elements in symbol line")
8498 if(!s){syntax(1,"+: lyric without music")
8503 if(!s){syntax(1,"w: without music")
8514 if(!s){syntax(1,"Not enough measure bars for lyric line")
8542 if(!s){syntax(1,"Too many words in lyric line")
8719 if(j<0){syntax(1,"No end of guitar chord")
8735 if(c!=','){syntax(1,"',' lacking in annotation '@x,y'");y_abs=0}else{y_abs=get_float()
8934 Abc.prototype.set_scale=set_scale;Abc.prototype.set_tsfirst=function(s){tsfirst=s};Abc.prototype.set_v_param=set_v_param;Abc.prototype.strwh=strwh;Abc.prototype.stv_g=function(){return stv_g};Abc.prototype.svg_flush=svg_flush;Abc.prototype.syntax=syntax;Abc.prototype.tunes=tunes