mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-11 03:45:33 +00:00
Estimated hours taken: 1 Corrected a bug in moose whereby it failed to return a non-zero exit code when a critical error occured. Converted moose to modern syntax with regard to DCGs and State Variables and module delimters such as '__' vs '.'. Converted some indentation to four spaces. extras/moose/check.m: extras/moose/grammar.m: extras/moose/lalr.m: extras/moose/mercury_syntax.m: extras/moose/misc.m: extras/moose/moose.m: extras/moose/options.m: extras/moose/tables.m: As above. extras/moose/BUGS Noted a new bug. extras/moose/TODO Corrected a spelling mistake.
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
|
|
Copyright (C) 2009 The University of Melbourne
|
|
|
|
Doesn't handle epsilon productions properly -- throws an exception
|
|
when computing the action table:
|
|
|
|
Uncaught Mercury exception:
|
|
Software Error: map__lookup: key not found
|
|
Key Type: grammar.symbol
|
|
Key Functor: terminal/1
|
|
Value Type: list.list(lalr.item)
|
|
Stack dump follows:
|
|
0 pred exception.throw/1-0 (erroneous) (exception.m:304)
|
|
1 pred require.error/1-0 (erroneous) (require.m:101)
|
|
2 pred require.report_lookup_error/3-0 (erroneous) (require.m:89)
|
|
3 pred map.lookup/3-0 (det) (map.m:469)
|
|
4 pred tables.IntroducedFrom__pred__actions2__119__6/8-0 (det) (tables.m:121)
|
|
5 2* pred list.foldl2/6-0 (det) (list.m:1356 and others)
|
|
7 pred tables.actions2/12-0 (det) (tables.m:119)
|
|
8 pred tables.actions1/10-0 (det) (tables.m:91)
|
|
9 pred tables.actions/8-0 (det) (tables.m:72)
|
|
10 pred moose.process_2/8-0 (det) (moose.m:200)
|
|
11 pred moose.process/3-0 (det) (moose.m:133)
|
|
12 pred moose.main2/4-0 (det) (moose.m:59)
|
|
13 pred moose.main/2-0 (det) (moose.m:36)
|
|
|
|
Doesn't give good error messages if :- action is used but the rule
|
|
doesn't exist.
|
|
|
|
Doesn't give good error messages for misplaced semicolons.
|
|
|
|
:- rule init_declarator(init_declarator).
|
|
init_declarator(init_declarator(D, Init)) --->
|
|
declarator(D) ; { Init = no }.
|
|
|
|
If there is some error in the grammar moose will write an empty or broken .m
|
|
file. This may be a problem in some cases.
|
|
|