Support LBT formula in ltl2tgba.html.
Suggested by Joachim Klein. * wrap/python/ajax/spot.in: Try parse_lbt() when parse() fails. * NEWS: Mention it.
This commit is contained in:
parent
e78548ebae
commit
e997676c3e
2 changed files with 17 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!@PYTHON@
|
||||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et
|
||||
# Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -405,9 +405,15 @@ pel = spot.empty_parse_error_list()
|
|||
f = spot.parse(formula, pel, env)
|
||||
|
||||
if pel:
|
||||
unbufprint('<div class="parse-error">')
|
||||
err = spot.format_parse_errors(spot.get_cout(), formula, pel)
|
||||
unbufprint('</div>')
|
||||
# Try the LBT parser in case someone is throwing LBT formulas at us.
|
||||
pel2 = spot.empty_parse_error_list()
|
||||
g = spot.parse_lbt(formula, pel2, env)
|
||||
if pel2:
|
||||
unbufprint('<div class="parse-error">')
|
||||
err = spot.format_parse_errors(spot.get_cout(), formula, pel)
|
||||
unbufprint('</div>')
|
||||
else:
|
||||
f = g
|
||||
|
||||
# Do not continue if we could not parse anything sensible.
|
||||
if not f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue