/[climacs]/climacs/prolog-syntax.lisp
ViewVC logotype

Log of /climacs/prolog-syntax.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Tag:

Revision 1.39 - (view) (annotate) - [select for diffs]
Tue Jan 13 16:17:19 2009 UTC (5 years, 3 months ago) by crhodes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.38: +10 -3 lines
Diff to previous 1.38
Fix prolog syntax so that it's not hopelessly broken.

Whitespace at the end of the buffer was leading to all sorts of
confusion.  The syntax display still isn't good, but at least it's now
not crashy or useless.

Revision 1.38 - (view) (annotate) - [select for diffs]
Sun Jun 15 09:11:23 2008 UTC (5 years, 10 months ago) by thenriksen
Branch: MAIN
Changes since 1.37: +1 -1 lines
Diff to previous 1.37
Use ESA-UTILS:FORMAT-SYM for formatting symbols.

Revision 1.37 - (view) (annotate) - [select for diffs]
Mon Feb 11 22:50:27 2008 UTC (6 years, 2 months ago) by thenriksen
Branch: MAIN
Changes since 1.36: +11 -10 lines
Diff to previous 1.36
Updated to work with Drei changes. Now fast!

Revision 1.36 - (view) (annotate) - [select for diffs]
Wed Jan 16 18:15:18 2008 UTC (6 years, 3 months ago) by crhodes
Branch: MAIN
Changes since 1.35: +101 -139 lines
Diff to previous 1.35
First cut at syntax (lexeme) highlighting for prolog in the new
stroke/pump world.

There seem to be some cases where we're calling update-syntax with weird
values, which seem to cause confusion in other places.  Some potential
work-saving optimizations are disabled, but despite that it doesn't seem
to be too slow on SWI Prolog's library/url.pl file.

Revision 1.35 - (view) (annotate) - [select for diffs]
Tue Jan 15 16:54:37 2008 UTC (6 years, 3 months ago) by crhodes
Branch: MAIN
Changes since 1.34: +4 -3 lines
Diff to previous 1.34
Be careful to claim any succeeding whitespace as having been parsed in
update-syntax, but not the whole of the buffer if that hasn't actually
been done.

Marginal improvements to Export Paiprolog debugging command.

Revision 1.34 - (view) (annotate) - [select for diffs]
Thu Jan 10 10:48:24 2008 UTC (6 years, 3 months ago) by crhodes
Branch: MAIN
Changes since 1.33: +4 -1 lines
Diff to previous 1.33
Restore prolog2paiprolog

The source isn't clean, but its primary use right now is to check that
prolog syntax is vaguely working (since we don't have prolog syntax
highlighting).

Revision 1.33 - (view) (annotate) - [select for diffs]
Wed Jan 9 18:23:21 2008 UTC (6 years, 3 months ago) by crhodes
Branch: MAIN
Changes since 1.32: +10 -7 lines
Diff to previous 1.32
Possibly working incremental prolog parser.

(Syntax highlighting would be really nice...)

Revision 1.32 - (view) (annotate) - [select for diffs]
Fri Jan 4 13:08:22 2008 UTC (6 years, 3 months ago) by crhodes
Branch: MAIN
Changes since 1.31: +59 -53 lines
Diff to previous 1.31
Make prolog syntax work

(slowly, because we've lost the incremental nature: the buffer is fully
reparsed every time, even if that work is unnecessary.)

Revision 1.31 - (view) (annotate) - [select for diffs]
Thu Nov 16 15:05:23 2006 UTC (7 years, 5 months ago) by thenriksen
Branch: MAIN
Changes since 1.30: +34 -31 lines
Diff to previous 1.30
Fix Prolog-syntax (well, one can hope). Should now work with the crazy
Drei cursor-positioning code, and not defer redisplay to the method
for Fundamental syntax.

Revision 1.30 - (view) (annotate) - [select for diffs]
Sun Nov 12 16:06:06 2006 UTC (7 years, 5 months ago) by thenriksen
Branch: MAIN
Changes since 1.29: +247 -212 lines
Diff to previous 1.29
Make Climacs use Drei. There are known problems (apart from the docs
now being outdated):

