Semantic thiab syntactic txhais li cas?
Semantic thiab syntactic txhais li cas?

Video: Semantic thiab syntactic txhais li cas?

Video: Semantic thiab syntactic txhais li cas?
Video: Martha Ratliff Brown Bag Talk 2013 2024, Kaum ib hlis
Anonim

Ib hom lus yog ib kab lus siv tau. Dab tsi ua rau kab lus siv tau? Koj ua tau rhuav tshem validity mus rau hauv ob yam: syntax thiab semantics . Lub sij hawm syntax hais txog grammatical qauv whereas lub sij hawm semantics hais txog cov lub ntsiab lus ntawm cov lus cim qhia nrog cov qauv ntawd.

Hauv qhov no, qhov txawv ntawm semantic thiab syntactic yog dab tsi?

Semantic tsom ntsoov rau lub ntsiab lus. Ntawm qhov tod tes, syntactic tsom rau kev npaj cov lus thiab kab lus thaum tsim kab lus. Raws li koj tau pom, muaj ib tug yuam sij qhov sib txawv ntawm semantic thiab syntactic raws li txhua tus tsom rau a txawv ib feem ntawm hom lus.

Tsis tas li ntawd, dab tsi yog qhov piv txwv ntawm semantics? Semantics yog txoj kev kawm thiab kev tshuaj xyuas seb hom lus siv figuratively thiab literally los tsim lub ntsiab lus. Semantics nrhiav kev piav qhia txog cov lus siv li cas-tsis yog qhia seb lawv yuav tsum siv li cas. Piv txwv ntawm Semantics : Ib qho khoom ua si thaiv tuaj yeem hu ua block, lub voos xwmfab, khoom ua si.

Kuj paub yog, dab tsi yog semantic thiab syntactic kev paub?

Kev paub txog semantic yog yam lus kev paub uas suav nrog cov ntsiab lus / cov lus. Syntactic lus kev paub yog cov kev paub ntawm yuav ua li cas cov lus tuaj yeem ua ke hauv cov kab lus muaj txiaj ntsig, kab lus, lossis cov lus hais.

Dab tsi yog qhov txawv ntawm syntax thiab semantic yuam kev?

Syntax yuam kev tshwm sim thaum lub sij hawm parsing ntawm input code, thiab yog tshwm sim los ntawm grammatically incorrect nqe lus. Semantic yuam kev tshwm sim thaum lub sij hawm ua tiav ntawm cov cai, tom qab nws tau parsed raws li grammatically raug. Cov no yuav tsum tsis yog nrog cov nqe lus tsim, tab sis nrog lawv txhais li cas.

Pom zoo: