Abstract :
Action grammar is a grammar with action symbols appearing in the right part of production rules, which can be used to implement semantic analyzer automatically. An action symbol represents the name of a semantic routine. Implementation of action grammar relies on specific parsing methods, such as LL(K), recursive-descent or LR, and so on. However, these parsing methods have their own restrictions on grammars, therefore, in order to accomplish these parsing methods certain equivalent transformations have been done to make the grammars meet the restrictions. This paper has proposed an implementation technique of LL action grammar, which requires no transformation to the original grammar. Our approach includes following steps: parsing the input string with back-tracking and producing the parsing paths for each non-terminal symbol, then constructing LL parsing table with the parsing paths obtained, finally conducting semantic analysis with LL parsing table. The main contribution of this paper is that non-backtracking semantic analyzer has been achieved without making any transformations to the grammar.
Keywords :
grammars; LL parsing table; parsing methods; parsing paths; semantic analysis; semantic analyzer; unrestricted LL action grammar; Computer science; Data structures; Educational institutions; Optimizing compilers; Production; Program processors; Software systems; Springs; Tree data structures; LL action grammar; grammar transformation; semantics analysis; syntax analysis;