One of the pieces I needed was a tool called a parser generator. في التصميم بواسطة الحاسوب واحد البرامج التي اردتها كانت اداة
An example would be the monadic Parsec parser for Haskell. كمثال محلل بارسيك الأحادي لـ هاسكل .
In both cases the parser will stop. وفي كلتا الحالتين فإن المحلل سيتوقف.
A predictive parser is a recursive descent parser that does not require backtracking. الترميز الخطي عبارة عن ترميز تكراري نموذجي لا يتطلب تراجع.
A predictive parser is a recursive descent parser that does not require backtracking. الترميز الخطي عبارة عن ترميز تكراري نموذجي لا يتطلب تراجع.
It takes a full parser to recognize such patterns in their full generality. يأخذ محلل كامل للتعرف على هذه الأنماط في عموميتها بشكل عام.
Notice how closely the predictive parser below mirrors the grammar above. لاحظ مدى التشابه الكبير بين الترميز الخطي في الأسفل مع القواعد النحوية في الأعلى.
The parser thus ends with '$' on both its stack and its input stream. وبذلك ينتهي المحلل بـ '$' على حد سواء في مكدس وتدفق المدخلات.
If they are not equal the parser reports an error and stops. إذا لم يكونا متساويين فإن المحلل سوف يفيد أن هناك ثمة خطأ ثم يتوقف.
The parser will use this rule for reduction exactly when it has accepted the whole input string. المحلل سوف يستخدم هذه القاعدة للتخفيض بالضبط متى يتم قبول سلسلة الإدخال.