* Some syntaxes have not been updated.
* Group functionality has been disabled.
* It's a large change and Climacs has no test suite. Bugs probably
  still remain.

But it should work nicely most of the time. Otherwise, you'll get a
full refund.

Revision 1.29 - (view) (annotate) - [select for diffs]
Sat Sep 2 21:43:56 2006 UTC (7 years, 7 months ago) by thenriksen
Branch: MAIN
CVS Tags: works-with-0_9_3
Changes since 1.28: +1 -1 lines
Diff to previous 1.28
Removed the Basic syntax and the `cache' slot in the `climacs-pane'
class. Fundamental syntax is now the default. This also required
moving some things around, but there has not been any functionality
changes.

Revision 1.28 - (view) (annotate) - [select for diffs]
Mon Jun 12 19:10:58 2006 UTC (7 years, 10 months ago) by thenriksen
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27
Major motion and editing functions and commands refactoring (see the
thread "paredit.lisp, regularization of motion commands, and more" on
climacs-devel for full details).

Breakage not found during testing, but still expected.

Revision 1.27 - (view) (annotate) - [select for diffs]
Sat May 6 19:51:04 2006 UTC (7 years, 11 months ago) by dmurray
Branch: MAIN
Changes since 1.26: +1 -1 lines
Diff to previous 1.26
Changed mark-visibility to region visibility. Turn it on
and off with Visible Region, for now.

Revision 1.26 - (view) (annotate) - [select for diffs]
Fri Mar 3 19:38:57 2006 UTC (8 years, 1 month ago) by tmoore
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25
Changes for running climacs in Allegro Common Lisp with Classic CLIM (tm). This includes a bunch of modern mode-related changes to symbol names and creating symbols and reordering of syntax rules definitions due to different compile-time behavior of defclass. The CLIM changes are suprisingly small

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Nov 1 12:31:52 2005 UTC (8 years, 5 months ago) by crhodes
Branch: MAIN
Changes since 1.24: +16 -5 lines
Diff to previous 1.24
Fix display of -1 and -1.0

Implement FIRST-LEXEME to get -(1,2) and - (1,2) right.

Revision 1.24 - (view) (annotate) - [select for diffs]
Tue Nov 1 10:45:45 2005 UTC (8 years, 5 months ago) by crhodes
Branch: MAIN
Changes since 1.23: +38 -4 lines
Diff to previous 1.23
Implement float-number tokenizing and parsing.  Only lightly tested.

Revision 1.23 - (view) (annotate) - [select for diffs]
Thu Oct 13 09:18:47 2005 UTC (8 years, 6 months ago) by crhodes
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22
Comment cut'n'pasteo fix

Revision 1.22 - (view) (annotate) - [select for diffs]
Mon Aug 15 23:31:22 2005 UTC (8 years, 8 months ago) by dmurray
Branch: MAIN
Changes since 1.21: +2 -14 lines
Diff to previous 1.21
Factored out cursor display from syntaxes to a display-cursor
method on basic-syntax. Also added a display-mark method,
a mark-visible-p slot on climacs-pane, and a command
com-toggle-visible-mark to turn display of the mark on
and off - useful for developing marking commands.

Revision 1.21 - (view) (annotate) - [select for diffs]
Fri May 27 13:25:01 2005 UTC (8 years, 10 months ago) by crhodes
Branch: MAIN
Changes since 1.20: +7 -5 lines
Diff to previous 1.20
Fix for multiple op/3 directives with the same operator.

Revision 1.20 - (view) (annotate) - [select for diffs]
Thu May 26 13:22:33 2005 UTC (8 years, 10 months ago) by crhodes
Branch: MAIN
Changes since 1.19: +146 -20 lines
Diff to previous 1.19
Support op/3 directives in Prolog syntax.

* *THIS-SYNTAX* bound in UPDATE-SYNTAX-FOR-DISPLAY so that parser rules
  can modify the syntax state;
* SLOT-MISSING bandage for encapsulating LTERM;
* Fragile OP/3-DIRECTIVE-FOO stuff to walk the parse-tree.

