Coder Social home page Coder Social logo

kmyacc's Introduction

kmyacc version 4.1.4 (2006/02/15)
=================================

kmyacc is an LALR(1) parser generator, hopefully compatible with
AT&T yacc.

Features:

- Generates smaller table than Yacc/Berkeley yacc/Bison.

- Supports multi-language (currenly C and Java).


INSTALL
=======

(1) You must have ANSI C compiler.

(2) Read Makefile and change macro BIN and PARLIB appropriately.

(3) Type

       make
       make install


HOW TO USE
==========

Command

    kmyacc foo.y

generates parser code "y.tab.c", same as original yacc.

Command

    kmyacc Foo.jy

creates parser code "Foo.java", its class name is "Foo".

Synopsys:

  kmyacc [ -dvltani ] [ -b X ] [ -p XX ] [ -m MODEL ] [ -L LANG ] grammar

Options:

  -d Makes definition file named y.tab.h, which contains definitions of
     token values and the type of semantic stack. (C language only)

  -v Generates file y.output which contains human-readable parser
     tables and diagnostics.

  -l Does not insert #line control directives in y.tab.c.

  -t Generates debugging code.  Compiling with -DYYDEBUG option gives
     the same effect.

  -a Makes semantic actions individual functions rather than blocks in
     one switch statement.  This option is useful if your compiler
     can not compile big functions/methods.

  -b X
     Uses X rather than y as the prefix of generated filenames.
     X.tab.c for C, X.java for Java.

  -p XX
     Uses XX rather than yy as the prefix of global identifiers in
     the parser.  You can avoid collision of external symbols when
     you use more than one parser in the same program by specifing
     this option. (C language only)

  -m MODEL
     Uses file MODEL as prototype of parser code. When defaulted, file
     /usr/local/lib/kmyacc.LANG.parser is taken, where LANG is a host
     language name deduced from source file extension(.y/.jy), or one
     specified by -L switch explicitly.

  -L LANG
     Specifies LANG as host programming language. c,java,javascript,perl
     are available.

  -n
     Allows referencing semantic values by name.

  -i
     Inhibits referencing semantic values by $$, $1, $2 form.

Environment
   KMYACCPAR	Prototype file name. Same as -m option.



Differences between kmyacc and AT&T yacc
========================================

-  Options -b, -p, -a, -m, -L added

-  Bison's %expect, %pure_parser statement added

-  Treat // as comment

-  Following obsolete features deleted
	o literal tokens surrounded by "
	o \left, \right etc.
	o %<, %>, %binary, %2, %0, %=

-  YYBACKUP macro not supported




COPYRIGHT
=========

Copyright (C) 1987,1989,1992,1993,2005,2006  MORI Koichiro.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


CONTACT
=======
Bug reports, suggestions, patches are welcome.
Please send email to:

  MORI Koichiro <[email protected]>  

kmyacc's People

Contributors

kazuho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.