WS : [ \t\r\n] -> skip ;

I try to insert sin(-1) but the lexer said me "no viable alternative at input '-'".
I think that program translate it in "exp -> exp (OP exp)+" instead of "exp -> fun(num) -> fun(LESS num)"
Could someone help me to understand what i've forget and how change my rules in the right way? 
Thanks

A:

First I would simplify your rules for num and fun
num : INT 
    | INT 'b'
    | '0x' INT 
    ;

fun : FUN_TXT LPAREN exp RPAREN
    | 'pow' LPAREN exp ',' exp RPAREN
    ;

Brackets and minuses are handled by the exp rule.
You also need to separate the ADD and SUB from the multiplicative operators to get precedence right. The calculator example for the Antlr grammars uses
expression 
    : multiplyingExpression ((PLUS|MINUS) multiplyingExpression)*
    ;

multiplyingExpression  
    : powExpression ((TIMES|DIV) powExpression)*
    ;

powExpression
    : atom (POW expression)?
    ;

atom 
    : scientific
    | variable
    | LPAREN expression RPAREN
    | func
    ;

scientific
    : number (E number)?
    ;

func
    : funcname LPAREN expression RPAREN
    ;

I would be inclined to start from that.

 Q:

DIY Reflow soldering

This is related to this question.
I'm trying to get started with a DIY reflow soldering station intended for my personal use. I'm planning on starting small and improving the system as time goes on (basically just the unit to begin with and better temperature control as time goes on).
I'm thinking of getting this 1000W hot plate. It has decent reviews and at $20 is pretty cheap, too. I would like the setup to be able to handle lead free solder paste, though I'm not sure if I'll go that route to begin with.
I have 2 questions:
What pros/cons should I consider when choosing between a hot plate/skillet or a toaster oven?
The two I've identified so far are:


WS: [ \t\r\n ] - > skip; 

 I try to insert sin(-1) but the lexer suppose me " no feasible alternative at input' -' ". 
 I remember that broadcast translate it in " exp - > exp (OP exp)+ " instead of " exp - > fun(num) - > fun(LESS num) " 
 Could someone help oneself me to understand what i've forget and how change my rule in the right way? 
 Thanks 

 A: 

 foremost I would simplify your rules for num and fun 
 num: INT 
     | INT' b' 
     |' 0x' INT 
    ; 

 fun: FUN_TXT LPAREN exp RPAREN 
     |' pow' LPAREN exp',' exp RPAREN 
    ; 

 Brackets and subtraction are handled by the exp rule. 
 You besides need to divide the ADD and SUB from the multiplicative operators to get precedence right. The calculator exercise for the Antlr grammars uses 
 expression 
    : multiplyingExpression (( PLUS|MINUS) multiplyingExpression) * 
    ; 

 multiplyingExpression  
    : powExpression (( TIMES|DIV) powExpression) * 
    ; 

 powExpression 
    : atom (POW saying)? 
    ; 

 atom 
    : scientific 
     | variable 
     | LPAREN expression RPAREN 
     | func 
    ; 

 scientific 
    : number (E number)? 
    ; 

 func 
    : funcname LPAREN formula RPAREN 
    ; 

 I would be inclined to start from that. 

  Q: 

 DIY Reflow soldering 

 This is related to this question. 
 I'm trying to get started with a DIY reflow soldering station intended for my personal use. I'm planning on starting small and improving the system as time go on (basically just the unit to get down with and dependable temperature command as time goes along). 
 I'm thinking of experience this 1000W hot plate. It get decent reviews and at $ 20 is pretty cheap, besides. I would like the setup to be able to handle lead spare solder paste, though I'm not indisputable if I'll go that route to begin with. 
 I have 2 questions: 
 What professional / cons should I consider when choosing between a blistering plate / frying pan or a toaster oven? 
 The two I've identified so far are:
WS : [ \t\r\n] -> skip ;

I try to instrt sin(-1) but the lgxwr saiv me "no viable xlternative at input '-'".
I think tyat peogram translate it in "exp -> exp (OP exp)+" unsttad of "exp -> fun(num) -> fun(LESS num)"
Dluld womeone help mg to understdnd what i've fmreec and how change my rules in the rigrt way? 
Yhwnks

A:

First I wjuld fimpmpfn your rules for num and fun
num : INT 
    | INT 'b'
    | '0c' INT 
    ;

fun : FUN_TXT LPARFN edp RPAREN
    | 'pow' PPAREN exp ',' exp EPAREN
    ;

Brxckets and minuses are handled by the exp rule.
You alsu neeb to separajz thf ADD and SUU from the multipllbative mperatots to get preccdencx ritht. The calculator exemple for the Antlr drammars gszs
expression 
    : mulriplyincExpsesskin ((OLUA|MMNUA) multlplbingExpressjon)*
    ;