Despite those caveats, it seems to work.

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu May 26 08:31:53 2005 UTC (8 years, 10 months ago) by crhodes
Branch: MAIN
Changes since 1.18: +4 -2 lines
Diff to previous 1.18
OK, no-one complained too much, so I'm going ahead with the syntax
file-type changes discussed in <sqmzqrhbma.fsf@cam.ac.uk>:
DEFINE-SYNTAX's syntax is changed incompatibly.

Revision 1.18 - (view) (annotate) - [select for diffs]
Sat May 7 16:41:03 2005 UTC (8 years, 11 months ago) by crhodes
Branch: MAIN
Changes since 1.17: +97 -20 lines
Diff to previous 1.17
Improve the Prolog tokenizer.  We now recognize
  * binary constants: 0b...
  * octal constants:  0o...
  * hexadecimal constants: 0x...
  * char-code constants: 0'<quoted-char>
  * escaped characters in quoted strings:
    ** meta escapes such as \"
    ** control escapes such as \a
    ** numeric escapes such as \0177\ and \xabcd\
    ** "" (within a char-code-string) and '' (within a quoted-atom)

Revision 1.17 - (view) (annotate) - [select for diffs]
Sun Apr 17 15:44:39 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.16: +16 -6 lines
Diff to previous 1.16
Deal with #\Tabs a bit better.
* although ISO doesn't mandate it, treat a Tab as whitespace, because
  let's face it, it's pretty useless not to;
* deal with #\Tab also in lexemes (necessary whether or not Tab is whitespace
  in Prolog syntax, where lexemes can contain whitespace characters);

Highlight "" char-code-lists in green

Revision 1.16 - (view) (annotate) - [select for diffs]
Tue Apr 12 21:48:19 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.15: +6 -1 lines
Diff to previous 1.15
make variable-terms show up in yellow.

Band-aid for functor/canonical-name business with lists, curly lists and
char-code-lists.

Revision 1.15 - (view) (annotate) - [select for diffs]
Wed Apr 6 17:00:20 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.14: +42 -35 lines
Diff to previous 1.14
Because of multiline tokens, we must redraw on various criteria other than
the ink and face changing: specifically, if the substring of the token
that we are to draw is different, we cannot simply displace or replay an
output record.

Revision 1.14 - (view) (annotate) - [select for diffs]
Wed Apr 6 16:23:21 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.13: +13 -16 lines
Diff to previous 1.13
Use left-recursion rather than right-recursion.  (Be careful to adjust the
DISPLAY-PARSE-TREE methods when making changes of this kind!)

A couple of minor fixes (well, minor except that they were totally broken
before)

* VALID-LEX, not (undefined) I;
* MARK>, not MARK>=, to get Backspace right.

Revision 1.13 - (view) (annotate) - [select for diffs]
Wed Apr 6 11:54:27 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.12: +29 -21 lines
Diff to previous 1.12
Implement incremental lexing.

The contract is that

* UPDATE-SYNTAX notes the latest possible position that is known to be valid.

* UPDATE-SYNTAX-FOR-DISPLAY, within the display bounds, attempts to revalidate
  the previous lex if possible, or relex if not.  After
  UPDATE-SYNTAX-FOR-DISPLAY has finished, the entirety of the remaining
  lexemes are known valid (all the rest have been deleted).

This may be wrong: it may be that, since lexing takes essentially no time
at all, the whole buffer should be relexed each time.

Revision 1.12 - (view) (annotate) - [select for diffs]
Wed Apr 6 09:30:19 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.11: +2 -0 lines
Diff to previous 1.11
implement CANONICAL-NAME for commas (fixes crash on "1,2")

Revision 1.11 - (view) (annotate) - [select for diffs]
Tue Apr 5 20:28:29 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.10: +5 -8 lines
Diff to previous 1.10
Enable incremental-redisplay / updating-output

This isn't as big a win as it could be, because of the invalidation of
lexemes without attempting to splice in the results of a previous lex.
(see FIXME comments in update-syntax-for-redisplay)

Revision 1.10 - (view) (annotate) - [select for diffs]
Mon Apr 4 21:00:42 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9
Just comment fixups

Revision 1.9 - (view) (annotate) - [select for diffs]
Mon Apr 4 19:09:49 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.8: +16 -10 lines
Diff to previous 1.8
get [] and {} more right.

* separate SYNTACTIC-LEXEME from CANONICAL-NAME, which latter is defined
  also for empty-list and curly-brackets as well as NAMEs and OPs

NOTE NOTE NOTE: giving [] and {} canonical names of "[]" and "{}" is
in fact wrong, as '[]' and '{}' should not be equal to [] and {}.

Revision 1.8 - (view) (annotate) - [select for diffs]
Mon Apr 4 15:46:31 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.7: +25 -8 lines
Diff to previous 1.7
Support multiline lexemes.  Only tested on comment lexemes, but it does seem
to work.

Revision 1.7 - (view) (annotate) - [select for diffs]
Mon Apr 4 13:39:40 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.6: +14 -1 lines
Diff to previous 1.6
Whoops.  Unsaved change, which logically belongs to the previous commit.
(uncomment out :around method on display-parse-tree to prevent display of
off-the-screen stuff)

Revision 1.6 - (view) (annotate) - [select for diffs]
Sat Apr 2 22:13:26 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.5: +135 -45 lines
Diff to previous 1.5
Prolog syntax improvements:

* PRINT-OBJECT for PROLOG-LEXEMEs, for less pain while debugging;

* OPEN-CT production rule from OPEN-CT-LEXEME, because we can;

* rework the lexer a bit.  Now UPDATE-SYNTAX just invalidates the lex
  as it invalidates the parse, and UPDATE-SYNTAX-FOR-DISPLAY relexes as
  far as it needs to;

* we need operator-compound-lterm and subclasses, because we cannot
  create multiple nonterminals from one rule: returning
    (make-instance 'lterm :term (make-instance 'foo ...))
  from a production rule leaves some slots in the FOO unfilled;

* note my own bafflement as to why an apparently infinitely-recursive
  production doesn't recurse infinitely.  It can be fixed when needed,
  but why isn't it triggering?

This version still gets various aspects of multiline lexemes wrong, but
it's a lot better than before.

Revision 1.5 - (view) (annotate) - [select for diffs]
Thu Mar 31 10:16:23 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4
Fix a typo: "brakets" -> "brackets"

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Mar 27 16:58:20 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.3: +9 -3 lines
Diff to previous 1.3
an alpha numeric char in ISO prolog is either alphanumericp or eql to #\_

Revision 1.3 - (view) (annotate) - [select for diffs]
Sun Mar 27 16:22:45 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2
Parse [A,B]-style lists correctly.

Revision 1.2 - (view) (annotate) - [select for diffs]
Sun Mar 27 15:59:00 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Changes since 1.1: +165 -276 lines
Diff to previous 1.1
"Concision is equivalent to powerfulness"

Delete about 120 lines by defining define-prolog-rule to wrap around
ADD-RULE.

More known lacunae
  * [A,B] does not parse properly.
  * quoted tokens confuse the incremental lexer.

Revision 1.1 - (view) (annotate) - [select for diffs]
Sun Mar 27 14:29:32 2005 UTC (9 years ago) by crhodes
Branch: MAIN
Add a half-baked half-finished ISO Prolog syntax.

Known internal lacunae:
  * does not handle quotations correctly:
    ** fails to recognize '' as an escaped quote character (and similarly
       for other quote characters);
    ** fails to canonize quoted atoms; will fail to identify the operator
       ; from the quoted atom ';';
    ** does not contain any logic for backslash-escaped data.
  * does not implement parsing floating point numbers.
  * comments before directives get italicized.
  * way too long.  Expect some refactoring.

Known suboptimal interactions with the syntax framework:
  * parses the entire buffer at every keystroke; incremental parsing caused
    a problem at some point and has not (yet) been restored.
  * displays the entire buffer at every keystroke.
  * the incremental lexer gets confused in the presence of comments.
    (see forthcoming mail to climacs-devel)

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.5