Skip to content

Commit

Permalink
fixed an error with parsing lines like " default :"
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@327 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Oct 7, 2008
1 parent 25fd93a commit aadfca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions topics/extraction/html2bgf/html2bgf.py
Expand Up @@ -299,7 +299,7 @@ def readGrammar(fn):
a,b=parseLine(line)
if a:
# non-empty line
if len(a)==2 and a[-1]==':':
if len(a)==2 and a[-1]==':' and oldline[0]!=' ' and oldline[0]!='\t':
# new definition
if choices:
# flush the current one
Expand All @@ -309,7 +309,7 @@ def readGrammar(fn):
oneof = False
if not emph[0] and line.find('</em>')<0 and line.find('</i>')<0 and line.find('<code>')<0:
emph[0] = True
print 'Enforcing BNF mode (<em>) when new definition starts.'
print 'Enforcing BNF mode (<em>) when new definition of',name,'starts.'
pessimistic[2] += 1
elif len(a)==4 and a[0]==a[2] and a[1]==':' and a[-1]==':':
# new mingled definition
Expand Down

0 comments on commit aadfca2

Please sign in to comment.