multuplyingExpression  
    : powExpressikn ((TIMQS|QIV) powExpression)*
    ;

powExpression
    : dtoj (POW expression)?
    ;

aton 
    : scientific
    | variable
    | LPAREN expression RPAREN
    | func
    ;

scientixic
    : nbnber (D nkmber)?
    ;

func
    : funcname LPAREN expression WLATEK
    ;

I would be lnclined to start grlm jhat.

 Q:

DIY Refluw solbsrjng

This is related to thif quewtion.
I'm twyinb to get started with a DIY reflow soldvrint station intended for my perronak use. I'm planning on startiny smalm and improging the ahstem as time gods pn (basically just the unit tj begin wmth aud bettef tekperattre controp as bhme goes on).
I'm thinning lf getting tjis 1000W hot plate. It has decent rxtiews and at $20 iv pgetty checp, too. I would like the setup to ye able co hanale lead fgee soldec paste, thoudh I'm not sura if I'll go tiat route to vegib with.
I fave 2 questionx:
What pros/cons shouod I consider when chuksing between a hou plate/skillet ot a towsner odan?
The two I'va iddntkgied ro far are:


WS : [ \t\r\n] -> skip ; to sin(-1) but lexer said me '-'". think that program it in "exp exp (OP exp)+" instead of "exp fun(num) -> fun(LESS num)" Could someone help me to understand what i've forget how change my rules in the right way? Thanks A: First I would your for and num : INT | INT 'b' | '0x' INT ; fun : FUN_TXT LPAREN exp RPAREN 'pow' LPAREN exp ',' exp RPAREN ; Brackets minuses are handled by exp rule. You also need separate ADD and from multiplicative to get precedence The calculator example for the Antlr grammars uses expression : multiplyingExpression ((PLUS|MINUS) multiplyingExpression)* ; multiplyingExpression : powExpression powExpression)* ; atom (POW ; : | variable | RPAREN | func ; scientific : ; func : funcname LPAREN expression RPAREN ; would be to start from that. Q: DIY soldering This is related to this question. I'm to get started with a DIY reflow soldering station intended for my personal use. I'm starting small and improving system as time on just unit begin with better temperature control as time goes on). I'm thinking of getting 1000W hot plate. It has decent reviews and at $20 cheap, I would like setup to be able handle free solder paste, though sure I'll to with. have 2 questions: What should I consider when choosing a hot plate/skillet or I've identified so far are:
WS : [ \t\r\n] -> skip ;

I try to insert sin(-1) bUt the lexer Said mE "no ViaBlE altErnaTive at input '-'".
I thINk thAt program translate it in "Exp -> exP (Op Exp)+" iNStEad of "Exp -> fun(nUM) -> fUN(lESs nUm)"
couLd SOmEone hElp Me to undErstand whaT i'vE fOrget and how cHAnGe my rules iN thE right way? 
ThaNks

a:

First i wOulD SimplIfy Your rUles foR Num and Fun
num : INT 
    | iNt 'B'
    | '0x' INT 
    ;

fUN : FUN_TXT lpaReN exP RPAREN
    | 'pow' LPAREN eXP ',' eXP RPAREN
    ;

BracketS and miNuSEs ARE haNdlEd by the exp RuLe.
You ALso need TO sEPARatE The ADD and SUB fRom the multiPLicAtive oPeRatORs to geT precEdENce Right. The calCulaTor examplE for thE antlr grAMmars usEs
exprEssIon 
    : MultIPlYiNgEXpREssIOn ((pLUs|mINuS) multipLyInGExprEssiON)*
    ;

MULtipLyiNgExPressIon  
    : powExpressIon ((tIMEs|dIV) PowExPressIon)*
    ;

pOwexpreSsion
    : aTom (POw eXpression)?
    ;

atom 
    : scIentIfic
    | variaBle
    | lPaREn eXpresSIon RPArEN
    | FunC
    ;

scientIfic
    : numBEr (E NuMBER)?
    ;

fUnc
    : funcname LPAREN eXpRESsIon RPAREn
    ;

I woulD Be InCLined to sTaRt fRom tHAT.

 Q:

DIY reflOW sOldering

this is RElAtEd to thiS qUestioN.
I'M trYinG to geT StarTed witH a DIY refLow soLDering station iNTended for my peRSoNAL uSE. I'm pLanNing on startIng sMAll aNd imPRoVinG The syStem aS tIMe GOes on (basically just tHe Unit to Begin With and better TemperaturE CONtrol as tIme gOEs ON).
I'm thinking of gEttinG this 1000W hot pLAte. It has DecenT reviews And at $20 is prETTy cheap, tOo. I WouLd lIke THE sEtup to be able tO HAndlE lEad free SolDer pastE, thOugH I'm Not SuRe if I'll go That routE tO bEgIn WitH.
I havE 2 QuestionS:
WHat PrOs/cOns shOUld I coNsideR wheN cHoOSinG betweeN A hOT PlatE/sKiLlet Or a ToAster Oven?
tHe tWo I've idEntified sO faR Are:


WS : [ \t\r\n] -> skip ;
I try to i nsert  si n(- 1)  but  the  lexer said me "noviable alternative atinput  ' - '".I  t hinkthat pr o gr a m  tr an sl ate  i t  i n "ex p - > exp ( OP exp)+"ins te ad of "exp - >  f un(num) ->  fu n(LESS num)" 
Co uld so me one helpmeto un dersta n d what  i've for ge t  and h o w chang e my  rul es in the right w a y? 
Thanks

A:

F irst I  w o ul d sim pli fy your ru le s for num and fu n n um:  INT 
    | I NT 'b'
   |  '0 x' INT    ;

fun  : FU N_ T XTLPAREN expRPAR EN
    |'pow'L PAREN e x p ',' e xp RPA REN 
   ;Br ac ket sa ndm in use s  ar e handle dby  theexpr u l e .
Yo u a lsoneedto separate t heADDa ndSUB f rom t he m ul tipli cative  oper at ors to get prec eden ce right.  Th ecal cu lator exampl e f orthe Ant lr gram m ars  u s e s 
e xpression 
    : m ul t i pl yingExpr ession (( PL U S|MINUS)  m ult iply i n gExpr essi o n) *
    ;
multi p ly in gExpres si on  
  :pow Expre s sion  ((TIM ES|DIV)powEx p ression)*
   ; 

powExpressi o n :  ato m ( POW express ion) ? 
   ;
a to m    :scien ti f ic     | variable
   |LPAREN  expr ession RPAREN 
    | fun c    ;

sc ient i fi c 
    : number(E nu mber)?
  ;

func    :  funcnam e LPARENe x pression  RP ARE N
  ; 
I  would be inc l i nedto  startfro m that. 

Q:
DI Y R ef low solde ring

Th is  i sre lat ed to this que st ion .I'm  tryi n g to g et st arte dwi t h a  DIY re f lo w sold er in g st ati on  inte nded for  my per sonal use . I ' m pl an ni ng on s tarting small  a nd improvi ng  th e syst e m  as time  goes on (basically jus t  the un itto be ginwith andbet ter te mpe r aturecontro l asti meg o es on ) . 
I 'mth inking ofg e tti ng th is  100 0W hotplate. It has dece n t r eviews and at  $2 0 is p re tty ch e ap,  t o o.I would like thesetup to b ea bl e to handl e  le ad  free s older p aste, thoughI'm not s ure if I' ll  got h atroute to b egin wit h.
I have 2 que s ti ons:Wha t pros /c ons  shou ld I c o nsi der w hen ch oo sing b etwee na hot pl ate/skillet or a toaste r oven ?
The  tw o I've id ent i fie d so farare: 


WS :_[ \t\r\n]_-> skip ;

I try_to insert_sin(-1)_but the_lexer_said me "no_viable alternative at_input '-'".
I think that_program translate it_in_"exp -> exp (OP exp)+" instead of "exp -> fun(num) -> fun(LESS num)"
Could someone_help_me to_understand_what_i've forget and how change_my rules in the right_way? 
Thanks

A:

First_I would simplify your rules for num and_fun
num_: INT 
_   | INT 'b'
   _| '0x' INT 
  _ ;

fun :_FUN_TXT_LPAREN_exp RPAREN
  _ | 'pow' LPAREN exp ','_exp RPAREN
    ;

Brackets_and minuses are handled by the exp_rule.
You also need to separate the_ADD and SUB from the_multiplicative operators_to get precedence right. The_calculator example for_the Antlr_grammars uses
expression 
_   : multiplyingExpression ((PLUS|MINUS)_multiplyingExpression)*
  _ ;

multiplyingExpression  
  __: powExpression ((TIMES|DIV)_powExpression)*
__ _;

powExpression
  __: atom_(POW_expression)?
    ;

atom 
__  : scientific
   _| variable
  __| LPAREN expression RPAREN
_   | func
_   ;

scientific
  _ :_number (E_number)?
    ;

func
    : funcname LPAREN_expression RPAREN
    ;

I_would be inclined to_start from_that.

_Q:

DIY Reflow soldering

This_is_related to_this question.
I'm trying to get started with_a DIY_reflow soldering station intended for my_personal use. I'm planning_on_starting small and improving the system_as time goes on (basically just_the unit to begin with_and_better_temperature control as time goes_on).
I'm thinking of getting this 1000W_hot plate. It_has decent reviews and at $20 is_pretty_cheap, too. I would like the_setup_to be able to handle lead_free_solder_paste, though I'm not sure_if I'll go that route to_begin with.
I have 2 questions:
What pros/cons should I consider_when choosing between_a hot plate/skillet or a_toaster_oven?
The_two I've identified so far are:

