Commit Graph

11 Commits

Author SHA1 Message Date
Julien Fischer
6f57bd81e7 Fix an issue with moose.
extras/moose/moose.m:
    Emit an import of the string module since the generated code
    contains calls to string.format.

    Omit the import of std_util from the generated code as that is
    no longer required.

extras/moose/samples/cgram.moo:
    We no longer need to import the string module here.

extras/moose/tests/array_based.moo:
    Syntax and formatting cleanup
2022-03-20 20:06:39 +11:00
Julien Fischer
b863e8bf52 Fix a bug in moose.
extras/moose/moose.m:
    Fix an invalid conversion specifier in a call to string.format
    in the generated code.

extras/moose/samples/alpha.moo:
extras/moose/samples/cgram.moo:
extras/moose/samples/expr.moo:
extras/moose/samples/small.moo:
    Fix compilation problems.

    Clean-up and update syntax.
2022-03-20 17:05:31 +11:00
Julien Fischer
271a4fe483 Fix compilation of moose samples.
extras/moose/samples/alpha.moo:
extras/moose/samples/expr.moo:
     Replace calls to a now-deleted predicate.
2021-01-25 03:08:45 +11:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Sebastian Godelet
f9899940b7 Add .gitignore files to the extras/ directory
extras/.gitignore:
    Mercury ignores the --use-{grade}-subdir dir
    Mercury/** for git 1.8+ this recursively ignores all build files
    ignoring *.mh and *.init files
    *.err output files
    lib*.{dll|so|a|dylib} ignores target compiler library output
    *.jar ignores the Java grade output
    *.exe for Windows executables

extras/dynamic_linking/.gitignore:
    ignoring the copy of dl.m, name_mangle.m
    ignoring hello lib and dl_test* executables

extras/moose/samples/.gitignore:
    ignoring cgram.m small.m alpha.m expr.m which are
    generated from the .moo grammar files

extras/graphics/mercury_cairo/samples/.gitignore:
    ignoring *.png output and all executables

extras/**/.gitignore:
    In each sample/test/example folder the linux executable/test
    output is ignored
2014-02-27 16:58:43 +11:00
Julien Fischer
144145573e Don't use "cute" operator overloadings in moose - this allows us to compile it
Branches: main, 11.01

Don't use "cute" operator overloadings in moose - this allows us to compile it
with the non-C backends, some of which don't currently do the name mangling
which would otherwise be required.

Make the moose samples work again.

extras/moose/misc.m:
	Delete this module -- overloading operators in this way was
	never a particuarly good idea, especially as several of the
	overloaded operators (now) mean other things in Mercury.

extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
extras/moose/tables.m:
	Conform to the above changes.

	Import each module on its own line.

extras/moose/options.m:
	As above.

	Use the "multi" form of the option_ops type.

extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
	Make these examples work again -- as written the typeclass
	instance they contain does not satisfy the current restrictions
	on the form of instance arguments.

	Syntax and formatting cleanups.
2011-01-18 13:03:59 +00:00
Julien Fischer
cb218ccd57 Don't check for copyright messages in the moose samples.
extras/moose/samples/.nocopyright:
	Don't check for copyright messages in the moose samples.
2011-01-18 13:03:49 +00:00
Julien Fischer
f4589b4ab3 Fix some minor compilation problems in the extras distribution.
Estimated hours taken: 0.5
Branches: main, release

Fix some minor compilation problems in the extras distribution.

extras/curses/user.m:
extras/graphics/easyx/samples/bounce.m:
extras/graphics/easyx/samples/scribble.m:
	Conform to recent changes in the standard library.

extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
	Replace use of ':' as a module qualifier.
2006-05-31 06:29:11 +00:00
Julien Fischer
1afe830f57 Allow moose to parse conditional goals written using the if - then - else
Estimated hours taken: 1.
Branches: main.

Allow moose to parse conditional goals written using the if - then - else
notation.  This makes the code generated by moose less ugly when the `.moo'
file contains these type of goals.

extras/moose/mercury_syntax.m:
	Handle if-then-elses so that the generated code is less ugly.
	Fix some indentation.
	Fix some type declarations.
	Delete some dead code.

extras/moose/check.m:
extras/moose/grammar.m:
	Add some module qualifiers.

extras/moose/samples/alpha.moo:
	Use the alternative if-then-else notation.
2003-07-24 05:38:08 +00:00
Ralph Becket
ebc4eb0e3f I have changed moose to support user-specifiable parser state modes,
Estimated hours taken: 20
Branches: main

I have changed moose to support user-specifiable parser state modes,
rather than just in/out.  In particular, this means the parser state
can now include the IO state (this will be useful in conjunction with
lex).

I have also made some changes to the interface.

This change is not backwards compatible.

extras/moose/NEWS:
	Made a note of the fact that this change to moose is not
	backwards compatible.

extras/moose/README:
	Updated the documentation to reflect the new changes.

extras/moose/TODO:
	Removed this change from the TODO list.

extras/moose/grammar.m:
	Removed the unused EndToken argument from construct_grammar/5.

extras/moose/moose.m:
	Fairly extensive changes to support user-specifiable parser
	state modes.
	Changed the order of some arguments in .moo parse declarations.
	Changed the signature of action methods from preds to funcs.

extras/moose/samples/alpha.moo:
extras/moose/samples/expr.moo:
extras/moose/samples/cgram.moo:
extras/moose/samples/small.moo:
	Changed parse declarations to match new scheme.
	Changed the scan predicates in alpha.moo and expr.moo to be
	deterministic.

extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
	Changed to use the new interface.
2002-02-19 07:52:00 +00:00
Tyson Dowd
2a81aec951 Moose, the Mercury parser generator.
Estimated hours taken: 5 (+ unknown hours by Tom, + unknown hours by fjh)

Moose, the Mercury parser generator.

extras/moose/Mmakefile:
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/lalr.m:
extras/moose/mercury.m:
extras/moose/misc.m:
extras/moose/moose.m:
extras/moose/options.m:
extras/moose/tables.m:

extras/moose/BUGS:
	A list of known bugs.

extras/moose/TODO:
	Things that still need to be done.

extras/moose/README:
	Documentation for moose (thanks to fjh).

extras/moose/samples/Mmakefile:
extras/moose/samples/README:
extras/moose/samples/alpha.input:
extras/moose/samples/alpha.moo:
extras/moose/samples/cgram.moo:
extras/moose/samples/expr.input:
extras/moose/samples/expr.moo:
extras/moose/samples/small.moo:
extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
	Some samples.
2000-05-22 05:22:18 +00:00