diff --git a/.gitignore b/.gitignore index 87f544ac..32669623 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store project.xcworkspace xcuserdata +.swiftpm/ build/* speed/* @@ -9,7 +10,6 @@ test.* testing/* *.o -markdown_parser.c /markdown /multimarkdown /multimarkdown.exe @@ -34,3 +34,9 @@ peg-0.1.4/leg *.pbxuser *.perspectivev3 + +MultiMarkdown.xcodeproj/project.xcworkspace/ +MultiMarkdown.xcodeproj/xcuserdata/ + +/peg-0.1.9/peg +/peg-0.1.9/leg diff --git a/Configuration/Common.xcconfig b/Configuration/Common.xcconfig deleted file mode 100644 index 0697c15b..00000000 --- a/Configuration/Common.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Release10.6+.xcconfig -// MultiMarkdown -// -// Created by Daniel Jalkut on 7/29/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator -ARCHS[sdk=macosx*] = i386 x86_64 -ARCHS[sdk=iphoneos*] = armv6 armv7 -ARCHS[sdk=iphonesimulator*] = i386 -VALID_ARCHS[sdk=iphoneos*] = armv6 armv7 -VALID_ARCHS[sdk=iphonesimulator*] = i386 -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym -GCC_VERSION = -GCC_VERSION[arch=x86_64] = com.apple.compilers.llvm.clang.1_0 -DEPLOYMENT_POSTPROCESSING = YES -MACOSX_DEPLOYMENT_TARGET = 10.4 -MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.6 -GCC_MODEL_TUNING = G5 -OTHER_CFLAGS = -DSTANDALONE_MAC_VERSION=1 -GCC_PREFIX_HEADER = MarkdownMacPrefix.h -GCC_PRECOMPILE_PREFIX_HEADER = YES diff --git a/Configuration/Debug.xcconfig b/Configuration/Debug.xcconfig deleted file mode 100644 index 127bbef2..00000000 --- a/Configuration/Debug.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// -// Release10.6+.xcconfig -// MultiMarkdown -// -// Created by Daniel Jalkut on 7/29/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#include "Common.xcconfig" - -ARCHS = i386 ppc x86_64 -ONLY_ACTIVE_ARCH = YES -GCC_OPTIMIZATION_LEVEL = 0 -DEPLOYMENT_POSTPROCESSING = NO diff --git a/Configuration/Release.xcconfig b/Configuration/Release.xcconfig deleted file mode 100644 index 4cd5500b..00000000 --- a/Configuration/Release.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -// -// Release10.6+.xcconfig -// MultiMarkdown -// -// Created by Daniel Jalkut on 7/29/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#include "Common.xcconfig" - -COPY_PHASE_STRIP = NO -STRIP_INSTALLED_PRODUCT = YES -SEPARATE_STRIP = YES diff --git a/Configuration/Release10.6+.xcconfig b/Configuration/Release10.6+.xcconfig deleted file mode 100644 index 97265025..00000000 --- a/Configuration/Release10.6+.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Release10.6+.xcconfig -// MultiMarkdown -// -// Created by Daniel Jalkut on 7/29/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#include "Release.xcconfig" - -ARCHS = i386 x86_64 -GCC_VERSION = -GCC_VERSION[arch=x86_64] = com.apple.compilers.llvm.clang.1_0 -DEPLOYMENT_POSTPROCESSING = YES -MACOSX_DEPLOYMENT_TARGET = 10.6 -COPY_PHASE_STRIP = NO -STRIP_INSTALLED_PRODUCT = YES -SEPARATE_STRIP = YES -GCC_MODEL_TUNING = G5 -OTHER_CFLAGS = -DSTANDALONE_MAC_VERSION=1 -GCC_PREFIX_HEADER = MarkdownMacPrefix.h -GCC_PRECOMPILE_PREFIX_HEADER = YES diff --git a/Makefile b/Makefile deleted file mode 100644 index d623f3da..00000000 --- a/Makefile +++ /dev/null @@ -1,192 +0,0 @@ -VERSION=3.7 -PROGRAM=multimarkdown - -UNAME=$(shell uname) - -ifeq ($(UNAME), Darwin) -define FINALNOTES - ***\n\ -*** WARNING: Since you are on Darwin, you probably meant to use the Xcode\n\ -*** version instead.\n\ -*** It produces a version of the binary that is capable of running on\n\ -*** multiple versions of Mac OS X and on PPC, i386, or x86_64 machines.\n\ -*** -endef -else - FINALNOTES=Build complete. -endif - -CFLAGS ?= -Wall -O3 -include GLibFacade.h -I ./ -D MD_USE_GET_OPT=1 -D_GNU_SOURCE -ifeq ($(UNAME), SunOS) - CC = gcc - # Use of is valid only in a c99 compilation environment - CFLAGS += --std=c99 -else - CFLAGS += -ansi -endif - -# make ARCH=ppc -# build for ppc architecture - Only works on machines with PPC compilation support installed -# probably only Snow Leopard machines with Xcode 3 installed -ifeq ($(ARCH), ppc) - CFLAGS += -arch ppc -endif - -# make ARCH=i386 -# build for i386 architecture - useful with older machines or those running 10.4? -ifeq ($(ARCH), i386) - CFLAGS += -arch i386 -endif - -CFLAGS ?= -Wall -O3 -ansi -D_GNU_SOURCE # -flto for newer GCC versions -OBJS=markdown_parser.o markdown_output.o markdown_lib.o GLibFacade.o utility_functions.o parsing_functions.o odf.o -PEGDIR=peg-0.1.9 -LEG=$(PEGDIR)/leg$(X) -PKG_CONFIG = pkg-config - -ALL : $(PROGRAM) - -$(LEG): $(PEGDIR) - CC=gcc $(MAKE) -C $(PEGDIR) - -%.o : %.c markdown_peg.h - $(CC) -c $(CFLAGS) -o $@ $< - -$(PROGRAM) : markdown.c $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) $< - @echo "$(FINALNOTES)" - -markdown_parser.c : markdown_parser.leg $(LEG) markdown_peg.h parsing_functions.c utility_functions.c - $(LEG) -o $@ $< - -.PHONY: clean test - -clean: - rm -f markdown_parser.c $(PROGRAM) $(OBJS); \ - rm -rf mac_installer/Package_Root/usr/local/bin; \ - rm -rf mac_installer/Support_Root; \ - rm mac_installer/Resources/*.html; \ - rm windows_installer/README.txt; \ - rm windows_installer/multimarkdown.exe; \ - rm windows_installer/multimarkdown.xml.backup; \ - rm windows_installer/LICENSE.html; \ - rm -rf mac_installer/*.pkg - -distclean: clean - $(MAKE) -C $(PEGDIR) clean - -test: $(PROGRAM) - cd MarkdownTest; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --Tidy --Flags="--compatibility" - -mmd-test: $(PROGRAM) - cd MarkdownTest; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --testdir=MultiMarkdownTests - -compat-test: $(PROGRAM) - cd MarkdownTest; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --testdir=CompatibilityTests --Flags="--compatibility" - -latex-test: $(PROGRAM) - cd MarkdownTest; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --testdir=MultiMarkdownTests --Flags="-t latex" --ext=".tex"; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --testdir=BeamerTests --Flags="-t latex" --ext=".tex"; \ - ./MarkdownTest.pl --Script=../$(PROGRAM) --testdir=MemoirTests --Flags="-t latex" --ext=".tex" - -xslt-test: $(PROGRAM) - cd MarkdownTest; \ - ./MarkdownTest.pl --Script=/bin/cat --testdir=MultiMarkdownTests \ - --TrailFlags="| ../Support/bin/mmd2tex-xslt" --ext=".tex"; \ - ./MarkdownTest.pl --Script=/bin/cat --testdir=BeamerTests \ - --TrailFlags="| ../Support/bin/mmd2tex-xslt" --ext=".tex"; \ - ./MarkdownTest.pl --Script=/bin/cat --testdir=MemoirTests \ - --TrailFlags="| ../Support/bin/mmd2tex-xslt" --ext=".tex"; \ - -leak-check: $(PROGRAM) - valgrind --leak-check=full ./multimarkdown TEST.markdown > TEST.html - - -# Compile multimarkdown.exe and prep files necessary for installer - -windows: $(PROGRAM) - rm *.o - /usr/bin/i586-mingw32msvc-cc -c -Wall -O3 -ansi markdown*.c GLibFacade.c - /usr/bin/i586-mingw32msvc-cc markdown*.o GLibFacade.o \ - -Wl,--dy,--warn-unresolved-symbols,-lglib-2.0 -o multimarkdown.exe - -# Get readme and other files ready -# This has to be run before BitRock can create the installer -win-prep: - mkdir -p windows_installer - cp multimarkdown.exe windows_installer/ - cp README.markdown windows_installer/README.txt - ./multimarkdown LICENSE > windows_installer/LICENSE.html - -# After building the installer with BitRock, this creates a properly named -# zipfile -# You have to move the .exe from BitRock to the windows_installer folder -# Also - create a portable mmd zipfile -win-installer: - zip -r windows_installer/MultiMarkdown-Windows-$(VERSION).zip windows_installer/MMD-windows-$(VERSION).exe -x windows_installer/MultiMarkdown*.zip - cd windows_installer; zip -r MultiMarkdown-Windows-Portable-$(VERSION).zip *.bat multimarkdown.exe README.txt LICENSE.html -x install_multimarkdown.bat - -# Build Mac installer - requires that you first build multimarkdown itself, -# either with "make" or with Xcode - -mac-installer: - mkdir -p mac_installer/Package_Root/usr/local/bin - mkdir -p mac_installer/Support_Root/Library/Application\ Support - cp multimarkdown scripts/mmd* mac_installer/Package_Root/usr/local/bin/ - ./multimarkdown README > mac_installer/Resources/README.html - ./multimarkdown mac_installer/Resources/Welcome.txt > mac_installer/Resources/Welcome.html - ./multimarkdown LICENSE > mac_installer/Resources/License.html - ./multimarkdown mac_installer/Resources/Support_Welcome.txt > mac_installer/Resources/Support_Welcome.html - git clone Support mac_installer/Support_Root/Library/Application\ Support/MultiMarkdown - cd mac_installer; /Applications/PackageMaker.app/Contents/MacOS/PackageMaker \ - --doc "Make Support Installer.pmdoc" \ - --title "MultiMarkdown Support Files" \ - --version $(VERSION) \ - --filter "\.DS_Store" \ - --filter "\.git" \ - --id net.fletcherpenney.MMD-Support.pkg \ - --domain user \ - --out "MultiMarkdown-Support-Mac-$(VERSION).pkg" \ - --no-relocate; \ - /Applications/PackageMaker.app/Contents/MacOS/PackageMaker \ - --doc "Make OS X Installer.pmdoc" \ - --title "MultiMarkdown" \ - --version $(VERSION) \ - --filter "\.DS_Store" \ - --filter "\.git" \ - --id net.fletcherpenney.multimarkdown.pkg \ - --out "MultiMarkdown-Mac-$(VERSION).pkg" - cd mac_installer; zip -r MultiMarkdown-Mac-$(VERSION).zip MultiMarkdown-Mac-$(VERSION).pkg - cd mac_installer; zip -r MultiMarkdown-Support-Mac-$(VERSION).zip MultiMarkdown-Support-Mac-$(VERSION).pkg - -# Requires installation of the platypus command line tool to create -# a drag and drop application for Mac OS X - -drop: - mkdir drag; rm -rf drag/*.app; \ - /usr/local/bin/platypus -D -a 'MMD to LaTeX' -o 'Text Window' -p '/bin/sh' -V '3.0' -I 'net.fletcherpenney.MMD2LaTeX' -X '*' -T '****|fold' -N 'PATH=/usr/local/bin' -c 'scripts/mmd2tex' 'drag/MMD2LaTeX.app'; \ - /usr/local/bin/platypus -D -a 'MMD to HTML' -o 'Text Window' -p '/bin/sh' -V '3.0' -I 'net.fletcherpenney.MMD2HTML' -X '*' -T '****|fold' -N 'PATH=/usr/local/bin' -c 'scripts/mmd' 'drag/MMD2HTML.app'; \ - /usr/local/bin/platypus -D -a 'MMD to OPML' -o 'Text Window' -p '/bin/sh' -V '3.0' -I 'net.fletcherpenney.MMD2OPML' -X '*' -T '****|fold' -N 'PATH=/usr/local/bin' -c 'scripts/mmd2opml' 'drag/MMD2OPML.app'; \ - /usr/local/bin/platypus -D -a 'MMD to ODF' -o 'Text Window' -p '/bin/sh' -V '3.0' -I 'net.fletcherpenney.MMD2ODF' -X '*' -T '****|fold' -N 'PATH=/usr/local/bin' -c 'scripts/mmd2odf' 'drag/MMD2ODF.app'; - -# Create HTML and PDF (if latex installed) documentation -docs: $(PROGRAM) - cd documentation; \ - ../Support/Utilities/mmd_merge.pl index.txt > manual.txt; \ - mkdir -p ../manual; \ - ../multimarkdown manual.txt > ../manual/index.html; \ - ../multimarkdown -b -t latex manual.txt; \ - latexmk -pdf manual.tex; \ - latexmk -c manual.tex; \ - mv manual.pdf ../manual/mmd-manual.pdf; \ - rm ../documentation/manual.t*; - - -# For me to push updated documentation to my github site -docs-live: docs - cd manual; git add mmd-manual.pdf index.html; \ - git commit -m "update manual"; git push origin gh-pages; \ diff --git a/MarkdownTest b/MarkdownTest index e5ac8554..cb01b1d4 160000 --- a/MarkdownTest +++ b/MarkdownTest @@ -1 +1 @@ -Subproject commit e5ac85540e14c494e036342598639815dea3aead +Subproject commit cb01b1d429b99388962c86169708a5643c770aa4 diff --git a/MultiMarkdown.xcodeproj/project.pbxproj b/MultiMarkdown.xcodeproj/project.pbxproj index 2391e525..7bca46c3 100644 --- a/MultiMarkdown.xcodeproj/project.pbxproj +++ b/MultiMarkdown.xcodeproj/project.pbxproj @@ -3,111 +3,60 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 54; objects = { -/* Begin PBXAggregateTarget section */ - 65F0B8EA13DF714E00D0980C /* Run Tests */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 65F0B8ED13DF716D00D0980C /* Build configuration list for PBXAggregateTarget "Run Tests" */; - buildPhases = ( - 65F0B8E913DF714E00D0980C /* Run Tests */, - ); - dependencies = ( - 65F0B8FD13DF724D00D0980C /* PBXTargetDependency */, - ); - name = "Run Tests"; - productName = "MultiMarkdown Tests"; - }; -/* End PBXAggregateTarget section */ - /* Begin PBXBuildFile section */ 4AFA467413E3625F00CFA132 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AFA466913E3624F00CFA132 /* Foundation.framework */; }; - 4AFA467513E362AC00CFA132 /* GLibFacade.c in Sources */ = {isa = PBXBuildFile; fileRef = 651A528213E1C30100BCB02A /* GLibFacade.c */; }; - 4AFA467613E362B500CFA132 /* markdown_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F0B8B113DF6D4000D0980C /* markdown_parser.c */; }; - 4AFA467A13E363FA00CFA132 /* markdown_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F0B66113DF47CC00D0980C /* markdown_lib.c */; }; - 4AFA467D13E3640600CFA132 /* markdown_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F0B66313DF47CC00D0980C /* markdown_output.c */; }; - 65F0B69E13DF47CC00D0980C /* markdown.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F0B66713DF47CC00D0980C /* markdown.c */; }; - 65F89EA713E37B9D006A34B8 /* libMultiMarkdown.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AFA466213E3624F00CFA132 /* libMultiMarkdown.a */; }; + 5029E9192D47C3FA00BB6C5D /* parsing_functions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9082D47C3FA00BB6C5D /* parsing_functions.h */; }; + 5029E91A2D47C3FA00BB6C5D /* MultiMarkdown.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9152D47C3FA00BB6C5D /* MultiMarkdown.h */; }; + 5029E91B2D47C3FA00BB6C5D /* markdown_lib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9102D47C3FA00BB6C5D /* markdown_lib.h */; }; + 5029E91C2D47C3FA00BB6C5D /* markdown_parser_lib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9122D47C3FA00BB6C5D /* markdown_parser_lib.h */; }; + 5029E91D2D47C3FA00BB6C5D /* GLibFacade.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E90E2D47C3FA00BB6C5D /* GLibFacade.h */; }; + 5029E91E2D47C3FA00BB6C5D /* markdown_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9042D47C3FA00BB6C5D /* markdown_parser.h */; }; + 5029E91F2D47C3FA00BB6C5D /* markdown_peg.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9142D47C3FA00BB6C5D /* markdown_peg.h */; }; + 5029E9202D47C3FA00BB6C5D /* odf.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9062D47C3FA00BB6C5D /* odf.h */; }; + 5029E9212D47C3FA00BB6C5D /* glib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E90D2D47C3FA00BB6C5D /* glib.h */; }; + 5029E9222D47C3FA00BB6C5D /* tree.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E9162D47C3FA00BB6C5D /* tree.h */; }; + 5029E9232D47C3FA00BB6C5D /* utility_functions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5029E90A2D47C3FA00BB6C5D /* utility_functions.h */; }; + 5029E9242D47C3FA00BB6C5D /* markdown_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9112D47C3FA00BB6C5D /* markdown_lib.c */; }; + 5029E9252D47C3FA00BB6C5D /* utility_functions.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E90B2D47C3FA00BB6C5D /* utility_functions.c */; }; + 5029E9262D47C3FA00BB6C5D /* GLibFacade.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E90F2D47C3FA00BB6C5D /* GLibFacade.c */; }; + 5029E9272D47C3FA00BB6C5D /* parsing_functions.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9092D47C3FA00BB6C5D /* parsing_functions.c */; }; + 5029E9282D47C3FA00BB6C5D /* markdown.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9022D47C3FA00BB6C5D /* markdown.c */; }; + 5029E9292D47C3FA00BB6C5D /* markdown_parser_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9132D47C3FA00BB6C5D /* markdown_parser_lib.c */; }; + 5029E92A2D47C3FA00BB6C5D /* markdown_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9032D47C3FA00BB6C5D /* markdown_output.c */; }; + 5029E92B2D47C3FA00BB6C5D /* odf.c in Sources */ = {isa = PBXBuildFile; fileRef = 5029E9072D47C3FA00BB6C5D /* odf.c */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 4AFA467813E3633800CFA132 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 65F0B88813DF6C0D00D0980C; - remoteInfo = Peg; - }; - 65F0B8FC13DF724D00D0980C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8DD76FA90486AB0100D96B5E; - remoteInfo = MultiMarkdown; - }; - 65F89EAC13E37BAC006A34B8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4AFA466113E3624F00CFA132; - remoteInfo = libMultiMarkdown; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76FAF0486AB0100D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 4AFA466213E3624F00CFA132 /* libMultiMarkdown.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMultiMarkdown.a; sourceTree = BUILT_PRODUCTS_DIR; }; 4AFA466413E3624F00CFA132 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 4AFA466713E3624F00CFA132 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 4AFA466813E3624F00CFA132 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 4AFA466913E3624F00CFA132 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 5029E9022D47C3FA00BB6C5D /* markdown.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = markdown.c; sourceTree = ""; }; + 5029E9032D47C3FA00BB6C5D /* markdown_output.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = markdown_output.c; sourceTree = ""; }; + 5029E9042D47C3FA00BB6C5D /* markdown_parser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = markdown_parser.h; sourceTree = ""; }; + 5029E9052D47C3FA00BB6C5D /* markdown_parser.leg */ = {isa = PBXFileReference; lastKnownFileType = text; path = markdown_parser.leg; sourceTree = ""; }; + 5029E9062D47C3FA00BB6C5D /* odf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = odf.h; sourceTree = ""; }; + 5029E9072D47C3FA00BB6C5D /* odf.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = odf.c; sourceTree = ""; }; + 5029E9082D47C3FA00BB6C5D /* parsing_functions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = parsing_functions.h; sourceTree = ""; }; + 5029E9092D47C3FA00BB6C5D /* parsing_functions.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = parsing_functions.c; sourceTree = ""; }; + 5029E90A2D47C3FA00BB6C5D /* utility_functions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = utility_functions.h; sourceTree = ""; }; + 5029E90B2D47C3FA00BB6C5D /* utility_functions.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = utility_functions.c; sourceTree = ""; }; + 5029E90D2D47C3FA00BB6C5D /* glib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glib.h; sourceTree = ""; }; + 5029E90E2D47C3FA00BB6C5D /* GLibFacade.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GLibFacade.h; sourceTree = ""; }; + 5029E90F2D47C3FA00BB6C5D /* GLibFacade.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = GLibFacade.c; sourceTree = ""; }; + 5029E9102D47C3FA00BB6C5D /* markdown_lib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = markdown_lib.h; sourceTree = ""; }; + 5029E9112D47C3FA00BB6C5D /* markdown_lib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = markdown_lib.c; sourceTree = ""; }; + 5029E9122D47C3FA00BB6C5D /* markdown_parser_lib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = markdown_parser_lib.h; sourceTree = ""; }; + 5029E9132D47C3FA00BB6C5D /* markdown_parser_lib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = markdown_parser_lib.c; sourceTree = ""; }; + 5029E9142D47C3FA00BB6C5D /* markdown_peg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = markdown_peg.h; sourceTree = ""; }; + 5029E9152D47C3FA00BB6C5D /* MultiMarkdown.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MultiMarkdown.h; sourceTree = ""; }; + 5029E9162D47C3FA00BB6C5D /* tree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = ""; }; + 50F256BC2D43F117006858FC /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 651A525B13E1BEFE00BCB02A /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO.txt; sourceTree = ""; }; - 651A528113E1C30100BCB02A /* GLibFacade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLibFacade.h; sourceTree = ""; }; - 651A528213E1C30100BCB02A /* GLibFacade.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GLibFacade.c; sourceTree = ""; }; - 65F0B66113DF47CC00D0980C /* markdown_lib.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = markdown_lib.c; sourceTree = ""; }; - 65F0B66213DF47CC00D0980C /* markdown_lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = markdown_lib.h; sourceTree = ""; }; - 65F0B66313DF47CC00D0980C /* markdown_output.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = markdown_output.c; sourceTree = ""; }; - 65F0B66513DF47CC00D0980C /* markdown_parser.leg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = markdown_parser.leg; sourceTree = ""; }; - 65F0B66613DF47CC00D0980C /* markdown_peg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = markdown_peg.h; sourceTree = ""; }; - 65F0B66713DF47CC00D0980C /* markdown.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = markdown.c; sourceTree = ""; }; - 65F0B66813DF47CC00D0980C /* odf.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = odf.c; sourceTree = ""; }; - 65F0B66913DF47CC00D0980C /* odf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf.h; sourceTree = ""; }; - 65F0B66A13DF47CC00D0980C /* parsing_functions.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = parsing_functions.c; sourceTree = ""; }; - 65F0B66C13DF47CC00D0980C /* compile.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = compile.c; sourceTree = ""; }; - 65F0B68B13DF47CC00D0980C /* leg */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = leg; sourceTree = ""; }; - 65F0B68C13DF47CC00D0980C /* leg.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = leg.c; sourceTree = ""; }; - 65F0B68D13DF47CC00D0980C /* leg.leg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = leg.leg; sourceTree = ""; }; - 65F0B68F13DF47CC00D0980C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 65F0B69013DF47CC00D0980C /* peg */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = peg; sourceTree = ""; }; - 65F0B69113DF47CC00D0980C /* peg.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; path = peg.1; sourceTree = ""; }; - 65F0B69213DF47CC00D0980C /* peg.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = peg.c; sourceTree = ""; }; - 65F0B69413DF47CC00D0980C /* peg.peg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = peg.peg; sourceTree = ""; }; - 65F0B69513DF47CC00D0980C /* peg.peg-c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "peg.peg-c"; sourceTree = ""; }; - 65F0B69613DF47CC00D0980C /* tree.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tree.c; sourceTree = ""; }; - 65F0B69713DF47CC00D0980C /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = ""; }; - 65F0B69913DF47CC00D0980C /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; - 65F0B69A13DF47CC00D0980C /* utility_functions.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = utility_functions.c; sourceTree = ""; }; - 65F0B6C513DF485F00D0980C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 65F0B6D713DF4C6B00D0980C /* MarkdownMacPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkdownMacPrefix.h; sourceTree = ""; }; - 65F0B6F313DF4D9800D0980C /* glib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glib.h; sourceTree = ""; }; - 65F0B8B113DF6D4000D0980C /* markdown_parser.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = markdown_parser.c; sourceTree = ""; }; - 65F89E8113E379ED006A34B8 /* Release10.6+.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Release10.6+.xcconfig"; sourceTree = ""; }; - 65F89EB813E37BEF006A34B8 /* Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; }; - 65F89EB913E37BEF006A34B8 /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - 65F89EBA13E37C2A006A34B8 /* Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 8DD76FB20486AB0100D96B5E /* multimarkdown */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = multimarkdown; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -119,28 +68,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8DD76FAD0486AB0100D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 65F89EA713E37B9D006A34B8 /* libMultiMarkdown.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* MultiMarkdown */ = { isa = PBXGroup; children = ( + 50F256BC2D43F117006858FC /* Package.swift */, 651A525B13E1BEFE00BCB02A /* TODO.txt */, - 651A528113E1C30100BCB02A /* GLibFacade.h */, - 651A528213E1C30100BCB02A /* GLibFacade.c */, - 65F0B6D713DF4C6B00D0980C /* MarkdownMacPrefix.h */, - 65F0B6F313DF4D9800D0980C /* glib.h */, - 65F89E8013E379ED006A34B8 /* Configuration */, - 65F0B8B513DF6D4700D0980C /* Generated Sources */, - 08FB7795FE84155DC02AAC07 /* Source */, + 5029E9182D47C3FA00BB6C5D /* Sources */, C6A0FF2B0290797F04C91782 /* Documentation */, 4AFA466313E3624F00CFA132 /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, @@ -148,29 +84,9 @@ name = MultiMarkdown; sourceTree = ""; }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 65F0B6C513DF485F00D0980C /* Makefile */, - 65F0B66113DF47CC00D0980C /* markdown_lib.c */, - 65F0B66213DF47CC00D0980C /* markdown_lib.h */, - 65F0B66313DF47CC00D0980C /* markdown_output.c */, - 65F0B66513DF47CC00D0980C /* markdown_parser.leg */, - 65F0B66613DF47CC00D0980C /* markdown_peg.h */, - 65F0B66713DF47CC00D0980C /* markdown.c */, - 65F0B66813DF47CC00D0980C /* odf.c */, - 65F0B66913DF47CC00D0980C /* odf.h */, - 65F0B66A13DF47CC00D0980C /* parsing_functions.c */, - 65F0B66B13DF47CC00D0980C /* peg-0.1.4 */, - 65F0B69A13DF47CC00D0980C /* utility_functions.c */, - ); - name = Source; - sourceTree = ""; - }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 8DD76FB20486AB0100D96B5E /* multimarkdown */, 4AFA466213E3624F00CFA132 /* libMultiMarkdown.a */, ); name = Products; @@ -195,43 +111,47 @@ name = "Other Frameworks"; sourceTree = ""; }; - 65F0B66B13DF47CC00D0980C /* peg-0.1.4 */ = { + 5029E90C2D47C3FA00BB6C5D /* Private */ = { isa = PBXGroup; children = ( - 65F0B66C13DF47CC00D0980C /* compile.c */, - 65F0B68B13DF47CC00D0980C /* leg */, - 65F0B68C13DF47CC00D0980C /* leg.c */, - 65F0B68D13DF47CC00D0980C /* leg.leg */, - 65F0B68F13DF47CC00D0980C /* Makefile */, - 65F0B69013DF47CC00D0980C /* peg */, - 65F0B69113DF47CC00D0980C /* peg.1 */, - 65F0B69213DF47CC00D0980C /* peg.c */, - 65F0B69413DF47CC00D0980C /* peg.peg */, - 65F0B69513DF47CC00D0980C /* peg.peg-c */, - 65F0B69613DF47CC00D0980C /* tree.c */, - 65F0B69713DF47CC00D0980C /* tree.h */, - 65F0B69913DF47CC00D0980C /* version.h */, - ); - path = "peg-0.1.4"; + 5029E9022D47C3FA00BB6C5D /* markdown.c */, + 5029E9032D47C3FA00BB6C5D /* markdown_output.c */, + 5029E9042D47C3FA00BB6C5D /* markdown_parser.h */, + 5029E9052D47C3FA00BB6C5D /* markdown_parser.leg */, + 5029E9062D47C3FA00BB6C5D /* odf.h */, + 5029E9072D47C3FA00BB6C5D /* odf.c */, + 5029E9082D47C3FA00BB6C5D /* parsing_functions.h */, + 5029E9092D47C3FA00BB6C5D /* parsing_functions.c */, + 5029E90A2D47C3FA00BB6C5D /* utility_functions.h */, + 5029E90B2D47C3FA00BB6C5D /* utility_functions.c */, + ); + path = Private; sourceTree = ""; }; - 65F0B8B513DF6D4700D0980C /* Generated Sources */ = { + 5029E9172D47C3FA00BB6C5D /* Public */ = { isa = PBXGroup; children = ( - 65F0B8B113DF6D4000D0980C /* markdown_parser.c */, - ); - name = "Generated Sources"; + 5029E90D2D47C3FA00BB6C5D /* glib.h */, + 5029E90E2D47C3FA00BB6C5D /* GLibFacade.h */, + 5029E90F2D47C3FA00BB6C5D /* GLibFacade.c */, + 5029E9102D47C3FA00BB6C5D /* markdown_lib.h */, + 5029E9112D47C3FA00BB6C5D /* markdown_lib.c */, + 5029E9122D47C3FA00BB6C5D /* markdown_parser_lib.h */, + 5029E9132D47C3FA00BB6C5D /* markdown_parser_lib.c */, + 5029E9142D47C3FA00BB6C5D /* markdown_peg.h */, + 5029E9152D47C3FA00BB6C5D /* MultiMarkdown.h */, + 5029E9162D47C3FA00BB6C5D /* tree.h */, + ); + path = Public; sourceTree = ""; }; - 65F89E8013E379ED006A34B8 /* Configuration */ = { + 5029E9182D47C3FA00BB6C5D /* Sources */ = { isa = PBXGroup; children = ( - 65F89EB813E37BEF006A34B8 /* Common.xcconfig */, - 65F89EB913E37BEF006A34B8 /* Debug.xcconfig */, - 65F89EBA13E37C2A006A34B8 /* Release.xcconfig */, - 65F89E8113E379ED006A34B8 /* Release10.6+.xcconfig */, + 5029E90C2D47C3FA00BB6C5D /* Private */, + 5029E9172D47C3FA00BB6C5D /* Public */, ); - path = Configuration; + path = Sources; sourceTree = ""; }; C6A0FF2B0290797F04C91782 /* Documentation */ = { @@ -248,28 +168,22 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 5029E9192D47C3FA00BB6C5D /* parsing_functions.h in Headers */, + 5029E91A2D47C3FA00BB6C5D /* MultiMarkdown.h in Headers */, + 5029E91B2D47C3FA00BB6C5D /* markdown_lib.h in Headers */, + 5029E91C2D47C3FA00BB6C5D /* markdown_parser_lib.h in Headers */, + 5029E91D2D47C3FA00BB6C5D /* GLibFacade.h in Headers */, + 5029E91E2D47C3FA00BB6C5D /* markdown_parser.h in Headers */, + 5029E91F2D47C3FA00BB6C5D /* markdown_peg.h in Headers */, + 5029E9202D47C3FA00BB6C5D /* odf.h in Headers */, + 5029E9212D47C3FA00BB6C5D /* glib.h in Headers */, + 5029E9222D47C3FA00BB6C5D /* tree.h in Headers */, + 5029E9232D47C3FA00BB6C5D /* utility_functions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ -/* Begin PBXLegacyTarget section */ - 65F0B88813DF6C0D00D0980C /* Peg */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION)"; - buildConfigurationList = 65F0B88F13DF6C3E00D0980C /* Build configuration list for PBXLegacyTarget "Peg" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "./peg-0.1.4"; - dependencies = ( - ); - name = Peg; - passBuildSettingsInEnvironment = 1; - productName = Peg; - }; -/* End PBXLegacyTarget section */ - /* Begin PBXNativeTarget section */ 4AFA466113E3624F00CFA132 /* libMultiMarkdown */ = { isa = PBXNativeTarget; @@ -283,58 +197,42 @@ buildRules = ( ); dependencies = ( - 4AFA467913E3633800CFA132 /* PBXTargetDependency */, ); name = libMultiMarkdown; productName = multimarkdown; productReference = 4AFA466213E3624F00CFA132 /* libMultiMarkdown.a */; productType = "com.apple.product-type.library.static"; }; - 8DD76FA90486AB0100D96B5E /* MultiMarkdown */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "MultiMarkdown" */; - buildPhases = ( - 8DD76FAB0486AB0100D96B5E /* Sources */, - 8DD76FAD0486AB0100D96B5E /* Frameworks */, - 8DD76FAF0486AB0100D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 65F89EAD13E37BAC006A34B8 /* PBXTargetDependency */, - ); - name = MultiMarkdown; - productInstallPath = "$(HOME)/bin"; - productName = MultiMarkdown; - productReference = 8DD76FB20486AB0100D96B5E /* multimarkdown */; - productType = "com.apple.product-type.tool"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0410; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1600; + TargetAttributes = { + 4AFA466113E3624F00CFA132 = { + LastSwiftMigration = 1620; + }; + }; }; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MultiMarkdown" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + en, + fr, + Base, + ja, + de, ); mainGroup = 08FB7794FE84155DC02AAC07 /* MultiMarkdown */; projectDirPath = ""; projectRoot = ""; targets = ( - 8DD76FA90486AB0100D96B5E /* MultiMarkdown */, 4AFA466113E3624F00CFA132 /* libMultiMarkdown */, - 65F0B88813DF6C0D00D0980C /* Peg */, - 65F0B8EA13DF714E00D0980C /* Run Tests */, ); }; /* End PBXProject section */ @@ -342,31 +240,20 @@ /* Begin PBXShellScriptBuildPhase section */ 4AFA467713E3630600CFA132 /* Generate Parser */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 8; files = ( ); inputPaths = ( + "$(SRCROOT)/Sources/Private/markdown_parser.leg", ); name = "Generate Parser"; outputPaths = ( + "$(SRCROOT)/Sources/Private/markdown_parser.h", + "$(SRCROOT)/Sources/Private/parsing_functions.c", ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "./peg/leg -o markdown_parser.c markdown_parser.leg"; - }; - 65F0B8E913DF714E00D0980C /* Run Tests */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Tests"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# shell script goes here\ncd ${PROJECT_DIR}/MarkdownTest\n\n# Basic Markdown Tests\n./MarkdownTest.pl --Script=\"${BUILT_PRODUCTS_DIR}/MultiMarkdown\" --testdir=\"${PROJECT_DIR}/MarkdownTest/Tests\"\n\n# MultiMarkdown extensions\n./MarkdownTest.pl --Script=\"${BUILT_PRODUCTS_DIR}/MultiMarkdown\" --testdir=\"${PROJECT_DIR}/MarkdownTest/MultiMarkdownTests\"\n"; + shellScript = "\"$SRCROOT/leg\" -o Sources/Private/markdown_parser.h Sources/Private/markdown_parser.leg\ntouch Sources/Private/parsing_functions.c\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -375,250 +262,171 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4AFA467513E362AC00CFA132 /* GLibFacade.c in Sources */, - 4AFA467613E362B500CFA132 /* markdown_parser.c in Sources */, - 4AFA467A13E363FA00CFA132 /* markdown_lib.c in Sources */, - 4AFA467D13E3640600CFA132 /* markdown_output.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8DD76FAB0486AB0100D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 65F0B69E13DF47CC00D0980C /* markdown.c in Sources */, + 5029E9242D47C3FA00BB6C5D /* markdown_lib.c in Sources */, + 5029E9252D47C3FA00BB6C5D /* utility_functions.c in Sources */, + 5029E9262D47C3FA00BB6C5D /* GLibFacade.c in Sources */, + 5029E9272D47C3FA00BB6C5D /* parsing_functions.c in Sources */, + 5029E9282D47C3FA00BB6C5D /* markdown.c in Sources */, + 5029E9292D47C3FA00BB6C5D /* markdown_parser_lib.c in Sources */, + 5029E92A2D47C3FA00BB6C5D /* markdown_output.c in Sources */, + 5029E92B2D47C3FA00BB6C5D /* odf.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 4AFA467913E3633800CFA132 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 65F0B88813DF6C0D00D0980C /* Peg */; - targetProxy = 4AFA467813E3633800CFA132 /* PBXContainerItemProxy */; - }; - 65F0B8FD13DF724D00D0980C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 8DD76FA90486AB0100D96B5E /* MultiMarkdown */; - targetProxy = 65F0B8FC13DF724D00D0980C /* PBXContainerItemProxy */; - }; - 65F89EAD13E37BAC006A34B8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4AFA466113E3624F00CFA132 /* libMultiMarkdown */; - targetProxy = 65F89EAC13E37BAC006A34B8 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - 1DEB928608733DD80010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 65F89EB913E37BEF006A34B8 /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - HEADER_SEARCH_PATHS = .; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = multimarkdown; - }; - name = Debug; - }; - 1DEB928708733DD80010E9CD /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 65F89EBA13E37C2A006A34B8 /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_MODEL_TUNING = G5; - GCC_PREFIX_HEADER = MarkdownMacPrefix.h; - HEADER_SEARCH_PATHS = .; - INSTALL_PATH = /usr/local/bin; - OTHER_CFLAGS = "-DSTANDALONE_MAC_VERSION=1"; - PRODUCT_NAME = multimarkdown; - SEPARATE_STRIP = YES; - STRIP_INSTALLED_PRODUCT = YES; - }; - name = Release; - }; 1DEB928A08733DD80010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - i386, - ppc, - x86_64, - ); + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; }; name = Debug; }; 1DEB928B08733DD80010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - i386, - ppc, - x86_64, - ); + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.4; - PREBINDING = NO; - SDKROOT = macosx; + MACOSX_DEPLOYMENT_TARGET = 10.6; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; }; name = Release; }; 4AFA467113E3624F00CFA132 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 65F89EB913E37BEF006A34B8 /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = Sources/Public/MultiMarkdown.h; + GCC_PREPROCESSOR_DEFINITIONS = YY_CTX_LOCAL; + GCC_WARN_UNUSED_FUNCTION = NO; + HEADER_SEARCH_PATHS = ( + ., + "peg-0.1.9/", + ); + INSTALL_PATH = "@rpath"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", ); - HEADER_SEARCH_PATHS = .; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = MultiMarkdown; + SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO; + SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; 4AFA467213E3624F00CFA132 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 65F89EBA13E37C2A006A34B8 /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - HEADER_SEARCH_PATHS = .; - PRODUCT_NAME = MultiMarkdown; - }; - name = Release; - }; - 4AFA467313E3624F00CFA132 /* Release10.6+ */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 65F89E8113E379ED006A34B8 /* Release10.6+.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - HEADER_SEARCH_PATHS = .; - PRODUCT_NAME = MultiMarkdown; - }; - name = "Release10.6+"; - }; - 651A542813E20D2400BCB02A /* Release10.6+ */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = ( - i386, - ppc, - x86_64, + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = Sources/Public/MultiMarkdown.h; + GCC_PREPROCESSOR_DEFINITIONS = YY_CTX_LOCAL; + GCC_WARN_UNUSED_FUNCTION = NO; + HEADER_SEARCH_PATHS = ( + ., + "peg-0.1.9/", ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.4; - PREBINDING = NO; - SDKROOT = macosx; - }; - name = "Release10.6+"; - }; - 651A542913E20D2400BCB02A /* Release10.6+ */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 65F89E8113E379ED006A34B8 /* Release10.6+.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - HEADER_SEARCH_PATHS = .; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = multimarkdown; - }; - name = "Release10.6+"; - }; - 651A542A13E20D2400BCB02A /* Release10.6+ */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = Peg; - ZERO_LINK = NO; - }; - name = "Release10.6+"; - }; - 651A542B13E20D2400BCB02A /* Release10.6+ */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = "MultiMarkdown Tests"; - ZERO_LINK = NO; - }; - name = "Release10.6+"; - }; - 65F0B88913DF6C0D00D0980C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - PRODUCT_NAME = Peg; - }; - name = Debug; - }; - 65F0B88A13DF6C0D00D0980C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = Peg; - ZERO_LINK = NO; - }; - name = Release; - }; - 65F0B8EB13DF714F00D0980C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - PRODUCT_NAME = "MultiMarkdown Tests"; - }; - name = Debug; - }; - 65F0B8EC13DF714F00D0980C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = "MultiMarkdown Tests"; - ZERO_LINK = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + PRODUCT_NAME = MultiMarkdown; + SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO; + SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos"; + SWIFT_VERSION = 5.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "MultiMarkdown" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB928608733DD80010E9CD /* Debug */, - 1DEB928708733DD80010E9CD /* Release */, - 651A542913E20D2400BCB02A /* Release10.6+ */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MultiMarkdown" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB928A08733DD80010E9CD /* Debug */, 1DEB928B08733DD80010E9CD /* Release */, - 651A542813E20D2400BCB02A /* Release10.6+ */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -628,27 +436,6 @@ buildConfigurations = ( 4AFA467113E3624F00CFA132 /* Debug */, 4AFA467213E3624F00CFA132 /* Release */, - 4AFA467313E3624F00CFA132 /* Release10.6+ */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 65F0B88F13DF6C3E00D0980C /* Build configuration list for PBXLegacyTarget "Peg" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 65F0B88913DF6C0D00D0980C /* Debug */, - 65F0B88A13DF6C0D00D0980C /* Release */, - 651A542A13E20D2400BCB02A /* Release10.6+ */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 65F0B8ED13DF716D00D0980C /* Build configuration list for PBXAggregateTarget "Run Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 65F0B8EB13DF714F00D0980C /* Debug */, - 65F0B8EC13DF714F00D0980C /* Release */, - 651A542B13E20D2400BCB02A /* Release10.6+ */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/MultiMarkdown.xcodeproj/xcshareddata/xcschemes/libMultiMarkdown.xcscheme b/MultiMarkdown.xcodeproj/xcshareddata/xcschemes/libMultiMarkdown.xcscheme new file mode 100644 index 00000000..b22bc5fc --- /dev/null +++ b/MultiMarkdown.xcodeproj/xcshareddata/xcschemes/libMultiMarkdown.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..2c044ab6 --- /dev/null +++ b/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version: 5.4 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "MultiMarkdown", + platforms: [ + .iOS(.v12), + .macOS(.v10_13), + .tvOS(.v12), + .watchOS(.v4) + ], + products: [ + .library( + name: "MultiMarkdown", + targets: ["MultiMarkdown"]) + ], + targets: [ + .target( + name: "MultiMarkdown", + path: "Sources", + publicHeadersPath: "Public", + cSettings: [ + .headerSearchPath("Private/"), + .headerSearchPath("Public/"), + .define("YY_CTX_LOCAL") + ] + ), + ] +) diff --git a/markdown.c b/Sources/Private/markdown.c similarity index 99% rename from markdown.c rename to Sources/Private/markdown.c index 68d1bcae..1736e706 100644 --- a/markdown.c +++ b/Sources/Private/markdown.c @@ -263,7 +263,7 @@ int main(int argc, char * argv[]) { /* remove file extension, if present */ fake = argv[i+1]; if (strrchr(fake, '.') != NULL) { - int count = strrchr(fake,'.') - fake; + long count = strrchr(fake,'.') - fake; if (count != 0) { fake[count] = '\0'; } diff --git a/markdown_output.c b/Sources/Private/markdown_output.c similarity index 92% rename from markdown_output.c rename to Sources/Private/markdown_output.c index 1c9f5d84..ed48ef12 100644 --- a/markdown_output.c +++ b/Sources/Private/markdown_output.c @@ -42,9 +42,9 @@ static bool am_printing_html_footnote = FALSE; static int footnote_counter_to_print = 0; static int odf_list_needs_end_p = 0; -static void print_html_string(GString *out, char *str, bool obfuscate); -static void print_html_element_list(GString *out, element *list, bool obfuscate); -static void print_html_element(GString *out, element *elt, bool obfuscate); +static void print_html_string(int ext, GString *out, char *str, bool obfuscate); +static void print_html_element_list(int ext, GString *out, element *list, bool obfuscate); +static void print_html_element(int ext, GString *out, element *elt, bool obfuscate); static void print_latex_string(GString *out, char *str); static void print_latex_element_list(GString *out, element *list); static void print_latex_element(GString *out, element *elt); @@ -60,8 +60,8 @@ static bool list_contains_key(element *list, int key); /* MultiMarkdown Routines */ -static void print_html_header(GString *out, element *elt, bool obfuscate); -static void print_html_footer(GString *out, bool obfuscate); +static void print_html_header(int ext, GString *out, element *elt, bool obfuscate); +static void print_html_footer(int ext, GString *out, bool obfuscate); static void print_latex_header(GString *out, element *elt); static void print_latex_footer(GString *out); @@ -78,7 +78,7 @@ static void print_opml_element(GString *out, element *elt); static void print_opml_metadata(GString *out, element *elt); static void print_opml_section_and_children(GString *out, element *list); -element * print_html_headingsection(GString *out, element *list, bool obfuscate); +element * print_html_headingsection(int ext, GString *out, element *list, bool obfuscate); static bool is_html_complete_doc(element *meta); static int find_latex_mode(int format, element *list); @@ -137,7 +137,7 @@ static bool list_contains_key(element *list, int key) { /* print_html_string - print string, escaping for HTML * If obfuscate selected, convert characters to hex or decimal entities at random */ -static void print_html_string(GString *out, char *str, bool obfuscate) { +static void print_html_string(int ext, GString *out, char *str, bool obfuscate) { while (*str != '\0') { switch (*str) { case '&': @@ -167,12 +167,12 @@ static void print_html_string(GString *out, char *str, bool obfuscate) { } /* print_html_element_list - print a list of elements as HTML */ -static void print_html_element_list(GString *out, element *list, bool obfuscate) { +static void print_html_element_list(int ext, GString *out, element *list, bool obfuscate) { while (list != NULL) { if (list->key == HEADINGSECTION) { - list = print_html_headingsection(out, list, obfuscate); + list = print_html_headingsection(ext, out, list, obfuscate); } else { - print_html_element(out, list, obfuscate); + print_html_element(ext, out, list, obfuscate); list = list->next; } } @@ -184,7 +184,7 @@ static void add_endnote(element *elt) { } /* print_html_element - print an element as HTML */ -static void print_html_element(GString *out, element *elt, bool obfuscate) { +static void print_html_element(int ext, GString *out, element *elt, bool obfuscate) { int lev; char *label; element *attribute; @@ -199,7 +199,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "
\n"); break; case STR: - print_html_string(out, elt->contents.str, obfuscate); + print_html_string(ext, out, elt->contents.str, obfuscate); break; case ELLIPSIS: localize_typography(out, ELLIP, language, HTMLOUT); @@ -215,17 +215,17 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { break; case SINGLEQUOTED: localize_typography(out, LSQUOTE, language, HTMLOUT); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); localize_typography(out, RSQUOTE, language, HTMLOUT); break; case DOUBLEQUOTED: localize_typography(out, LDQUOTE, language, HTMLOUT); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); localize_typography(out, RDQUOTE, language, HTMLOUT); break; case CODE: g_string_append_printf(out, ""); - print_html_string(out, elt->contents.str, obfuscate); + print_html_string(ext, out, elt->contents.str, obfuscate); g_string_append_printf(out, ""); break; case HTML: @@ -235,16 +235,16 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { if (strstr(elt->contents.link->url, "mailto:") == elt->contents.link->url) obfuscate = true; /* obfuscate mailto: links */ g_string_append_printf(out, "contents.link->url, obfuscate); + print_html_string(ext, out, elt->contents.link->url, obfuscate); g_string_append_printf(out, "\""); if (strlen(elt->contents.link->title) > 0) { g_string_append_printf(out, " title=\""); - print_html_string(out, elt->contents.link->title, obfuscate); + print_html_string(ext, out, elt->contents.link->title, obfuscate); g_string_append_printf(out, "\""); } - print_html_element_list(out, elt->contents.link->attr, obfuscate); + print_html_element_list(ext, out, elt->contents.link->attr, obfuscate); g_string_append_printf(out, ">"); - print_html_element_list(out, elt->contents.link->label, obfuscate); + print_html_element_list(ext, out, elt->contents.link->label, obfuscate); g_string_append_printf(out, ""); break; case IMAGEBLOCK: @@ -254,20 +254,20 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "
\n"); } g_string_append_printf(out, "contents.link->url, obfuscate); + print_html_string(ext, out, elt->contents.link->url, obfuscate); g_string_append_printf(out, "\" alt=\""); print_raw_element_list(out,elt->contents.link->label); - if ( (extension(EXT_COMPATIBILITY)) || + if ( (ext & EXT_COMPATIBILITY) || (strcmp(elt->contents.link->identifier, "") == 0) ) { g_string_append_printf(out, "\""); } else { - if (!(extension(EXT_COMPATIBILITY))) { + if (!(ext & EXT_COMPATIBILITY)) { g_string_append_printf(out, "\" id=\"%s\"",elt->contents.link->identifier); } } if (strlen(elt->contents.link->title) > 0) { g_string_append_printf(out, " title=\""); - print_html_string(out, elt->contents.link->title, obfuscate); + print_html_string(ext, out, elt->contents.link->title, obfuscate); g_string_append_printf(out, "\""); } width = NULL; @@ -288,12 +288,12 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "width:%s;", width); g_string_append_printf(out, "\""); } - print_html_element_list(out, elt->contents.link->attr, obfuscate); + print_html_element_list(ext, out, elt->contents.link->attr, obfuscate); g_string_append_printf(out, " />"); if (elt->key == IMAGEBLOCK) { if (elt->contents.link->label != NULL) { g_string_append_printf(out, "\n
"); - print_html_element_list(out, elt->contents.link->label, obfuscate); + print_html_element_list(ext, out, elt->contents.link->label, obfuscate); g_string_append_printf(out, "
"); } g_string_append_printf(out, "
\n"); @@ -303,16 +303,26 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { break; case EMPH: g_string_append_printf(out, ""); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, ""); break; case STRONG: g_string_append_printf(out, ""); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, ""); break; + case DELETE: + g_string_append_printf(out, ""); + print_html_element_list(ext, out, elt->children, obfuscate); + g_string_append_printf(out, ""); + break; + case COMMENT: + g_string_append_printf(out, ""); + break; case LIST: - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); break; case RAW: /* Shouldn't occur - these are handled by process_raw_blocks() */ @@ -323,23 +333,23 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { if (lev > 6) lev = 6; pad(out, 2); - if ( extension(EXT_COMPATIBILITY)) { + if ( ext & EXT_COMPATIBILITY) { /* Use regular Markdown header format */ g_string_append_printf(out, "", lev); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); } else if (elt->children->key == AUTOLABEL) { /* use label for header since one was specified (MMD)*/ g_string_append_printf(out, "", lev,elt->children->contents.str); - print_html_element_list(out, elt->children->next, obfuscate); - } else if ( extension(EXT_NO_LABELS)) { + print_html_element_list(ext, out, elt->children->next, obfuscate); + } else if ( ext & EXT_NO_LABELS) { /* Don't generate a label */ g_string_append_printf(out, "", lev); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); } else { /* generate a label by default for MMD */ label = label_from_element_list(elt->children, obfuscate); g_string_append_printf(out, "", lev, label); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); free(label); } g_string_append_printf(out, "", lev); @@ -347,13 +357,13 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { break; case PLAIN: pad(out, 1); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); padded = 0; break; case PARA: pad(out, 2); g_string_append_printf(out, "

"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); if (am_printing_html_footnote && ( elt->next == NULL)) { g_string_append_printf(out, "  ↩", footnote_counter_to_print); /* Only print once. For now, it's the first paragraph, until @@ -376,15 +386,22 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { case VERBATIM: pad(out, 2); g_string_append_printf(out, "%s", "

");
-        print_html_string(out, elt->contents.str, obfuscate);
+        print_html_string(ext, out, elt->contents.str, obfuscate);
         g_string_append_printf(out, "%s", "
"); padded = 0; break; - case BULLETLIST: + case CODEBLOCK: + pad(out, 2); + g_string_append_printf(out, "%s", "
");
+		print_html_string(ext, out, elt->contents.codeblock->code, obfuscate);
+		g_string_append_printf(out, "%s", "
"); + padded = 0; + break; + case BULLETLIST: pad(out, 2); g_string_append_printf(out, "%s", "
    "); padded = 0; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); pad(out, 1); g_string_append_printf(out, "%s", "
"); padded = 0; @@ -393,7 +410,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { pad(out, 2); g_string_append_printf(out, "%s", "
    "); padded = 0; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); pad(out, 1); g_string_append_printf(out, "
"); padded = 0; @@ -402,7 +419,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { pad(out, 1); g_string_append_printf(out, "
  • "); padded = 2; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "
  • "); padded = 0; break; @@ -410,11 +427,18 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { pad(out, 2); g_string_append_printf(out, "
    \n"); padded = 2; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); pad(out, 1); g_string_append_printf(out, "
    "); padded = 0; break; + case COMMENTBLOCK: + pad(out, 2); + g_string_append_printf(out, ""); + padded = 0; + break; case REFERENCE: /* Nonprinting */ break; @@ -453,11 +477,11 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { break; case GLOSSARYTERM: g_string_append_printf(out,""); - print_html_string(out, elt->children->contents.str, obfuscate); + print_html_string(ext, out, elt->children->contents.str, obfuscate); g_string_append_printf(out, ""); if ((elt->next != NULL) && (elt->next->key == GLOSSARYSORTKEY) ) { g_string_append_printf(out, ""); - print_html_string(out, elt->next->contents.str, obfuscate); + print_html_string(ext, out, elt->next->contents.str, obfuscate); g_string_append_printf(out, ""); } g_string_append_printf(out, ": "); @@ -479,7 +503,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, ""); if (locator != NULL) { g_string_append_printf(out, "["); - print_html_element(out,locator,obfuscate); + print_html_element(ext, out,locator,obfuscate); g_string_append_printf(out, "]"); } g_string_append_printf(out, "%s",elt->contents.str); @@ -505,7 +529,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { elt->children->contents.str); } else { g_string_append_printf(out, "[", elt->children->contents.str); - print_html_element(out,locator,obfuscate); + print_html_element(ext, out,locator,obfuscate); g_string_append_printf(out,", %s]", elt->children->contents.str); } @@ -525,20 +549,20 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { } break; case LOCATOR: - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); break; case DEFLIST: pad(out,1); padded = 1; g_string_append_printf(out, "
    \n"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "
    \n"); padded = 0; break; case TERM: pad(out,1); g_string_append_printf(out, "
    "); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "
    \n"); padded = 1; break; @@ -546,7 +570,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { pad(out,1); padded = 1; g_string_append_printf(out, "
    "); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "
    \n"); padded = 0; break; @@ -554,19 +578,19 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { /* Metadata is present, so this should be a "complete" document */ html_footer = is_html_complete_doc(elt); if (html_footer) { - print_html_header(out, elt, obfuscate); + print_html_header(ext, out, elt, obfuscate); } else { - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); } break; case METAKEY: if (strcmp(elt->contents.str, "title") == 0) { g_string_append_printf(out, "\t"); - print_html_element(out, elt->children, obfuscate); + print_html_element(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n"); } else if (strcmp(elt->contents.str, "css") == 0) { g_string_append_printf(out, "\tchildren, obfuscate); + print_html_element(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\"/>\n"); } else if (strcmp(elt->contents.str, "xhtmlheader") == 0) { print_raw_element(out, elt->children); @@ -590,23 +614,23 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { free(label); } else { g_string_append_printf(out, "\tcontents.str, obfuscate); + print_html_string(ext, out, elt->contents.str, obfuscate); g_string_append_printf(out, "\" content=\""); - print_html_element(out, elt->children, obfuscate); + print_html_element(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\"/>\n"); } break; case METAVALUE: - print_html_string(out, elt->contents.str, obfuscate); + print_html_string(ext, out, elt->contents.str, obfuscate); break; case FOOTER: break; case HEADINGSECTION: - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); break; case TABLE: g_string_append_printf(out, "\n\n\n"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "
    \n"); break; case TABLESEPARATOR: @@ -619,7 +643,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { label = label_from_element_list(elt->children,obfuscate); } g_string_append_printf(out, "", label); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n"); free(label); break; @@ -637,28 +661,32 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "\n"); } else if ( strncmp(&table_alignment[table_column],"C",1) == 0) { g_string_append_printf(out, "\n"); - } else if ( strncmp(&table_alignment[table_column],"L",1) == 0) { + } else if ( strncmp(&table_alignment[table_column],"l",1) == 0) { + g_string_append_printf(out, "\n"); + } else if ( strncmp(&table_alignment[table_column],"L",1) == 0) { g_string_append_printf(out, "\n"); - } else { - g_string_append_printf(out, "\n"); - } + } else if ( strncmp(&table_alignment[table_column],"n",1) == 0) { + g_string_append_printf(out, "\n"); + } else if ( strncmp(&table_alignment[table_column],"N",1) == 0) { + g_string_append_printf(out, "\n"); + } } g_string_append_printf(out, "\n"); cell_type = 'h'; g_string_append_printf(out, "\n\n"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n"); cell_type = 'd'; break; case TABLEBODY: g_string_append_printf(out, "\n\n"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n"); break; case TABLEROW: g_string_append_printf(out, "\n"); table_column = 0; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n"); break; case TABLECELL: @@ -670,15 +698,19 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "\tchildren != NULL) && (elt->children->key == CELLSPAN)) { g_string_append_printf(out, " colspan=\"%d\"",(int)strlen(elt->children->contents.str)+1); } g_string_append_printf(out, ">"); padded = 2; - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n", cell_type); table_column++; break; @@ -693,13 +725,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { } break; case MATHSPAN: - if ( elt->contents.str[strlen(elt->contents.str)-1] == ']') { - elt->contents.str[strlen(elt->contents.str)-3] = '\0'; - g_string_append_printf(out, "%s\\]", elt->contents.str); - } else { - elt->contents.str[strlen(elt->contents.str)-3] = '\0'; - g_string_append_printf(out, "%s\\)", elt->contents.str); - } + g_string_append_printf(out, "%s", elt->contents.str); break; default: fprintf(stderr, "print_html_element encountered unknown element key = %d\n", elt->key); @@ -707,7 +733,7 @@ static void print_html_element(GString *out, element *elt, bool obfuscate) { } } -static void print_html_endnotes(GString *out) { +static void print_html_endnotes(int ext, GString *out) { int counter = 0; GSList *note; element *note_elt; @@ -724,12 +750,12 @@ static void print_html_endnotes(GString *out) { element *temp = note_elt; while ( temp != NULL ) { if (temp->key == NOTELABEL) - print_html_string(out, temp->contents.str, 0); + print_html_string(ext, out, temp->contents.str, 0); temp = temp->next; } g_string_append_printf(out, "
    "); padded = 2; - print_html_element_list(out, note_elt->children, false); + print_html_element_list(ext, out, note_elt->children, false); pad(out, 1); g_string_append_printf(out, ""); } else { @@ -737,7 +763,7 @@ static void print_html_endnotes(GString *out) { padded = 2; am_printing_html_footnote = TRUE; footnote_counter_to_print = counter; - print_html_element_list(out, note_elt, false); + print_html_element_list(ext, out, note_elt, false); am_printing_html_footnote = FALSE; footnote_counter_to_print = 0; pad(out, 1); @@ -1006,6 +1032,11 @@ static void print_latex_element(GString *out, element *elt) { print_latex_element_list(out, elt->children); g_string_append_printf(out, "}"); break; + case DELETE: + g_string_append_printf(out, "\\sout{"); + print_latex_element_list(out, elt->children); + g_string_append_printf(out, "}"); + break; case LIST: print_latex_element_list(out, elt->children); break; @@ -1092,6 +1123,13 @@ static void print_latex_element(GString *out, element *elt) { g_string_append_printf(out, "\\end{verbatim}\n"); padded = 0; break; + case CODEBLOCK: + pad(out, 1); + g_string_append_printf(out, "\n\\begin{verbatim}\n"); + print_raw_element(out, elt); + g_string_append_printf(out, "\\end{verbatim}\n"); + padded = 0; + break; case BULLETLIST: pad(out, 1); g_string_append_printf(out, "\n\\begin{itemize}"); @@ -1519,6 +1557,8 @@ static void print_groff_mm_element(GString *out, element *elt, int count) { g_string_append_printf(out, "\""); padded = 0; break; + case DELETE: + // Not supported case PLAIN: pad(out, 1); print_groff_mm_element_list(out, elt->children); @@ -1546,6 +1586,13 @@ static void print_groff_mm_element(GString *out, element *elt, int count) { g_string_append_printf(out, ".VERBOFF"); padded = 0; break; + case CODEBLOCK: + pad(out, 1); + g_string_append_printf(out, ".VERBON 2\n"); + print_groff_string(out, elt->contents.codeblock->code); + g_string_append_printf(out, ".VERBOFF"); + padded = 0; + break; case BULLETLIST: pad(out, 1); g_string_append_printf(out, ".BL"); @@ -1742,7 +1789,7 @@ static void print_odf_element(GString *out, element *elt) { g_string_append_printf(out, ""); break; case STR: - print_html_string(out, elt->contents.str, 0); + print_html_string(0, out, elt->contents.str, 0); break; case ELLIPSIS: localize_typography(out, ELLIP, language, HTMLOUT); @@ -1768,7 +1815,7 @@ static void print_odf_element(GString *out, element *elt) { break; case CODE: g_string_append_printf(out, ""); - print_html_string(out, elt->contents.str, 0); + print_html_string(0, out, elt->contents.str, 0); g_string_append_printf(out, ""); break; case HTML: @@ -1793,14 +1840,14 @@ static void print_odf_element(GString *out, element *elt) { } } else { g_string_append_printf(out, "contents.link->url, 0); + print_html_string(0, out, elt->contents.link->url, 0); g_string_append_printf(out, "\""); if (strlen(elt->contents.link->title) > 0) { g_string_append_printf(out, " office:name=\""); - print_html_string(out, elt->contents.link->title, 0); + print_html_string(0, out, elt->contents.link->title, 0); g_string_append_printf(out, "\""); } - /* print_html_element_list(out, elt->contents.link->attr, obfuscate);*/ + /* print_html_element_list(ext, out, elt->contents.link->attr, obfuscate);*/ g_string_append_printf(out, ">"); print_odf_element_list(out, elt->contents.link->label); g_string_append_printf(out, ""); @@ -1849,6 +1896,12 @@ static void print_odf_element(GString *out, element *elt) { print_odf_element_list(out, elt->children); g_string_append_printf(out, ""); break; + case DELETE: + g_string_append_printf(out, + ""); + print_odf_element_list(out, elt->children); + g_string_append_printf(out, ""); + break; case LIST: print_odf_element_list(out, elt->children); break; @@ -1891,6 +1944,9 @@ static void print_odf_element(GString *out, element *elt) { case VERBATIM: g_string_append_printf(out," text:style-name=\"Preformatted Text\""); break; + case CODEBLOCK: + g_string_append_printf(out," text:style-name=\"Preformatted Text\""); + break; case ORDEREDLIST: case BULLETLIST: g_string_append_printf(out," text:style-name=\"P2\""); @@ -1926,7 +1982,15 @@ static void print_odf_element(GString *out, element *elt) { g_string_append_printf(out, "\n"); odf_type = old_type; break; - case BULLETLIST: + case CODEBLOCK: + old_type = odf_type; + odf_type = VERBATIM; + g_string_append_printf(out, ""); + print_odf_code_string(out, elt->contents.codeblock->code); + g_string_append_printf(out, "\n"); + odf_type = old_type; + break; + case BULLETLIST: if ((odf_type == BULLETLIST) || (odf_type == ORDEREDLIST)) { /* I think this was made unnecessary by another change. @@ -2234,12 +2298,12 @@ void print_element_list(GString *out, element *elt, int format, int exts) { format = find_latex_mode(format, elt); switch (format) { case HTML_FORMAT: - print_html_element_list(out, elt, false); + print_html_element_list(exts, out, elt, false); if (endnotes != NULL) { pad(out, 2); - print_html_endnotes(out); + print_html_endnotes(exts, out); } - if (html_footer == TRUE) print_html_footer(out, false); + if (html_footer == TRUE) print_html_footer(exts, out, false); break; case LATEX_FORMAT: print_latex_element_list(out, elt); @@ -2296,16 +2360,16 @@ void print_element_list(GString *out, element *elt, int format, int exts) { ***********************************************************************/ -void print_html_header(GString *out, element *elt, bool obfuscate) { +void print_html_header(int ext, GString *out, element *elt, bool obfuscate) { g_string_append_printf(out, "\n\n\n\t\n"); - print_html_element_list(out, elt->children, obfuscate); + print_html_element_list(ext, out, elt->children, obfuscate); g_string_append_printf(out, "\n\n\n"); } -void print_html_footer(GString *out, bool obfuscate) { +void print_html_footer(int ext, GString *out, bool obfuscate) { g_string_append_printf(out, "\n\n\n"); } @@ -2339,6 +2403,7 @@ void print_memoir_element_list(GString *out, element *list) { static void print_memoir_element(GString *out, element *elt) { switch (elt->key) { case VERBATIM: + case CODEBLOCK: pad(out, 1); g_string_append_printf(out, "\n\\begin{adjustwidth}{2.5em}{2.5em}\n\\begin{verbatim}\n\n"); print_raw_element(out, elt); @@ -2480,13 +2545,13 @@ static void print_beamer_element(GString *out, element *elt) { } -element * print_html_headingsection(GString *out, element *list, bool obfuscate) { +element * print_html_headingsection(int ext, GString *out, element *list, bool obfuscate) { element *base = list; - print_html_element_list(out, list->children, obfuscate); + print_html_element_list(ext, out, list->children, obfuscate); list = list->next; while ( (list != NULL) && (list->key == HEADINGSECTION) && (list->children->key > base->children->key) && (list->children->key <= H6)) { - list = print_html_headingsection(out, list, obfuscate); + list = print_html_headingsection(ext, out, list, obfuscate); } return list; @@ -2748,7 +2813,10 @@ static void print_opml_element(GString *out, element *elt) { case VERBATIM: print_opml_string(out, elt->contents.str); break; - case SPACE: + case CODEBLOCK: + print_opml_string(out, elt->contents.codeblock->code); + break; + case SPACE: print_opml_string(out, elt->contents.str); break; case STR: @@ -2822,12 +2890,3 @@ void print_odf_body_element_list(GString *out, element *list) { list = list->next; } } - -/* bogus function just references a couple globals defined in utility_functions.c but not used in this source file */ -static void bogus_function() -{ - static char* bogus; - bogus = charbuf; - static element* bogus2; - bogus2 = parse_result; -} diff --git a/Sources/Private/markdown_parser.h b/Sources/Private/markdown_parser.h new file mode 100644 index 00000000..b78716eb --- /dev/null +++ b/Sources/Private/markdown_parser.h @@ -0,0 +1,12995 @@ +/* A recursive-descent parser generated by peg 0.1.17 */ + +#include +#include +#include +#define YYRULECOUNT 351 +#line 1 "Sources/Private/markdown_parser.leg" + +/********************************************************************** + + markdown_parser.leg - markdown parser in C using a PEG grammar. + (c) 2008 John MacFarlane (jgm at berkeley dot edu). + + portions Copyright (c) 2010-2011 Fletcher T. Penney + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License or the MIT + license. See LICENSE for details. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + ***********************************************************************/ + +#include +#include + +#include "markdown_peg.h" +#include "utility_functions.h" +#include "parsing_functions.h" + +#pragma clang diagnostic ignored "-Wunreachable-code" + +#define YY_CTX_MEMBERS markdown_parser_state *state; + + +/********************************************************************** + + Definitions for leg parser generator. + YY_INPUT is the function the parser calls to get new input. + We take all new input from (static) charbuf. + + ***********************************************************************/ + + + +# define YYSTYPE element * +#ifdef __DEBUG__ +# define YY_DEBUG 1 +#endif + +#define YY_INPUT(yy, buf, result, max_size) \ +{ \ + int yyc = *(yy->state->charbuf); \ + if (yy->state->charbuf && *(yy->state->charbuf) != '\0') { \ + yy->state->charbuf ++;\ + } else { \ + yyc= EOF; \ + } \ + result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ +} + +#define YY_RULE(T) T + + +#define YY_DEBUG_OFF + +/********************************************************************** + + PEG grammar and parser actions for markdown syntax. + + ***********************************************************************/ + + +#ifndef YY_MALLOC +#define YY_MALLOC(C, N) malloc(N) +#endif +#ifndef YY_REALLOC +#define YY_REALLOC(C, P, N) realloc(P, N) +#endif +#ifndef YY_FREE +#define YY_FREE(C, P) free(P) +#endif +#ifndef YY_LOCAL +#define YY_LOCAL(T) static T +#endif +#ifndef YY_ACTION +#define YY_ACTION(T) static T +#endif +#ifndef YY_RULE +#define YY_RULE(T) static T +#endif +#ifndef YY_PARSE +#define YY_PARSE(T) T +#endif +#ifndef YYPARSE +#define YYPARSE yyparse +#endif +#ifndef YYPARSEFROM +#define YYPARSEFROM yyparsefrom +#endif +#ifndef YYRELEASE +#define YYRELEASE yyrelease +#endif +#ifndef YY_BEGIN +#define YY_BEGIN ( yy->__begin= yy->__pos, 1) +#endif +#ifndef YY_END +#define YY_END ( yy->__end= yy->__pos, 1) +#endif +#ifdef YY_DEBUG +# define yyprintf(args) fprintf args +#else +# define yyprintf(args) +#endif +#ifndef YYSTYPE +#define YYSTYPE int +#endif +#ifndef YY_STACK_SIZE +#define YY_STACK_SIZE 128 +#endif + +#ifndef YY_BUFFER_SIZE +#define YY_BUFFER_SIZE 1024 +#endif + +#ifndef YY_PART + +typedef struct _yycontext yycontext; +typedef void (*yyaction)(yycontext *yy, char *yytext, int yyleng); +typedef struct _yythunk { int begin, end; yyaction action; struct _yythunk *next; } yythunk; + +struct _yycontext { + char *__buf; + int __buflen; + int __pos; + int __limit; + char *__text; + int __textlen; + int __begin; + int __end; + int __textmax; + yythunk *__thunks; + int __thunkslen; + int __thunkpos; + YYSTYPE __; + YYSTYPE *__val; + YYSTYPE *__vals; + int __valslen; +#ifdef YY_CTX_MEMBERS + YY_CTX_MEMBERS +#endif +}; + +#ifdef YY_CTX_LOCAL +#define YY_CTX_PARAM_ yycontext *yyctx, +#define YY_CTX_PARAM yycontext *yyctx +#define YY_CTX_ARG_ yyctx, +#define YY_CTX_ARG yyctx +#ifndef YY_INPUT +#define YY_INPUT(yy, buf, result, max_size) \ + { \ + int yyc= getchar(); \ + result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ + yyprintf((stderr, "<%c>", yyc)); \ + } +#endif +#else +#define YY_CTX_PARAM_ +#define YY_CTX_PARAM +#define YY_CTX_ARG_ +#define YY_CTX_ARG +yycontext _yyctx= { 0, 0 }; +yycontext *yyctx= &_yyctx; +#ifndef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { \ + int yyc= getchar(); \ + result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ + yyprintf((stderr, "<%c>", yyc)); \ + } +#endif +#endif + +YY_LOCAL(int) yyrefill(yycontext *yy) +{ + int yyn; + while (yy->__buflen - yy->__pos < 512) + { + yy->__buflen *= 2; + yy->__buf= (char *)YY_REALLOC(yy, yy->__buf, yy->__buflen); + } +#ifdef YY_CTX_LOCAL + YY_INPUT(yy, (yy->__buf + yy->__pos), yyn, (yy->__buflen - yy->__pos)); +#else + YY_INPUT((yy->__buf + yy->__pos), yyn, (yy->__buflen - yy->__pos)); +#endif + if (!yyn) return 0; + yy->__limit += yyn; + return 1; +} + +YY_LOCAL(int) yymatchDot(yycontext *yy) +{ + if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; + ++yy->__pos; + return 1; +} + +YY_LOCAL(int) yymatchChar(yycontext *yy, int c) +{ + if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; + if ((unsigned char)yy->__buf[yy->__pos] == c) + { + ++yy->__pos; + yyprintf((stderr, " ok yymatchChar(yy, %c) @ %s\n", c, yy->__buf+yy->__pos)); + return 1; + } + yyprintf((stderr, " fail yymatchChar(yy, %c) @ %s\n", c, yy->__buf+yy->__pos)); + return 0; +} + +YY_LOCAL(int) yymatchString(yycontext *yy, const char *s) +{ + int yysav= yy->__pos; + while (*s) + { + if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; + if (yy->__buf[yy->__pos] != *s) + { + yy->__pos= yysav; + return 0; + } + ++s; + ++yy->__pos; + } + return 1; +} + +YY_LOCAL(int) yymatchClass(yycontext *yy, unsigned char *bits) +{ + int c; + if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; + c= (unsigned char)yy->__buf[yy->__pos]; + if (bits[c >> 3] & (1 << (c & 7))) + { + ++yy->__pos; + yyprintf((stderr, " ok yymatchClass @ %s\n", yy->__buf+yy->__pos)); + return 1; + } + yyprintf((stderr, " fail yymatchClass @ %s\n", yy->__buf+yy->__pos)); + return 0; +} + +YY_LOCAL(void) yyDo(yycontext *yy, yyaction action, int begin, int end) +{ + while (yy->__thunkpos >= yy->__thunkslen) + { + yy->__thunkslen *= 2; + yy->__thunks= (yythunk *)YY_REALLOC(yy, yy->__thunks, sizeof(yythunk) * yy->__thunkslen); + } + yy->__thunks[yy->__thunkpos].begin= begin; + yy->__thunks[yy->__thunkpos].end= end; + yy->__thunks[yy->__thunkpos].action= action; + ++yy->__thunkpos; +} + +YY_LOCAL(int) yyText(yycontext *yy, int begin, int end) +{ + int yyleng= end - begin; + if (yyleng <= 0) + yyleng= 0; + else + { + while (yy->__textlen < (yyleng + 1)) + { + yy->__textlen *= 2; + yy->__text= (char *)YY_REALLOC(yy, yy->__text, yy->__textlen); + } + memcpy(yy->__text, yy->__buf + begin, yyleng); + } + yy->__text[yyleng]= '\0'; + return yyleng; +} + +YY_LOCAL(void) yyDone(yycontext *yy) +{ + int pos; + for (pos= 0; pos < yy->__thunkpos; ++pos) + { + yythunk *thunk= &yy->__thunks[pos]; + int yyleng= thunk->end ? yyText(yy, thunk->begin, thunk->end) : thunk->begin; + yyprintf((stderr, "DO [%d] %p %s\n", pos, thunk->action, yy->__text)); + thunk->action(yy, yy->__text, yyleng); + } + yy->__thunkpos= 0; +} + +YY_LOCAL(void) yyCommit(yycontext *yy) +{ + if ((yy->__limit -= yy->__pos)) + { + memmove(yy->__buf, yy->__buf + yy->__pos, yy->__limit); + } + yy->__begin -= yy->__pos; + yy->__end -= yy->__pos; + yy->__pos= yy->__thunkpos= 0; +} + +YY_LOCAL(int) yyAccept(yycontext *yy, int tp0) +{ + if (tp0) + { + fprintf(stderr, "accept denied at %d\n", tp0); + return 0; + } + else + { + yyDone(yy); + yyCommit(yy); + } + return 1; +} + +YY_LOCAL(void) yyPush(yycontext *yy, char *text, int count) +{ + yy->__val += count; + while (yy->__valslen <= yy->__val - yy->__vals) + { + long offset= yy->__val - yy->__vals; + yy->__valslen *= 2; + yy->__vals= (YYSTYPE *)YY_REALLOC(yy, yy->__vals, sizeof(YYSTYPE) * yy->__valslen); + yy->__val= yy->__vals + offset; + } +} +YY_LOCAL(void) yyPop(yycontext *yy, char *text, int count) { yy->__val -= count; } +YY_LOCAL(void) yySet(yycontext *yy, char *text, int count) { yy->__val[count]= yy->__; } + +#endif /* YY_PART */ + +#define YYACCEPT yyAccept(yy, yythunkpos0) + +YY_RULE(int) yy_MarkdownHtmlAttribute(yycontext *yy); /* 351 */ +YY_RULE(int) yy_OPMLSetextHeading2(yycontext *yy); /* 350 */ +YY_RULE(int) yy_OPMLSetextHeading1(yycontext *yy); /* 349 */ +YY_RULE(int) yy_OPMLSetextHeading(yycontext *yy); /* 348 */ +YY_RULE(int) yy_OPMLAtxHeading(yycontext *yy); /* 347 */ +YY_RULE(int) yy_OPMLSectionBlock(yycontext *yy); /* 346 */ +YY_RULE(int) yy_OPMLHeading(yycontext *yy); /* 345 */ +YY_RULE(int) yy_OPMLPlain(yycontext *yy); /* 344 */ +YY_RULE(int) yy_OPMLHeadingSection(yycontext *yy); /* 343 */ +YY_RULE(int) yy_OPMLBlock(yycontext *yy); /* 342 */ +YY_RULE(int) yy_DocForOPML(yycontext *yy); /* 341 */ +YY_RULE(int) yy_MMDMathSpan(yycontext *yy); /* 340 */ +YY_RULE(int) yy_ULMathSpan(yycontext *yy); /* 339 */ +YY_RULE(int) yy_NaturalAlign(yycontext *yy); /* 338 */ +YY_RULE(int) yy_RightAlign(yycontext *yy); /* 337 */ +YY_RULE(int) yy_CenterAlign(yycontext *yy); /* 336 */ +YY_RULE(int) yy_LeftAlign(yycontext *yy); /* 335 */ +YY_RULE(int) yy_NaturalAlignWrap(yycontext *yy); /* 334 */ +YY_RULE(int) yy_RightAlignWrap(yycontext *yy); /* 333 */ +YY_RULE(int) yy_CenterAlignWrap(yycontext *yy); /* 332 */ +YY_RULE(int) yy_LeftAlignWrap(yycontext *yy); /* 331 */ +YY_RULE(int) yy_AlignmentCell(yycontext *yy); /* 330 */ +YY_RULE(int) yy_CellStr(yycontext *yy); /* 329 */ +YY_RULE(int) yy_FullCell(yycontext *yy); /* 328 */ +YY_RULE(int) yy_EmptyCell(yycontext *yy); /* 327 */ +YY_RULE(int) yy_ExtendedCell(yycontext *yy); /* 326 */ +YY_RULE(int) yy_TableCell(yycontext *yy); /* 325 */ +YY_RULE(int) yy_CellDivider(yycontext *yy); /* 324 */ +YY_RULE(int) yy_TableLine(yycontext *yy); /* 323 */ +YY_RULE(int) yy_TableRow(yycontext *yy); /* 322 */ +YY_RULE(int) yy_ULNewline(yycontext *yy); /* 321 */ +YY_RULE(int) yy_Definition(yycontext *yy); /* 320 */ +YY_RULE(int) yy_Term(yycontext *yy); /* 319 */ +YY_RULE(int) yy_TermLine(yycontext *yy); /* 318 */ +YY_RULE(int) yy_SeparatorLine(yycontext *yy); /* 317 */ +YY_RULE(int) yy_TableBody(yycontext *yy); /* 316 */ +YY_RULE(int) yy_TableCaption(yycontext *yy); /* 315 */ +YY_RULE(int) yy_AutoLabels(yycontext *yy); /* 314 */ +YY_RULE(int) yy_RawCitationReference(yycontext *yy); /* 313 */ +YY_RULE(int) yy_CitationReferenceSingle(yycontext *yy); /* 312 */ +YY_RULE(int) yy_CitationReferenceDouble(yycontext *yy); /* 311 */ +YY_RULE(int) yy_Notes(yycontext *yy); /* 310 */ +YY_RULE(int) yy_InlineNote(yycontext *yy); /* 309 */ +YY_RULE(int) yy_RawNoteBlock(yycontext *yy); /* 308 */ +YY_RULE(int) yy_GlossarySortKey(yycontext *yy); /* 307 */ +YY_RULE(int) yy_GlossaryTerm(yycontext *yy); /* 306 */ +YY_RULE(int) yy_RawNoteReference(yycontext *yy); /* 305 */ +YY_RULE(int) yy_DoubleQuoteEnd(yycontext *yy); /* 304 */ +YY_RULE(int) yy_DoubleQuoteStart(yycontext *yy); /* 303 */ +YY_RULE(int) yy_SingleQuoteEnd(yycontext *yy); /* 302 */ +YY_RULE(int) yy_SingleQuoteStart(yycontext *yy); /* 301 */ +YY_RULE(int) yy_EnDash(yycontext *yy); /* 300 */ +YY_RULE(int) yy_EmDash(yycontext *yy); /* 299 */ +YY_RULE(int) yy_Apostrophe(yycontext *yy); /* 298 */ +YY_RULE(int) yy_DoubleQuoted(yycontext *yy); /* 297 */ +YY_RULE(int) yy_SingleQuoted(yycontext *yy); /* 296 */ +YY_RULE(int) yy_Dash(yycontext *yy); /* 295 */ +YY_RULE(int) yy_Ellipsis(yycontext *yy); /* 294 */ +YY_RULE(int) yy_Digit(yycontext *yy); /* 293 */ +YY_RULE(int) yy_ExtendedSpecialChar(yycontext *yy); /* 292 */ +YY_RULE(int) yy_Quoted(yycontext *yy); /* 291 */ +YY_RULE(int) yy_HtmlTag(yycontext *yy); /* 290 */ +YY_RULE(int) yy_Ticks5(yycontext *yy); /* 289 */ +YY_RULE(int) yy_Ticks4(yycontext *yy); /* 288 */ +YY_RULE(int) yy_Ticks3(yycontext *yy); /* 287 */ +YY_RULE(int) yy_Ticks2(yycontext *yy); /* 286 */ +YY_RULE(int) yy_Ticks1(yycontext *yy); /* 285 */ +YY_RULE(int) yy_SkipBlock(yycontext *yy); /* 284 */ +YY_RULE(int) yy_References(yycontext *yy); /* 283 */ +YY_RULE(int) yy_EmptyTitle(yycontext *yy); /* 282 */ +YY_RULE(int) yy_RefTitleParens(yycontext *yy); /* 281 */ +YY_RULE(int) yy_RefTitleDouble(yycontext *yy); /* 280 */ +YY_RULE(int) yy_RefTitleSingle(yycontext *yy); /* 279 */ +YY_RULE(int) yy_UnQuotedValue(yycontext *yy); /* 278 */ +YY_RULE(int) yy_QuotedValue(yycontext *yy); /* 277 */ +YY_RULE(int) yy_AttrValue(yycontext *yy); /* 276 */ +YY_RULE(int) yy_AttrKey(yycontext *yy); /* 275 */ +YY_RULE(int) yy_Attribute(yycontext *yy); /* 274 */ +YY_RULE(int) yy_RefTitle(yycontext *yy); /* 273 */ +YY_RULE(int) yy_RefSrc(yycontext *yy); /* 272 */ +YY_RULE(int) yy_AutoLinkEmail(yycontext *yy); /* 271 */ +YY_RULE(int) yy_AutoLinkUrl(yycontext *yy); /* 270 */ +YY_RULE(int) yy_TitleDouble(yycontext *yy); /* 269 */ +YY_RULE(int) yy_TitleSingle(yycontext *yy); /* 268 */ +YY_RULE(int) yy_Nonspacechar(yycontext *yy); /* 267 */ +YY_RULE(int) yy_SourceContents(yycontext *yy); /* 266 */ +YY_RULE(int) yy_Attributes(yycontext *yy); /* 265 */ +YY_RULE(int) yy_Title(yycontext *yy); /* 264 */ +YY_RULE(int) yy_Source(yycontext *yy); /* 263 */ +YY_RULE(int) yy_Label(yycontext *yy); /* 262 */ +YY_RULE(int) yy_ReferenceLinkSingle(yycontext *yy); /* 261 */ +YY_RULE(int) yy_ReferenceLinkDouble(yycontext *yy); /* 260 */ +YY_RULE(int) yy_AutoLink(yycontext *yy); /* 259 */ +YY_RULE(int) yy_ReferenceLink(yycontext *yy); /* 258 */ +YY_RULE(int) yy_ExplicitLink(yycontext *yy); /* 257 */ +YY_RULE(int) yy_StrongUl(yycontext *yy); /* 256 */ +YY_RULE(int) yy_StrongStar(yycontext *yy); /* 255 */ +YY_RULE(int) yy_Whitespace(yycontext *yy); /* 254 */ +YY_RULE(int) yy_EmphUl(yycontext *yy); /* 253 */ +YY_RULE(int) yy_EmphStar(yycontext *yy); /* 252 */ +YY_RULE(int) yy_StarLine(yycontext *yy); /* 251 */ +YY_RULE(int) yy_UlLine(yycontext *yy); /* 250 */ +YY_RULE(int) yy_SpecialChar(yycontext *yy); /* 249 */ +YY_RULE(int) yy_NormalEndline(yycontext *yy); /* 248 */ +YY_RULE(int) yy_TerminalEndline(yycontext *yy); /* 247 */ +YY_RULE(int) yy_CharEntity(yycontext *yy); /* 246 */ +YY_RULE(int) yy_DecEntity(yycontext *yy); /* 245 */ +YY_RULE(int) yy_HexEntity(yycontext *yy); /* 244 */ +YY_RULE(int) yy_AposChunk(yycontext *yy); /* 243 */ +YY_RULE(int) yy_Alphanumeric(yycontext *yy); /* 242 */ +YY_RULE(int) yy_StrChunk(yycontext *yy); /* 241 */ +YY_RULE(int) yy_NormalChar(yycontext *yy); /* 240 */ +YY_RULE(int) yy_OptionalSpace(yycontext *yy); /* 239 */ +YY_RULE(int) yy_Symbol(yycontext *yy); /* 238 */ +YY_RULE(int) yy_Smart(yycontext *yy); /* 237 */ +YY_RULE(int) yy_KeptEscapedChar(yycontext *yy); /* 236 */ +YY_RULE(int) yy_EscapedChar(yycontext *yy); /* 235 */ +YY_RULE(int) yy_Entity(yycontext *yy); /* 234 */ +YY_RULE(int) yy_RawHtml(yycontext *yy); /* 233 */ +YY_RULE(int) yy_Code(yycontext *yy); /* 232 */ +YY_RULE(int) yy_Comment(yycontext *yy); /* 231 */ +YY_RULE(int) yy_NoteReference(yycontext *yy); /* 230 */ +YY_RULE(int) yy_Link(yycontext *yy); /* 229 */ +YY_RULE(int) yy_Image(yycontext *yy); /* 228 */ +YY_RULE(int) yy_CitationReference(yycontext *yy); /* 227 */ +YY_RULE(int) yy_Delete(yycontext *yy); /* 226 */ +YY_RULE(int) yy_Emph(yycontext *yy); /* 225 */ +YY_RULE(int) yy_Strong(yycontext *yy); /* 224 */ +YY_RULE(int) yy_Space(yycontext *yy); /* 223 */ +YY_RULE(int) yy_UlOrStarLine(yycontext *yy); /* 222 */ +YY_RULE(int) yy_MathSpan(yycontext *yy); /* 221 */ +YY_RULE(int) yy_Str(yycontext *yy); /* 220 */ +YY_RULE(int) yy_InStyleTags(yycontext *yy); /* 219 */ +YY_RULE(int) yy_StyleClose(yycontext *yy); /* 218 */ +YY_RULE(int) yy_StyleOpen(yycontext *yy); /* 217 */ +YY_RULE(int) yy_HtmlBlockType(yycontext *yy); /* 216 */ +YY_RULE(int) yy_Eof(yycontext *yy); /* 215 */ +YY_RULE(int) yy_FencedCodeBlockIndentation(yycontext *yy); /* 214 */ +YY_RULE(int) yy_FencedCodeBlockLanguage(yycontext *yy); /* 213 */ +YY_RULE(int) yy_FencedCodeBlockMarker(yycontext *yy); /* 212 */ +YY_RULE(int) yy_FencedCodeBlockPreceedingIndentation(yycontext *yy); /* 211 */ +YY_RULE(int) yy_HtmlBlockSelfClosing(yycontext *yy); /* 210 */ +YY_RULE(int) yy_HtmlComment(yycontext *yy); /* 209 */ +YY_RULE(int) yy_MarkdownHtmlTagOpen(yycontext *yy); /* 208 */ +YY_RULE(int) yy_HtmlBlockInTags(yycontext *yy); /* 207 */ +YY_RULE(int) yy_HtmlBlockScript(yycontext *yy); /* 206 */ +YY_RULE(int) yy_HtmlBlockCloseScript(yycontext *yy); /* 205 */ +YY_RULE(int) yy_HtmlBlockOpenScript(yycontext *yy); /* 204 */ +YY_RULE(int) yy_HtmlBlockTr(yycontext *yy); /* 203 */ +YY_RULE(int) yy_HtmlBlockCloseTr(yycontext *yy); /* 202 */ +YY_RULE(int) yy_HtmlBlockOpenTr(yycontext *yy); /* 201 */ +YY_RULE(int) yy_HtmlBlockThead(yycontext *yy); /* 200 */ +YY_RULE(int) yy_HtmlBlockCloseThead(yycontext *yy); /* 199 */ +YY_RULE(int) yy_HtmlBlockOpenThead(yycontext *yy); /* 198 */ +YY_RULE(int) yy_HtmlBlockTh(yycontext *yy); /* 197 */ +YY_RULE(int) yy_HtmlBlockCloseTh(yycontext *yy); /* 196 */ +YY_RULE(int) yy_HtmlBlockOpenTh(yycontext *yy); /* 195 */ +YY_RULE(int) yy_HtmlBlockTfoot(yycontext *yy); /* 194 */ +YY_RULE(int) yy_HtmlBlockCloseTfoot(yycontext *yy); /* 193 */ +YY_RULE(int) yy_HtmlBlockOpenTfoot(yycontext *yy); /* 192 */ +YY_RULE(int) yy_HtmlBlockTd(yycontext *yy); /* 191 */ +YY_RULE(int) yy_HtmlBlockCloseTd(yycontext *yy); /* 190 */ +YY_RULE(int) yy_HtmlBlockOpenTd(yycontext *yy); /* 189 */ +YY_RULE(int) yy_HtmlBlockTbody(yycontext *yy); /* 188 */ +YY_RULE(int) yy_HtmlBlockCloseTbody(yycontext *yy); /* 187 */ +YY_RULE(int) yy_HtmlBlockOpenTbody(yycontext *yy); /* 186 */ +YY_RULE(int) yy_HtmlBlockLi(yycontext *yy); /* 185 */ +YY_RULE(int) yy_HtmlBlockCloseLi(yycontext *yy); /* 184 */ +YY_RULE(int) yy_HtmlBlockOpenLi(yycontext *yy); /* 183 */ +YY_RULE(int) yy_HtmlBlockFrameset(yycontext *yy); /* 182 */ +YY_RULE(int) yy_HtmlBlockCloseFrameset(yycontext *yy); /* 181 */ +YY_RULE(int) yy_HtmlBlockOpenFrameset(yycontext *yy); /* 180 */ +YY_RULE(int) yy_HtmlBlockDt(yycontext *yy); /* 179 */ +YY_RULE(int) yy_HtmlBlockCloseDt(yycontext *yy); /* 178 */ +YY_RULE(int) yy_HtmlBlockOpenDt(yycontext *yy); /* 177 */ +YY_RULE(int) yy_HtmlBlockDd(yycontext *yy); /* 176 */ +YY_RULE(int) yy_HtmlBlockCloseDd(yycontext *yy); /* 175 */ +YY_RULE(int) yy_HtmlBlockOpenDd(yycontext *yy); /* 174 */ +YY_RULE(int) yy_HtmlBlockVideo(yycontext *yy); /* 173 */ +YY_RULE(int) yy_HtmlBlockCloseVideo(yycontext *yy); /* 172 */ +YY_RULE(int) yy_HtmlBlockOpenVideo(yycontext *yy); /* 171 */ +YY_RULE(int) yy_HtmlBlockUl(yycontext *yy); /* 170 */ +YY_RULE(int) yy_HtmlBlockCloseUl(yycontext *yy); /* 169 */ +YY_RULE(int) yy_HtmlBlockOpenUl(yycontext *yy); /* 168 */ +YY_RULE(int) yy_HtmlBlockTable(yycontext *yy); /* 167 */ +YY_RULE(int) yy_HtmlBlockCloseTable(yycontext *yy); /* 166 */ +YY_RULE(int) yy_HtmlBlockOpenTable(yycontext *yy); /* 165 */ +YY_RULE(int) yy_HtmlBlockSection(yycontext *yy); /* 164 */ +YY_RULE(int) yy_HtmlBlockCloseSection(yycontext *yy); /* 163 */ +YY_RULE(int) yy_HtmlBlockOpenSection(yycontext *yy); /* 162 */ +YY_RULE(int) yy_HtmlBlockProgress(yycontext *yy); /* 161 */ +YY_RULE(int) yy_HtmlBlockCloseProgress(yycontext *yy); /* 160 */ +YY_RULE(int) yy_HtmlBlockOpenProgress(yycontext *yy); /* 159 */ +YY_RULE(int) yy_HtmlBlockPre(yycontext *yy); /* 158 */ +YY_RULE(int) yy_HtmlBlockClosePre(yycontext *yy); /* 157 */ +YY_RULE(int) yy_HtmlBlockOpenPre(yycontext *yy); /* 156 */ +YY_RULE(int) yy_HtmlBlockP(yycontext *yy); /* 155 */ +YY_RULE(int) yy_HtmlBlockCloseP(yycontext *yy); /* 154 */ +YY_RULE(int) yy_HtmlBlockOpenP(yycontext *yy); /* 153 */ +YY_RULE(int) yy_HtmlBlockOl(yycontext *yy); /* 152 */ +YY_RULE(int) yy_HtmlBlockCloseOl(yycontext *yy); /* 151 */ +YY_RULE(int) yy_HtmlBlockOpenOl(yycontext *yy); /* 150 */ +YY_RULE(int) yy_HtmlBlockNoscript(yycontext *yy); /* 149 */ +YY_RULE(int) yy_HtmlBlockCloseNoscript(yycontext *yy); /* 148 */ +YY_RULE(int) yy_HtmlBlockOpenNoscript(yycontext *yy); /* 147 */ +YY_RULE(int) yy_HtmlBlockNoframes(yycontext *yy); /* 146 */ +YY_RULE(int) yy_HtmlBlockCloseNoframes(yycontext *yy); /* 145 */ +YY_RULE(int) yy_HtmlBlockOpenNoframes(yycontext *yy); /* 144 */ +YY_RULE(int) yy_HtmlBlockMenu(yycontext *yy); /* 143 */ +YY_RULE(int) yy_HtmlBlockCloseMenu(yycontext *yy); /* 142 */ +YY_RULE(int) yy_HtmlBlockOpenMenu(yycontext *yy); /* 141 */ +YY_RULE(int) yy_HtmlBlockH6(yycontext *yy); /* 140 */ +YY_RULE(int) yy_HtmlBlockCloseH6(yycontext *yy); /* 139 */ +YY_RULE(int) yy_HtmlBlockOpenH6(yycontext *yy); /* 138 */ +YY_RULE(int) yy_HtmlBlockH5(yycontext *yy); /* 137 */ +YY_RULE(int) yy_HtmlBlockCloseH5(yycontext *yy); /* 136 */ +YY_RULE(int) yy_HtmlBlockOpenH5(yycontext *yy); /* 135 */ +YY_RULE(int) yy_HtmlBlockH4(yycontext *yy); /* 134 */ +YY_RULE(int) yy_HtmlBlockCloseH4(yycontext *yy); /* 133 */ +YY_RULE(int) yy_HtmlBlockOpenH4(yycontext *yy); /* 132 */ +YY_RULE(int) yy_HtmlBlockH3(yycontext *yy); /* 131 */ +YY_RULE(int) yy_HtmlBlockCloseH3(yycontext *yy); /* 130 */ +YY_RULE(int) yy_HtmlBlockOpenH3(yycontext *yy); /* 129 */ +YY_RULE(int) yy_HtmlBlockH2(yycontext *yy); /* 128 */ +YY_RULE(int) yy_HtmlBlockCloseH2(yycontext *yy); /* 127 */ +YY_RULE(int) yy_HtmlBlockOpenH2(yycontext *yy); /* 126 */ +YY_RULE(int) yy_HtmlBlockH1(yycontext *yy); /* 125 */ +YY_RULE(int) yy_HtmlBlockCloseH1(yycontext *yy); /* 124 */ +YY_RULE(int) yy_HtmlBlockOpenH1(yycontext *yy); /* 123 */ +YY_RULE(int) yy_HtmlBlockHgroup(yycontext *yy); /* 122 */ +YY_RULE(int) yy_HtmlBlockCloseHgroup(yycontext *yy); /* 121 */ +YY_RULE(int) yy_HtmlBlockOpenHgroup(yycontext *yy); /* 120 */ +YY_RULE(int) yy_HtmlBlockHeader(yycontext *yy); /* 119 */ +YY_RULE(int) yy_HtmlBlockCloseHeader(yycontext *yy); /* 118 */ +YY_RULE(int) yy_HtmlBlockOpenHeader(yycontext *yy); /* 117 */ +YY_RULE(int) yy_HtmlBlockForm(yycontext *yy); /* 116 */ +YY_RULE(int) yy_HtmlBlockCloseForm(yycontext *yy); /* 115 */ +YY_RULE(int) yy_HtmlBlockOpenForm(yycontext *yy); /* 114 */ +YY_RULE(int) yy_HtmlBlockFooter(yycontext *yy); /* 113 */ +YY_RULE(int) yy_HtmlBlockCloseFooter(yycontext *yy); /* 112 */ +YY_RULE(int) yy_HtmlBlockOpenFooter(yycontext *yy); /* 111 */ +YY_RULE(int) yy_HtmlBlockFigure(yycontext *yy); /* 110 */ +YY_RULE(int) yy_HtmlBlockCloseFigure(yycontext *yy); /* 109 */ +YY_RULE(int) yy_HtmlBlockOpenFigure(yycontext *yy); /* 108 */ +YY_RULE(int) yy_HtmlBlockFieldset(yycontext *yy); /* 107 */ +YY_RULE(int) yy_HtmlBlockCloseFieldset(yycontext *yy); /* 106 */ +YY_RULE(int) yy_HtmlBlockOpenFieldset(yycontext *yy); /* 105 */ +YY_RULE(int) yy_HtmlBlockDl(yycontext *yy); /* 104 */ +YY_RULE(int) yy_HtmlBlockCloseDl(yycontext *yy); /* 103 */ +YY_RULE(int) yy_HtmlBlockOpenDl(yycontext *yy); /* 102 */ +YY_RULE(int) yy_HtmlBlockDiv(yycontext *yy); /* 101 */ +YY_RULE(int) yy_HtmlBlockCloseDiv(yycontext *yy); /* 100 */ +YY_RULE(int) yy_HtmlBlockDir(yycontext *yy); /* 99 */ +YY_RULE(int) yy_HtmlBlockCloseDir(yycontext *yy); /* 98 */ +YY_RULE(int) yy_HtmlBlockOpenDir(yycontext *yy); /* 97 */ +YY_RULE(int) yy_HtmlBlockCenter(yycontext *yy); /* 96 */ +YY_RULE(int) yy_HtmlBlockCloseCenter(yycontext *yy); /* 95 */ +YY_RULE(int) yy_HtmlBlockOpenCenter(yycontext *yy); /* 94 */ +YY_RULE(int) yy_HtmlBlockCanvas(yycontext *yy); /* 93 */ +YY_RULE(int) yy_HtmlBlockCloseCanvas(yycontext *yy); /* 92 */ +YY_RULE(int) yy_HtmlBlockOpenCanvas(yycontext *yy); /* 91 */ +YY_RULE(int) yy_HtmlBlockBlockquote(yycontext *yy); /* 90 */ +YY_RULE(int) yy_HtmlBlockCloseBlockquote(yycontext *yy); /* 89 */ +YY_RULE(int) yy_HtmlBlockOpenBlockquote(yycontext *yy); /* 88 */ +YY_RULE(int) yy_HtmlBlockAside(yycontext *yy); /* 87 */ +YY_RULE(int) yy_HtmlBlockCloseAside(yycontext *yy); /* 86 */ +YY_RULE(int) yy_HtmlBlockOpenAside(yycontext *yy); /* 85 */ +YY_RULE(int) yy_HtmlBlockArticle(yycontext *yy); /* 84 */ +YY_RULE(int) yy_HtmlBlockCloseArticle(yycontext *yy); /* 83 */ +YY_RULE(int) yy_HtmlBlockOpenArticle(yycontext *yy); /* 82 */ +YY_RULE(int) yy_HtmlBlockAddress(yycontext *yy); /* 81 */ +YY_RULE(int) yy_HtmlBlockCloseAddress(yycontext *yy); /* 80 */ +YY_RULE(int) yy_HtmlAttribute(yycontext *yy); /* 79 */ +YY_RULE(int) yy_Spnl(yycontext *yy); /* 78 */ +YY_RULE(int) yy_HtmlBlockOpenAddress(yycontext *yy); /* 77 */ +YY_RULE(int) yy_OptionallyIndentedLine(yycontext *yy); /* 76 */ +YY_RULE(int) yy_Indent(yycontext *yy); /* 75 */ +YY_RULE(int) yy_ListBlockLine(yycontext *yy); /* 74 */ +YY_RULE(int) yy_ListContinuationBlock(yycontext *yy); /* 73 */ +YY_RULE(int) yy_ListBlock(yycontext *yy); /* 72 */ +YY_RULE(int) yy_ListItem(yycontext *yy); /* 71 */ +YY_RULE(int) yy_ListItemTight(yycontext *yy); /* 70 */ +YY_RULE(int) yy_Enumerator(yycontext *yy); /* 69 */ +YY_RULE(int) yy_BulletOrEnum(yycontext *yy); /* 68 */ +YY_RULE(int) yy_ListLoose(yycontext *yy); /* 67 */ +YY_RULE(int) yy_ListTight(yycontext *yy); /* 66 */ +YY_RULE(int) yy_Spacechar(yycontext *yy); /* 65 */ +YY_RULE(int) yy_Bullet(yycontext *yy); /* 64 */ +YY_RULE(int) yy_NonindentSpace(yycontext *yy); /* 63 */ +YY_RULE(int) yy_MagicBlankLine(yycontext *yy); /* 62 */ +YY_RULE(int) yy_FollowingVerbatimChunk(yycontext *yy); /* 61 */ +YY_RULE(int) yy_FirstVerbatimChunk(yycontext *yy); /* 60 */ +YY_RULE(int) yy_IndentedLine(yycontext *yy); /* 59 */ +YY_RULE(int) yy_NonblankIndentedLine(yycontext *yy); /* 58 */ +YY_RULE(int) yy_BlockCommentLine(yycontext *yy); /* 57 */ +YY_RULE(int) yy_BlockCommentRaw(yycontext *yy); /* 56 */ +YY_RULE(int) yy_Line(yycontext *yy); /* 55 */ +YY_RULE(int) yy_BlockQuoteRaw(yycontext *yy); /* 54 */ +YY_RULE(int) yy_Endline(yycontext *yy); /* 53 */ +YY_RULE(int) yy_SetextBottom2(yycontext *yy); /* 52 */ +YY_RULE(int) yy_SetextBottom1(yycontext *yy); /* 51 */ +YY_RULE(int) yy_SetextHeading2(yycontext *yy); /* 50 */ +YY_RULE(int) yy_SetextHeading1(yycontext *yy); /* 49 */ +YY_RULE(int) yy_SetextHeading(yycontext *yy); /* 48 */ +YY_RULE(int) yy_LineBreak(yycontext *yy); /* 47 */ +YY_RULE(int) yy_AtxHeading(yycontext *yy); /* 46 */ +YY_RULE(int) yy_AtxStart(yycontext *yy); /* 45 */ +YY_RULE(int) yy_Inline(yycontext *yy); /* 44 */ +YY_RULE(int) yy_AutoLabel(yycontext *yy); /* 43 */ +YY_RULE(int) yy_AtxInline(yycontext *yy); /* 42 */ +YY_RULE(int) yy_Inlines(yycontext *yy); /* 41 */ +YY_RULE(int) yy_CapturingNonindentSpace(yycontext *yy); /* 40 */ +YY_RULE(int) yy_Heading(yycontext *yy); /* 39 */ +YY_RULE(int) yy_HeadingSectionBlock(yycontext *yy); /* 38 */ +YY_RULE(int) yy_Plain(yycontext *yy); /* 37 */ +YY_RULE(int) yy_Para(yycontext *yy); /* 36 */ +YY_RULE(int) yy_HtmlBlockOpenDiv(yycontext *yy); /* 35 */ +YY_RULE(int) yy_ImageBlock(yycontext *yy); /* 34 */ +YY_RULE(int) yy_Table(yycontext *yy); /* 33 */ +YY_RULE(int) yy_StyleBlock(yycontext *yy); /* 32 */ +YY_RULE(int) yy_FencedCodeBlock(yycontext *yy); /* 31 */ +YY_RULE(int) yy_MarkdownHtmlBlock(yycontext *yy); /* 30 */ +YY_RULE(int) yy_HtmlBlock(yycontext *yy); /* 29 */ +YY_RULE(int) yy_BulletList(yycontext *yy); /* 28 */ +YY_RULE(int) yy_OrderedList(yycontext *yy); /* 27 */ +YY_RULE(int) yy_HeadingSection(yycontext *yy); /* 26 */ +YY_RULE(int) yy_HorizontalRule(yycontext *yy); /* 25 */ +YY_RULE(int) yy_Reference(yycontext *yy); /* 24 */ +YY_RULE(int) yy_Note(yycontext *yy); /* 23 */ +YY_RULE(int) yy_Glossary(yycontext *yy); /* 22 */ +YY_RULE(int) yy_DefinitionList(yycontext *yy); /* 21 */ +YY_RULE(int) yy_Verbatim(yycontext *yy); /* 20 */ +YY_RULE(int) yy_BlockComment(yycontext *yy); /* 19 */ +YY_RULE(int) yy_BlockQuote(yycontext *yy); /* 18 */ +YY_RULE(int) yy_RawLine(yycontext *yy); /* 17 */ +YY_RULE(int) yy_BlankLine(yycontext *yy); /* 16 */ +YY_RULE(int) yy_SingleLineMetaKeyValue(yycontext *yy); /* 15 */ +YY_RULE(int) yy_AlphanumericAscii(yycontext *yy); /* 14 */ +YY_RULE(int) yy_MetaDataValue(yycontext *yy); /* 13 */ +YY_RULE(int) yy_MetaDataOnly2(yycontext *yy); /* 12 */ +YY_RULE(int) yy_MetaDataOnly(yycontext *yy); /* 11 */ +YY_RULE(int) yy_MetaDataKeyValue(yycontext *yy); /* 10 */ +YY_RULE(int) yy_MetaData(yycontext *yy); /* 9 */ +YY_RULE(int) yy_Newline(yycontext *yy); /* 8 */ +YY_RULE(int) yy_Sp(yycontext *yy); /* 7 */ +YY_RULE(int) yy_MetaDataKey(yycontext *yy); /* 6 */ +YY_RULE(int) yy_DocWithMetaData(yycontext *yy); /* 5 */ +YY_RULE(int) yy_Block(yycontext *yy); /* 4 */ +YY_RULE(int) yy_StartList(yycontext *yy); /* 3 */ +YY_RULE(int) yy_BOM(yycontext *yy); /* 2 */ +YY_RULE(int) yy_Doc(yycontext *yy); /* 1 */ + +YY_ACTION(void) yy_8_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_8_MarkdownHtmlTagOpen\n")); + { + + __ = mk_str_from_list(a,false); + __->key = HTML; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_7_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_7_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(">"),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_6_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_6_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_5_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_5_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_4_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MarkdownHtmlTagOpen(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MarkdownHtmlTagOpen\n")); + { + a = cons(mk_str("<"),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_OPMLPlain(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_OPMLPlain\n")); + { + __ = mk_list(PLAIN, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_OPMLPlain(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OPMLPlain\n")); + { + a = cons(__,a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_OPMLSetextHeading2(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OPMLSetextHeading2\n")); + { + + __ = mk_str(yytext); + __->key = H2; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_OPMLSetextHeading1(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OPMLSetextHeading1\n")); + { + + __ = mk_str(yytext); + __->key = H1; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_OPMLAtxHeading(yycontext *yy, char *yytext, int yyleng) +{ +#define s yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OPMLAtxHeading\n")); + { + + __ = mk_str(yytext); + __->key = s->key; + free(s); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef s +} +YY_ACTION(void) yy_3_OPMLHeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_OPMLHeadingSection\n")); + { + __ = mk_list(HEADINGSECTION, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_OPMLHeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_OPMLHeadingSection\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_OPMLHeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OPMLHeadingSection\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_DocForOPML(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_DocForOPML\n")); + { + yy->state->parse_result = reverse(a); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_DocForOPML(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_DocForOPML\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_DocForOPML(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_DocForOPML\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MMDMathSpan(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MMDMathSpan\n")); + { + + /* Basically, these delimiters indicate math in LaTeX syntax, and the + delimiters are compatible with MathJax and LaTeX + ASCIIMathML is *not* supported */ + __ = mk_str(yytext); + __->key = MATHSPAN; +; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_ULMathSpan(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ULMathSpan\n")); + { + + /* Basically, these delimiters indicate math in LaTeX syntax, and the + delimiters are compatible with MathJax and LaTeX + ASCIIMathML is *not* supported */ + __ = mk_str(yytext); + __->key = MATHSPAN; +; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_AutoLabel(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AutoLabel\n")); + { + + char *label = label_from_string(yytext,0); + __ = mk_str(label); + __->key = AUTOLABEL; + free(label); +; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_TableCaption(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define a yy->__val[-2] +#define b yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_TableCaption\n")); + { + + __ = a; + __->key = TABLECAPTION; + if ( (b != NULL) && (b->key == TABLELABEL) ) { + b->next = __->children; + __->children = b; + } +; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef a +#undef b +} +YY_ACTION(void) yy_1_TableCaption(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define a yy->__val[-2] +#define b yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_TableCaption\n")); + { + b = c; b->key = TABLELABEL;; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef a +#undef b +} +YY_ACTION(void) yy_1_RightAlign(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RightAlign\n")); + { + __ = mk_str("r");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_RightAlignWrap(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RightAlignWrap\n")); + { + __ = mk_str("R");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_CenterAlign(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CenterAlign\n")); + { + __ = mk_str("c");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_CenterAlignWrap(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CenterAlignWrap\n")); + { + __ = mk_str("C");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_LeftAlign(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_LeftAlign\n")); + { + __ = mk_str("l");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_LeftAlignWrap(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_LeftAlignWrap\n")); + { + __ = mk_str("L");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_NaturalAlign(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_NaturalAlign\n")); + { + __ = mk_str("n");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_NaturalAlignWrap(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_NaturalAlignWrap\n")); + { + __ = mk_str("N");; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_SeparatorLine(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_SeparatorLine\n")); + { + + __ = mk_str_from_list(a,false); + __->key = TABLESEPARATOR; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_SeparatorLine(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_SeparatorLine\n")); + { + a = cons(__, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_EmptyCell(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EmptyCell\n")); + { + __ = mk_element(TABLECELL);; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_FullCell(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_FullCell\n")); + { + __ = mk_list(TABLECELL,a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_FullCell(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FullCell\n")); + { + a = cons(__,a); + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_CellStr(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CellStr\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_ExtendedCell(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ExtendedCell\n")); + { + + element *span; + span = mk_str(yytext); + span->key = CELLSPAN; + span->next = __->children; + __->children = span; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_TableRow(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_TableRow\n")); + { + __ = mk_list(TABLEROW, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_TableRow(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_TableRow\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_TableBody(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_TableBody\n")); + { + __ = mk_list(TABLEBODY, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_TableBody(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_TableBody\n")); + { + a = cons(__, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_7_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_7_Table\n")); + { + + if (b != NULL) { append_list(b,a); }; + __ = mk_list(TABLE, a); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_6_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_6_Table\n")); + { + b = cons(__, b);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_5_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_5_Table\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_4_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_Table\n")); + { + a = cons(__, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_3_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Table\n")); + { + append_list(__,a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Table\n")); + { + __->key = TABLEHEAD; a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_Table(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Table\n")); + { + b = cons(__, b);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_7_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_7_Definition\n")); + { + if (b != NULL) { a = cons(b,a);} + element *raw = mk_str_from_list(a, false); + raw->key = RAW; + __ = mk_list(DEFINITION,raw); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_6_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_6_Definition\n")); + { + a = cons(mk_str("\n"),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_5_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_5_Definition\n")); + { + a = cons(mk_str(yytext),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_4_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_Definition\n")); + { + a = cons(mk_str("\n"),a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_3_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Definition\n")); + { + a = cons(mk_str(yytext), a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Definition\n")); + { + a = cons(mk_str(yytext), a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_Definition(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Definition\n")); + { + b = cons(mk_str("\n"),b); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_Term(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Term\n")); + { + + __ = mk_list(TERM,a); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Term(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Term\n")); + { + a = cons(__, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_DefinitionList(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_DefinitionList\n")); + { + __ = mk_list(LIST, a); + __->key = DEFLIST; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_DefinitionList(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_DefinitionList\n")); + { + a = cons(__, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_DefinitionList(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_DefinitionList\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_4_AutoLabels(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define b yy->__val[-2] +#define a yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_AutoLabels\n")); + { + yy->state->labels = a; ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef b +#undef a +} +YY_ACTION(void) yy_3_AutoLabels(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define b yy->__val[-2] +#define a yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_AutoLabels\n")); + { + + GString *label = g_string_new(""); + char *lab; + if (c->children->key == TABLELABEL) { + print_raw_element_list(label, c->children->children); + } else { + print_raw_element_list(label, c->children); + } + lab = label_from_string(label->str,0); + a = cons(mk_str(lab), a); + free(lab); + g_string_free(label,true); + free_element_list(c);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef b +#undef a +} +YY_ACTION(void) yy_2_AutoLabels(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define b yy->__val[-2] +#define a yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_AutoLabels\n")); + { + + GString *label = g_string_new(""); + char *lab; + if (c->children->key == TABLELABEL) { + print_raw_element_list(label, c->children->children); + } else { + print_raw_element_list(label, c->children); + } + lab = label_from_string(label->str,0); + a = cons(mk_str(lab), a); + free(lab); + g_string_free(label,true); + free_element_list(c);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef b +#undef a +} +YY_ACTION(void) yy_1_AutoLabels(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define b yy->__val[-2] +#define a yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AutoLabels\n")); + { + + GString *label = g_string_new(""); + char *lab; + print_raw_element_list(label, b->children); + if (b->children->key == AUTOLABEL) { + lab = label_from_string(b->children->contents.str,0); + } else { + lab = label_from_string(label->str,0); + } + a = cons(mk_str(lab), a); + free(lab); + g_string_free(label,true); + /* TODO: this causes segfault when trying to use a footnote in the header */ + /* I would like to fix it at some point */ + /* free_element_list(b); */ + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef b +#undef a +} +YY_ACTION(void) yy_1_RawCitationReference(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RawCitationReference\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_CitationReferenceSingle(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CitationReferenceSingle\n")); + { + element *match; + if (find_note(yy->state, &match, ref->contents.str)) { + __ = mk_element(CITATION); + assert(match->children != NULL); + __->children = match->children; + __->contents.str = strdup(ref->contents.str); + } else { + char *s; + s = malloc(strlen(ref->contents.str) + 4); + sprintf(s, "[#%s]", ref->contents.str); + __ = mk_str(s); + __->key = CITATION; + free(s); + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +} +YY_ACTION(void) yy_1_CitationReferenceDouble(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define b yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CitationReferenceDouble\n")); + { + element *match; + if (find_note(yy->state, &match, ref->contents.str)) { + /* This citation is specified within the document */ + __ = mk_element(CITATION); + assert(match->children != NULL); + b->next = match->children; + b->key = LOCATOR; + __->children = b; + __->contents.str = strdup(ref->contents.str); + } else { + /* Citation not specified - likely bibtex citation */ + /* TODO: fix this - need to print label as well */ + char *s; + s = malloc(strlen(ref->contents.str) + 4); + sprintf(s, "[#%s]", ref->contents.str); + __ = mk_str(s); + __->key = CITATION; + b->key = LOCATOR; + __->children = b; + free(s); + } + GString *label = g_string_new(""); + char *lab; + print_raw_element_list(label, b->children); + lab = label_from_string(label->str,0); + if (strcmp(lab,"notcited") == 0 ) { + __->key = NOCITATION; + } + g_string_free(label, true); + free(lab); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef b +} +YY_ACTION(void) yy_3_RawNoteBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_RawNoteBlock\n")); + { + __ = mk_str_from_list(a, true); + __->key = RAW; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_RawNoteBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_RawNoteBlock\n")); + { + a = cons(mk_str(yytext), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_RawNoteBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RawNoteBlock\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_Notes(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Notes\n")); + { + yy->state->notes = reverse(a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_Notes(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Notes\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_InlineNote(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_InlineNote\n")); + { + __ = mk_list(NOTE, a); + __->contents.str = 0; ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_InlineNote(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_InlineNote\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_Note(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define ref yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Note\n")); + { + element *label; + label = mk_str(ref->contents.str); + label->key = NOTELABEL; + a = cons(label,a); + __ = mk_list(NOTE, a); + __->contents.str = strdup(ref->contents.str); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef ref +} +YY_ACTION(void) yy_2_Note(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define ref yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Note\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef ref +} +YY_ACTION(void) yy_1_Note(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define ref yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Note\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef ref +} +YY_ACTION(void) yy_1_GlossarySortKey(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_GlossarySortKey\n")); + { + __ = mk_str(yytext); + __->key = GLOSSARYSORTKEY; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_GlossaryTerm(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_GlossaryTerm\n")); + { + + __ = mk_list(LIST, NULL); + __->contents.str = 0; + __->children = mk_str(yytext); + __->key = GLOSSARYTERM; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_5_Glossary(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_5_Glossary\n")); + { + __ = mk_list(GLOSSARY, a); + __->contents.str = strdup(ref->contents.str); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef a +} +YY_ACTION(void) yy_4_Glossary(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_Glossary\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef a +} +YY_ACTION(void) yy_3_Glossary(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Glossary\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef a +} +YY_ACTION(void) yy_2_Glossary(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Glossary\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef a +} +YY_ACTION(void) yy_1_Glossary(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Glossary\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +#undef a +} +YY_ACTION(void) yy_1_RawNoteReference(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RawNoteReference\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_NoteReference(yycontext *yy, char *yytext, int yyleng) +{ +#define ref yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_NoteReference\n")); + { + element *match; + if (find_note(yy->state, &match, ref->contents.str)) { + __ = mk_element(NOTE); + assert(match->children != NULL); + __->children = match->children; + __->contents.str = 0; + } else { + char *s; + s = malloc(strlen(ref->contents.str) + 4); + sprintf(s, "[^%s]", ref->contents.str); + __ = mk_str(s); + free(s); + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef ref +} +YY_ACTION(void) yy_2_DoubleQuoted(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_DoubleQuoted\n")); + { + __ = mk_list(DOUBLEQUOTED, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_DoubleQuoted(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_DoubleQuoted\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_SingleQuoted(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_SingleQuoted\n")); + { + __ = mk_list(SINGLEQUOTED, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_SingleQuoted(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_SingleQuoted\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_EmDash(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EmDash\n")); + { + __ = mk_element(EMDASH); + __->contents.str = strdup(yytext); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_EnDash(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EnDash\n")); + { + __ = mk_element(ENDASH); + __->contents.str = strdup(yytext); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Ellipsis(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Ellipsis\n")); + { + __ = mk_element(ELLIPSIS); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Apostrophe(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Apostrophe\n")); + { + __ = mk_element(APOSTROPHE); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Line(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Line\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_StartList(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_StartList\n")); + { + __ = NULL; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_CapturingNonindentSpace(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_CapturingNonindentSpace\n")); + { + + if (extension(yy->state, EXT_KEEP_WHITESPACES)) { + __ = mk_str(yytext); + __->key = SPACE; + } + else + __ = NULL; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_RawHtml(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RawHtml\n")); + { + if (extension(yy->state, EXT_FILTER_HTML)) { + __ = mk_list(LIST, NULL); + } else { + __ = mk_str(yytext); + __->key = HTML; + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Code(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Code\n")); + { + __ = mk_str(yytext); __->key = CODE; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_References(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_References\n")); + { + yy->state->references = reverse(a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_References(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_References\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_RefTitle(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RefTitle\n")); + { + __ = mk_str(yytext); + __->key = RAW;; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_RefSrc(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_RefSrc\n")); + { + __ = mk_str(yytext); + __->key = HTML; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_Label(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Label\n")); + { + __ = mk_list(LIST, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Label(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Label\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_AttrValue(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AttrValue\n")); + { + __ = mk_str(yytext); + __->key = ATTRVALUE; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_AttrKey(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AttrKey\n")); + { + + char *lab; + lab = label_from_string(yytext,0); + __ = mk_str(lab); + __->key = ATTRKEY; + free(lab); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Attribute(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Attribute\n")); + { + + __ = a; + __->children = b; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_Attributes(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Attributes\n")); + { + __ = mk_list(LIST,a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Attributes(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Attributes\n")); + { + a =cons(__,a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_Reference(yycontext *yy, char *yytext, int yyleng) +{ +#define t yy->__val[-1] +#define s yy->__val[-2] +#define l yy->__val[-3] +#define a yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Reference\n")); + { + + char *label; + GString *text = g_string_new(""); + print_raw_element_list(text, l->children); + label = label_from_string(text->str,0); + if (a == NULL) { + __ = mk_link(l->children, s->contents.str, + t->contents.str, a, label); + } else { + __ = mk_link(l->children, s->contents.str, + t->contents.str, a->children, label); + } + free_element(s); + free_element(t); + free(l); + free(label); + g_string_free(text, TRUE); + __->key = REFERENCE; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef t +#undef s +#undef l +#undef a +} +YY_ACTION(void) yy_1_Reference(yycontext *yy, char *yytext, int yyleng) +{ +#define t yy->__val[-1] +#define s yy->__val[-2] +#define l yy->__val[-3] +#define a yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Reference\n")); + { + a = cons(__,a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef t +#undef s +#undef l +#undef a +} +YY_ACTION(void) yy_1_AutoLinkEmail(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AutoLinkEmail\n")); + { + char *mailto = malloc(strlen(yytext) + 8); + sprintf(mailto, "mailto:%s", yytext); + __ = mk_link(mk_str(yytext), mailto, "", NULL, ""); + free(mailto); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_AutoLinkUrl(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AutoLinkUrl\n")); + { + __ = mk_link(mk_str(yytext), yytext, "", NULL, ""); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Title(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Title\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Source(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Source\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_Comment(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Comment\n")); + { + __ = mk_list(COMMENT, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_Comment(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Comment\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_ExplicitLink(yycontext *yy, char *yytext, int yyleng) +{ +#define t yy->__val[-1] +#define s yy->__val[-2] +#define l yy->__val[-3] +#define a yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ExplicitLink\n")); + { + + __ = mk_link(l->children, s->contents.str, t->contents.str, a ? a->children : NULL, ""); + free_element(s); + free_element(t); + free(l); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef t +#undef s +#undef l +#undef a +} +YY_ACTION(void) yy_1_ExplicitLink(yycontext *yy, char *yytext, int yyleng) +{ +#define t yy->__val[-1] +#define s yy->__val[-2] +#define l yy->__val[-3] +#define a yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ExplicitLink\n")); + { + a = cons(__,a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef t +#undef s +#undef l +#undef a +} +YY_ACTION(void) yy_1_ReferenceLinkSingle(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ReferenceLinkSingle\n")); + { + mm_link match; + if (find_reference(yy->state, &match, a->children)) { + __ = mk_link(a->children, match.url, match.title, match.attr, match.identifier); + free(a); + } else if ( (extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY)) && + find_label(yy->state, &match, a->children)) { + GString *text = g_string_new(""); + print_raw_element_list(text, a->children); + char *lab = label_from_string(text->str,0); + GString *label = g_string_new(lab); + g_string_prepend(label,"#"); + __ = mk_link(a->children, label->str, "", NULL, lab); + g_string_free(text, TRUE); + g_string_free(label, TRUE); + free(lab); + free(a); + } else { + element *result; + result = mk_element(LIST); + result->children = cons(mk_str("["), cons(a, cons(mk_str("]"), mk_str(yytext)))); + __ = result; + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_ReferenceLinkDouble(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define s yy->__val[-2] +#define a yy->__val[-3] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ReferenceLinkDouble\n")); + { + mm_link match; + if (find_reference(yy->state, &match, b->children)) { + __ = mk_link(a->children, match.url, match.title, match.attr, match.identifier); + free(a); + free_element_list(b); + } else if ( (extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY)) && + find_label(yy->state, &match, b->children)) { + GString *text = g_string_new(""); + print_raw_element_list(text, b->children); + char *lab = label_from_string(text->str,0); + GString *label = g_string_new(lab); + g_string_prepend(label,"#"); + __ = mk_link(a->children, label->str, "", NULL, lab); + free(lab); + g_string_free(text, TRUE); + g_string_free(label, TRUE); + free(a); + free_element_list(b); + } else { + element *result; + result = mk_element(LIST); + result->children = cons(mk_str("["), cons(a, cons(mk_str("]"), cons(s, cons(mk_str("["), cons(b, mk_str("]"))))))); + __ = result; + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef s +#undef a +} +YY_ACTION(void) yy_1_Image(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Image\n")); + { + if (__->key == LINK) { + __->key = IMAGE; + } else { + element *result; + result = __; + __->children = cons(mk_str("!"), result->children); + } ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_ImageBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ImageBlock\n")); + { + if (__->key == IMAGE) __->key = IMAGEBLOCK; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_Delete(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Delete\n")); + { + __ = mk_list(DELETE, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_Delete(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Delete\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_StrongUl(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_StrongUl\n")); + { + __ = mk_list(STRONG, a); + __->contents.str = "__"; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_StrongUl(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_StrongUl\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_StrongStar(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_StrongStar\n")); + { + __ = mk_list(STRONG, a); + __->contents.str = "**"; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_StrongStar(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_StrongStar\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_3_EmphUl(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_EmphUl\n")); + { + __ = mk_list(EMPH, a); + __->contents.str = "_"; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_EmphUl(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_EmphUl\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_EmphUl(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EmphUl\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_3_EmphStar(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_EmphStar\n")); + { + __ = mk_list(EMPH, a); + __->contents.str = "*"; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_EmphStar(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_EmphStar\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_EmphStar(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EmphStar\n")); + { + a = cons(b, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_UlOrStarLine(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_UlOrStarLine\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Symbol(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Symbol\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_LineBreak(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_LineBreak\n")); + { + __ = mk_element(LINEBREAK); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_TerminalEndline(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_TerminalEndline\n")); + { + __ = NULL; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_NormalEndline(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_NormalEndline\n")); + { + __ = mk_str("\n"); + __->key = SPACE; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Entity(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Entity\n")); + { + __ = mk_str(yytext); __->key = HTML; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_KeptEscapedChar(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_KeptEscapedChar\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_EscapedChar(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_EscapedChar\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_AposChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AposChunk\n")); + { + __ = mk_element(APOSTROPHE); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_StrChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_StrChunk\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_3_Str(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Str\n")); + { + if (a->next == NULL) { __ = a; } else { __ = mk_list(LIST, a); } ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_Str(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Str\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Str(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Str\n")); + { + a = cons(mk_str(yytext), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_OptionalSpace(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OptionalSpace\n")); + { + + if (extension(yy->state, EXT_KEEP_WHITESPACES)) + __ = mk_str(yytext); + else + __ = mk_str(" "); + + __->key = SPACE; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Space(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Space\n")); + { + + if (extension(yy->state, EXT_KEEP_WHITESPACES)) + __ = mk_str(yytext); + else + __ = mk_str(" "); + + __->key = SPACE; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_3_Inlines(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Inlines\n")); + { + __ = mk_list(LIST, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef a +} +YY_ACTION(void) yy_2_Inlines(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Inlines\n")); + { + a = cons(c, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef a +} +YY_ACTION(void) yy_1_Inlines(yycontext *yy, char *yytext, int yyleng) +{ +#define c yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Inlines\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef c +#undef a +} +YY_ACTION(void) yy_1_StyleBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_StyleBlock\n")); + { + if (extension(yy->state, EXT_FILTER_STYLES)) { + __ = mk_list(LIST, NULL); + } else { + __ = mk_str(yytext); + __->key = HTMLBLOCK; + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_FencedCodeBlockLanguage(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FencedCodeBlockLanguage\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_FencedCodeBlockPreceedingIndentation(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FencedCodeBlockPreceedingIndentation\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_FencedCodeBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define language yy->__val[-1] +#define indentation yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FencedCodeBlock\n")); + { + + __ = mk_codeblock(yytext, language->contents.str, strlen(indentation->contents.str)); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef language +#undef indentation +} +YY_ACTION(void) yy_1_MarkdownHtmlBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MarkdownHtmlBlock\n")); + { + __ = mk_str(yytext); + __->key = RAW; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_HtmlBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_HtmlBlock\n")); + { + if (extension(yy->state, EXT_FILTER_HTML)) { + __ = mk_list(LIST, NULL); + } else { + __ = mk_str(yytext); + if ( extension(yy->state, EXT_PROCESS_HTML)) __->key = RAW; + else __->key = HTMLBLOCK; + } + ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_OrderedList(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_OrderedList\n")); + { + __->key = ORDEREDLIST; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Enumerator(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Enumerator\n")); + { + { __ = mk_str(yytext); }; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_3_ListContinuationBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_ListContinuationBlock\n")); + { + __ = mk_str_from_list(a, false); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_ListContinuationBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListContinuationBlock\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_ListContinuationBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListContinuationBlock\n")); + { + if (strlen(yytext) == 0) { + if (extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES)) + a = cons(mk_str(yytext), a); + + a = cons(mk_str("\001"), a); /* block separator */ + } + else + a = cons(mk_str(yytext), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_ListBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_ListBlock\n")); + { + __ = mk_str_from_list(a, false); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_ListBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListBlock\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_ListBlock(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListBlock\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_ListItemTight(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_ListItemTight\n")); + { + element *raw; + raw = mk_str_from_list(a, false); + raw->key = RAW; + __ = mk_element(LISTITEM); + __->children = raw; + __->contents.str = string_from_element_list(m, true); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_2_ListItemTight(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListItemTight\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_1_ListItemTight(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListItemTight\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_3_ListItem(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_ListItem\n")); + { + + element *raw; + raw = mk_str_from_list(a, false); + + raw->key = RAW; + __ = mk_element(LISTITEM); + __->children = raw; + + __->contents.str = string_from_element_list(m, true); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_2_ListItem(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListItem\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_1_ListItem(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define m yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListItem\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef m +} +YY_ACTION(void) yy_2_ListLoose(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListLoose\n")); + { + __ = mk_list(LIST, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_ListLoose(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListLoose\n")); + { + element *li; + li = b->children; + li->contents.str = realloc(li->contents.str, strlen(li->contents.str) + 3); + strcat(li->contents.str, "\n\n"); /* In loose list, \n\n added to end of each element */ + a = cons(b, a); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_ListTight(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_ListTight\n")); + { + __ = mk_list(LIST, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_ListTight(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_ListTight\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BulletList(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BulletList\n")); + { + __->key = BULLETLIST; ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Bullet(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Bullet\n")); + { + { __ = mk_str(yytext); }; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_HorizontalRule(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_HorizontalRule\n")); + { + __ = mk_element(HRULE); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_3_Verbatim(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_Verbatim\n")); + { + __ = mk_str_from_list(a, false); + __->key = VERBATIM; ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_Verbatim(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Verbatim\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Verbatim(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Verbatim\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_FollowingVerbatimChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_FollowingVerbatimChunk\n")); + { + __ = mk_str_from_list(a, false); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_FollowingVerbatimChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_FollowingVerbatimChunk\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_FollowingVerbatimChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FollowingVerbatimChunk\n")); + { + a = cons(mk_str("\n"), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_FirstVerbatimChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_FirstVerbatimChunk\n")); + { + __ = mk_str_from_list(a, false); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_FirstVerbatimChunk(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_FirstVerbatimChunk\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BlockCommentLine(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BlockCommentLine\n")); + { + __ = mk_str(yytext); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_2_BlockCommentRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_BlockCommentRaw\n")); + { + __ = mk_str_from_list(a, true); + __->key = RAW; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BlockCommentRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BlockCommentRaw\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BlockComment(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BlockComment\n")); + { + __ = mk_element(COMMENTBLOCK); + __->children = a; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_4_BlockQuoteRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_BlockQuoteRaw\n")); + { + __ = mk_str_from_list(a, true); + __->key = RAW; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_BlockQuoteRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_BlockQuoteRaw\n")); + { + a = cons(mk_str("\n"), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_BlockQuoteRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_BlockQuoteRaw\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BlockQuoteRaw(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BlockQuoteRaw\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_BlockQuote(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_BlockQuote\n")); + { + __ = mk_element(BLOCKQUOTE); + __->children = a; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_HeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_HeadingSection\n")); + { + __ = mk_list(HEADINGSECTION, a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_HeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_HeadingSection\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_HeadingSection(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_HeadingSection\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_SetextHeading2(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_SetextHeading2\n")); + { + __ = mk_list(H2, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_SetextHeading2(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_SetextHeading2\n")); + { + append_list(b,a); + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_SetextHeading2(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_SetextHeading2\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_3_SetextHeading1(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_SetextHeading1\n")); + { + __ = mk_list(H1, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_SetextHeading1(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_SetextHeading1\n")); + { + append_list(b,a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_SetextHeading1(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_SetextHeading1\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_4_AtxHeading(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define l yy->__val[-2] +#define a yy->__val[-3] +#define s yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_AtxHeading\n")); + { + __ = mk_list(s->key,a); + free(s); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef l +#undef a +#undef s +} +YY_ACTION(void) yy_3_AtxHeading(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define l yy->__val[-2] +#define a yy->__val[-3] +#define s yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_AtxHeading\n")); + { + append_list(b,a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef l +#undef a +#undef s +} +YY_ACTION(void) yy_2_AtxHeading(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define l yy->__val[-2] +#define a yy->__val[-3] +#define s yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_AtxHeading\n")); + { + a = cons(l, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef l +#undef a +#undef s +} +YY_ACTION(void) yy_1_AtxHeading(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define l yy->__val[-2] +#define a yy->__val[-3] +#define s yy->__val[-4] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AtxHeading\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef l +#undef a +#undef s +} +YY_ACTION(void) yy_1_AtxStart(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_AtxStart\n")); + { + __ = mk_element(H1 + (int)(strlen(yytext) - 1)); ; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_Plain(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Plain\n")); + { + __ = a; __->key = PLAIN; ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_Para(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define s yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Para\n")); + { + + if (s) + a->children = cons(s, a->children); + + __ = a; + __->key = PARA; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef s +} +YY_ACTION(void) yy_1_Para(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define s yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Para\n")); + { + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +#undef s +} +YY_ACTION(void) yy_4_MetaDataValue(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_4_MetaDataValue\n")); + { + __ = mk_str_from_list(a,false); + trim_trailing_whitespace(__->contents.str); + __->key = METAVALUE; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_MetaDataValue(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_MetaDataValue\n")); + { + a = cons(mk_str(yytext), a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_MetaDataValue(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_MetaDataValue\n")); + { + a = cons(mk_str("\n"), a);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MetaDataValue(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaDataValue\n")); + { + a = cons(mk_str(yytext), a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MetaDataKey(yycontext *yy, char *yytext, int yyleng) +{ +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaDataKey\n")); + { + + char *label = label_from_string(yytext,0); + __ = mk_str(label); + free(label); + __->key = METAKEY; +; + } +#undef yythunkpos +#undef yypos +#undef yy +} +YY_ACTION(void) yy_1_MetaDataKeyValue(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaDataKeyValue\n")); + { + __ = a; + __->children = b; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_MetaDataOnly2(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_MetaDataOnly2\n")); + { + yy->state->parse_result = mk_list(LIST,a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MetaDataOnly2(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaDataOnly2\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_MetaDataOnly(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_MetaDataOnly\n")); + { + yy->state->parse_result = reverse(a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MetaDataOnly(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaDataOnly\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_2_MetaData(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_MetaData\n")); + { + __ = mk_list(LIST, a); + __->key = METADATA; + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_MetaData(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_MetaData\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_3_DocWithMetaData(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_3_DocWithMetaData\n")); + { + if (b != NULL) a = cons(b, a); + yy->state->parse_result = reverse(a); + ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_DocWithMetaData(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_DocWithMetaData\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_1_DocWithMetaData(yycontext *yy, char *yytext, int yyleng) +{ +#define b yy->__val[-1] +#define a yy->__val[-2] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_DocWithMetaData\n")); + { + a = cons(__, a); b = mk_element(FOOTER);; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef b +#undef a +} +YY_ACTION(void) yy_2_Doc(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_2_Doc\n")); + { + yy->state->parse_result = reverse(a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} +YY_ACTION(void) yy_1_Doc(yycontext *yy, char *yytext, int yyleng) +{ +#define a yy->__val[-1] +#define __ yy->__ +#define yypos yy->__pos +#define yythunkpos yy->__thunkpos + yyprintf((stderr, "do yy_1_Doc\n")); + { + a = cons(__, a); ; + } +#undef yythunkpos +#undef yypos +#undef yy +#undef a +} + +YY_RULE(int) yy_MarkdownHtmlAttribute(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MarkdownHtmlAttribute")); + { int yypos2= yy->__pos, yythunkpos2= yy->__thunkpos; if (!yymatchString(yy, "markdown")) goto l3; goto l2; + l3:; yy->__pos= yypos2; yy->__thunkpos= yythunkpos2; if (!yymatchString(yy, "MARKDOWN")) goto l1; + } + l2:; if (!yy_Spnl(yy)) goto l1; if (!yymatchChar(yy, '=')) goto l1; if (!yy_Spnl(yy)) goto l1; + { int yypos4= yy->__pos, yythunkpos4= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l4; if (!yy_Spnl(yy)) goto l4; goto l5; + l4:; yy->__pos= yypos4; yy->__thunkpos= yythunkpos4; + } + l5:; if (!yymatchChar(yy, '1')) goto l1; + { int yypos6= yy->__pos, yythunkpos6= yy->__thunkpos; if (!yy_Spnl(yy)) goto l6; if (!yymatchChar(yy, '"')) goto l6; goto l7; + l6:; yy->__pos= yypos6; yy->__thunkpos= yythunkpos6; + } + l7:; if (!yy_Spnl(yy)) goto l1; + yyprintf((stderr, " ok %s @ %s\n", "MarkdownHtmlAttribute", yy->__buf+yy->__pos)); + return 1; + l1:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MarkdownHtmlAttribute", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLSetextHeading2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLSetextHeading2")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l8; +#undef yytext +#undef yyleng + } + l9:; + { int yypos10= yy->__pos, yythunkpos10= yy->__thunkpos; + { int yypos11= yy->__pos, yythunkpos11= yy->__thunkpos; if (!yymatchChar(yy, '\r')) goto l11; goto l10; + l11:; yy->__pos= yypos11; yy->__thunkpos= yythunkpos11; + } + { int yypos12= yy->__pos, yythunkpos12= yy->__thunkpos; if (!yymatchChar(yy, '\n')) goto l12; goto l10; + l12:; yy->__pos= yypos12; yy->__thunkpos= yythunkpos12; + } if (!yymatchDot(yy)) goto l10; goto l9; + l10:; yy->__pos= yypos10; yy->__thunkpos= yythunkpos10; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l8; +#undef yytext +#undef yyleng + } if (!yy_Newline(yy)) goto l8; if (!yy_SetextBottom2(yy)) goto l8; yyDo(yy, yy_1_OPMLSetextHeading2, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OPMLSetextHeading2", yy->__buf+yy->__pos)); + return 1; + l8:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLSetextHeading2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLSetextHeading1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLSetextHeading1")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l13; +#undef yytext +#undef yyleng + } + l14:; + { int yypos15= yy->__pos, yythunkpos15= yy->__thunkpos; + { int yypos16= yy->__pos, yythunkpos16= yy->__thunkpos; if (!yymatchChar(yy, '\r')) goto l16; goto l15; + l16:; yy->__pos= yypos16; yy->__thunkpos= yythunkpos16; + } + { int yypos17= yy->__pos, yythunkpos17= yy->__thunkpos; if (!yymatchChar(yy, '\n')) goto l17; goto l15; + l17:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17; + } if (!yymatchDot(yy)) goto l15; goto l14; + l15:; yy->__pos= yypos15; yy->__thunkpos= yythunkpos15; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l13; +#undef yytext +#undef yyleng + } if (!yy_Newline(yy)) goto l13; if (!yy_SetextBottom1(yy)) goto l13; yyDo(yy, yy_1_OPMLSetextHeading1, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OPMLSetextHeading1", yy->__buf+yy->__pos)); + return 1; + l13:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLSetextHeading1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLSetextHeading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLSetextHeading")); + { int yypos19= yy->__pos, yythunkpos19= yy->__thunkpos; if (!yy_OPMLSetextHeading1(yy)) goto l20; goto l19; + l20:; yy->__pos= yypos19; yy->__thunkpos= yythunkpos19; if (!yy_OPMLSetextHeading2(yy)) goto l18; + } + l19:; + yyprintf((stderr, " ok %s @ %s\n", "OPMLSetextHeading", yy->__buf+yy->__pos)); + return 1; + l18:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLSetextHeading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLAtxHeading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "OPMLAtxHeading")); + { int yypos22= yy->__pos, yythunkpos22= yy->__thunkpos; if (!yy_Heading(yy)) goto l21; yy->__pos= yypos22; yy->__thunkpos= yythunkpos22; + } if (!yy_AtxStart(yy)) goto l21; yyDo(yy, yySet, -1, 0); + { int yypos23= yy->__pos, yythunkpos23= yy->__thunkpos; if (!yy_Sp(yy)) goto l23; goto l24; + l23:; yy->__pos= yypos23; yy->__thunkpos= yythunkpos23; + } + l24:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l21; +#undef yytext +#undef yyleng + } + l25:; + { int yypos26= yy->__pos, yythunkpos26= yy->__thunkpos; + { int yypos27= yy->__pos, yythunkpos27= yy->__thunkpos; if (!yy_Newline(yy)) goto l27; goto l26; + l27:; yy->__pos= yypos27; yy->__thunkpos= yythunkpos27; + } + { int yypos28= yy->__pos, yythunkpos28= yy->__thunkpos; + { int yypos29= yy->__pos, yythunkpos29= yy->__thunkpos; if (!yy_Sp(yy)) goto l29; goto l30; + l29:; yy->__pos= yypos29; yy->__thunkpos= yythunkpos29; + } + l30:; + l31:; + { int yypos32= yy->__pos, yythunkpos32= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l32; goto l31; + l32:; yy->__pos= yypos32; yy->__thunkpos= yythunkpos32; + } if (!yy_Sp(yy)) goto l28; if (!yy_Newline(yy)) goto l28; goto l26; + l28:; yy->__pos= yypos28; yy->__thunkpos= yythunkpos28; + } if (!yymatchDot(yy)) goto l26; goto l25; + l26:; yy->__pos= yypos26; yy->__thunkpos= yythunkpos26; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l21; +#undef yytext +#undef yyleng + } + { int yypos33= yy->__pos, yythunkpos33= yy->__thunkpos; + { int yypos35= yy->__pos, yythunkpos35= yy->__thunkpos; if (!yy_Sp(yy)) goto l35; goto l36; + l35:; yy->__pos= yypos35; yy->__thunkpos= yythunkpos35; + } + l36:; if (!yymatchChar(yy, '#')) goto l33; + l37:; + { int yypos38= yy->__pos, yythunkpos38= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l38; goto l37; + l38:; yy->__pos= yypos38; yy->__thunkpos= yythunkpos38; + } goto l34; + l33:; yy->__pos= yypos33; yy->__thunkpos= yythunkpos33; + } + l34:; + { int yypos39= yy->__pos, yythunkpos39= yy->__thunkpos; if (!yy_Sp(yy)) goto l39; goto l40; + l39:; yy->__pos= yypos39; yy->__thunkpos= yythunkpos39; + } + l40:; if (!yy_Newline(yy)) goto l21; yyDo(yy, yy_1_OPMLAtxHeading, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OPMLAtxHeading", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l21:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLAtxHeading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLSectionBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLSectionBlock")); + l42:; + { int yypos43= yy->__pos, yythunkpos43= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l43; goto l42; + l43:; yy->__pos= yypos43; yy->__thunkpos= yythunkpos43; + } + { int yypos44= yy->__pos, yythunkpos44= yy->__thunkpos; if (!yy_OPMLHeading(yy)) goto l44; goto l41; + l44:; yy->__pos= yypos44; yy->__thunkpos= yythunkpos44; + } if (!yy_OPMLPlain(yy)) goto l41; + yyprintf((stderr, " ok %s @ %s\n", "OPMLSectionBlock", yy->__buf+yy->__pos)); + return 1; + l41:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLSectionBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLHeading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLHeading")); + { int yypos46= yy->__pos, yythunkpos46= yy->__thunkpos; if (!yy_OPMLAtxHeading(yy)) goto l47; goto l46; + l47:; yy->__pos= yypos46; yy->__thunkpos= yythunkpos46; if (!yy_OPMLSetextHeading(yy)) goto l45; + } + l46:; + yyprintf((stderr, " ok %s @ %s\n", "OPMLHeading", yy->__buf+yy->__pos)); + return 1; + l45:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLHeading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLPlain(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "OPMLPlain")); if (!yy_StartList(yy)) goto l48; yyDo(yy, yySet, -1, 0); + { int yypos51= yy->__pos, yythunkpos51= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l51; goto l48; + l51:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; + } + { int yypos52= yy->__pos, yythunkpos52= yy->__thunkpos; if (!yy_Heading(yy)) goto l52; goto l48; + l52:; yy->__pos= yypos52; yy->__thunkpos= yythunkpos52; + } if (!yy_Line(yy)) goto l48; yyDo(yy, yy_1_OPMLPlain, yy->__begin, yy->__end); + l49:; + { int yypos50= yy->__pos, yythunkpos50= yy->__thunkpos; + { int yypos53= yy->__pos, yythunkpos53= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l53; goto l50; + l53:; yy->__pos= yypos53; yy->__thunkpos= yythunkpos53; + } + { int yypos54= yy->__pos, yythunkpos54= yy->__thunkpos; if (!yy_Heading(yy)) goto l54; goto l50; + l54:; yy->__pos= yypos54; yy->__thunkpos= yythunkpos54; + } if (!yy_Line(yy)) goto l50; yyDo(yy, yy_1_OPMLPlain, yy->__begin, yy->__end); goto l49; + l50:; yy->__pos= yypos50; yy->__thunkpos= yythunkpos50; + } yyDo(yy, yy_2_OPMLPlain, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OPMLPlain", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l48:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLPlain", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLHeadingSection(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "OPMLHeadingSection")); if (!yy_StartList(yy)) goto l55; yyDo(yy, yySet, -1, 0); if (!yy_OPMLHeading(yy)) goto l55; yyDo(yy, yy_1_OPMLHeadingSection, yy->__begin, yy->__end); + l56:; + { int yypos57= yy->__pos, yythunkpos57= yy->__thunkpos; if (!yy_OPMLSectionBlock(yy)) goto l57; yyDo(yy, yy_2_OPMLHeadingSection, yy->__begin, yy->__end); goto l56; + l57:; yy->__pos= yypos57; yy->__thunkpos= yythunkpos57; + } yyDo(yy, yy_3_OPMLHeadingSection, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OPMLHeadingSection", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l55:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLHeadingSection", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OPMLBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OPMLBlock")); + l59:; + { int yypos60= yy->__pos, yythunkpos60= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l60; goto l59; + l60:; yy->__pos= yypos60; yy->__thunkpos= yythunkpos60; + } + { int yypos61= yy->__pos, yythunkpos61= yy->__thunkpos; if (!yy_OPMLHeadingSection(yy)) goto l62; goto l61; + l62:; yy->__pos= yypos61; yy->__thunkpos= yythunkpos61; if (!yy_OPMLPlain(yy)) goto l58; + } + l61:; + yyprintf((stderr, " ok %s @ %s\n", "OPMLBlock", yy->__buf+yy->__pos)); + return 1; + l58:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OPMLBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DocForOPML(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "DocForOPML")); + { int yypos64= yy->__pos, yythunkpos64= yy->__thunkpos; if (!yy_BOM(yy)) goto l64; goto l65; + l64:; yy->__pos= yypos64; yy->__thunkpos= yythunkpos64; + } + l65:; if (!yy_StartList(yy)) goto l63; yyDo(yy, yySet, -1, 0); + { int yypos66= yy->__pos, yythunkpos66= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l66; +#undef yytext +#undef yyleng + } + { int yypos68= yy->__pos, yythunkpos68= yy->__thunkpos; if (!yy_MetaDataKey(yy)) goto l66; if (!yy_Sp(yy)) goto l66; if (!yymatchChar(yy, ':')) goto l66; if (!yy_Sp(yy)) goto l66; + { int yypos69= yy->__pos, yythunkpos69= yy->__thunkpos; if (!yy_Newline(yy)) goto l69; goto l66; + l69:; yy->__pos= yypos69; yy->__thunkpos= yythunkpos69; + } yy->__pos= yypos68; yy->__thunkpos= yythunkpos68; + } if (!yy_MetaData(yy)) goto l66; yyDo(yy, yy_1_DocForOPML, yy->__begin, yy->__end); goto l67; + l66:; yy->__pos= yypos66; yy->__thunkpos= yythunkpos66; + } + l67:; + l70:; + { int yypos71= yy->__pos, yythunkpos71= yy->__thunkpos; if (!yy_OPMLBlock(yy)) goto l71; yyDo(yy, yy_2_DocForOPML, yy->__begin, yy->__end); goto l70; + l71:; yy->__pos= yypos71; yy->__thunkpos= yythunkpos71; + } yyDo(yy, yy_3_DocForOPML, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "DocForOPML", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l63:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DocForOPML", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MMDMathSpan(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MMDMathSpan")); if (!yymatchChar(yy, '\\')) goto l72; + { int yypos73= yy->__pos, yythunkpos73= yy->__thunkpos; if (!yymatchString(yy, "\\[")) goto l74; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l74; +#undef yytext +#undef yyleng + } + l75:; + { int yypos76= yy->__pos, yythunkpos76= yy->__thunkpos; + { int yypos77= yy->__pos, yythunkpos77= yy->__thunkpos; if (!yymatchString(yy, "\\\\]")) goto l77; goto l76; + l77:; yy->__pos= yypos77; yy->__thunkpos= yythunkpos77; + } if (!yymatchDot(yy)) goto l76; goto l75; + l76:; yy->__pos= yypos76; yy->__thunkpos= yythunkpos76; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l74; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "\\\\]")) goto l74; goto l73; + l74:; yy->__pos= yypos73; yy->__thunkpos= yythunkpos73; if (!yymatchString(yy, "\\(")) goto l72; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l72; +#undef yytext +#undef yyleng + } + l78:; + { int yypos79= yy->__pos, yythunkpos79= yy->__thunkpos; + { int yypos80= yy->__pos, yythunkpos80= yy->__thunkpos; if (!yymatchString(yy, "\\\\)")) goto l80; goto l79; + l80:; yy->__pos= yypos80; yy->__thunkpos= yythunkpos80; + } if (!yymatchDot(yy)) goto l79; goto l78; + l79:; yy->__pos= yypos79; yy->__thunkpos= yythunkpos79; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l72; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "\\\\)")) goto l72; + } + l73:; yyDo(yy, yy_1_MMDMathSpan, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MMDMathSpan", yy->__buf+yy->__pos)); + return 1; + l72:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MMDMathSpan", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ULMathSpan(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ULMathSpan")); + { int yypos82= yy->__pos, yythunkpos82= yy->__thunkpos; if (!yymatchString(yy, "$$")) goto l83; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l83; +#undef yytext +#undef yyleng + } + { int yypos84= yy->__pos, yythunkpos84= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l84; goto l83; + l84:; yy->__pos= yypos84; yy->__thunkpos= yythunkpos84; + } + l85:; + { int yypos86= yy->__pos, yythunkpos86= yy->__thunkpos; + { int yypos87= yy->__pos, yythunkpos87= yy->__thunkpos; if (!yymatchString(yy, "\\$")) goto l88; goto l87; + l88:; yy->__pos= yypos87; yy->__thunkpos= yythunkpos87; + { int yypos89= yy->__pos, yythunkpos89= yy->__thunkpos; + { int yypos90= yy->__pos, yythunkpos90= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l90; goto l91; + l90:; yy->__pos= yypos90; yy->__thunkpos= yythunkpos90; + } + l91:; if (!yymatchChar(yy, '$')) goto l89; goto l86; + l89:; yy->__pos= yypos89; yy->__thunkpos= yythunkpos89; + } if (!yymatchDot(yy)) goto l86; + } + l87:; goto l85; + l86:; yy->__pos= yypos86; yy->__thunkpos= yythunkpos86; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l83; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "$$")) goto l83; goto l82; + l83:; yy->__pos= yypos82; yy->__thunkpos= yythunkpos82; if (!yymatchChar(yy, '$')) goto l81; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l81; +#undef yytext +#undef yyleng + } + { int yypos92= yy->__pos, yythunkpos92= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l92; goto l81; + l92:; yy->__pos= yypos92; yy->__thunkpos= yythunkpos92; + } + l93:; + { int yypos94= yy->__pos, yythunkpos94= yy->__thunkpos; + { int yypos95= yy->__pos, yythunkpos95= yy->__thunkpos; if (!yymatchString(yy, "\\$")) goto l96; goto l95; + l96:; yy->__pos= yypos95; yy->__thunkpos= yythunkpos95; + { int yypos97= yy->__pos, yythunkpos97= yy->__thunkpos; + { int yypos98= yy->__pos, yythunkpos98= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l98; goto l99; + l98:; yy->__pos= yypos98; yy->__thunkpos= yythunkpos98; + } + l99:; if (!yymatchChar(yy, '$')) goto l97; goto l94; + l97:; yy->__pos= yypos97; yy->__thunkpos= yythunkpos97; + } + { int yypos100= yy->__pos, yythunkpos100= yy->__thunkpos; if (!yy_Newline(yy)) goto l100; goto l94; + l100:; yy->__pos= yypos100; yy->__thunkpos= yythunkpos100; + } if (!yymatchDot(yy)) goto l94; + } + l95:; goto l93; + l94:; yy->__pos= yypos94; yy->__thunkpos= yythunkpos94; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l81; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '$')) goto l81; + } + l82:; yyDo(yy, yy_1_ULMathSpan, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ULMathSpan", yy->__buf+yy->__pos)); + return 1; + l81:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ULMathSpan", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NaturalAlign(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NaturalAlign")); if (!yymatchChar(yy, '-')) goto l101; + l102:; + { int yypos103= yy->__pos, yythunkpos103= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l103; goto l102; + l103:; yy->__pos= yypos103; yy->__thunkpos= yythunkpos103; + } + { int yypos104= yy->__pos, yythunkpos104= yy->__thunkpos; + { int yypos105= yy->__pos, yythunkpos105= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l105; goto l101; + l105:; yy->__pos= yypos105; yy->__thunkpos= yythunkpos105; + } + { int yypos106= yy->__pos, yythunkpos106= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l106; goto l101; + l106:; yy->__pos= yypos106; yy->__thunkpos= yythunkpos106; + } yy->__pos= yypos104; yy->__thunkpos= yythunkpos104; + } yyDo(yy, yy_1_NaturalAlign, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "NaturalAlign", yy->__buf+yy->__pos)); + return 1; + l101:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NaturalAlign", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RightAlign(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RightAlign")); if (!yymatchChar(yy, '-')) goto l107; + l108:; + { int yypos109= yy->__pos, yythunkpos109= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l109; goto l108; + l109:; yy->__pos= yypos109; yy->__thunkpos= yythunkpos109; + } if (!yymatchChar(yy, ':')) goto l107; + { int yypos110= yy->__pos, yythunkpos110= yy->__thunkpos; + { int yypos111= yy->__pos, yythunkpos111= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l111; goto l107; + l111:; yy->__pos= yypos111; yy->__thunkpos= yythunkpos111; + } + { int yypos112= yy->__pos, yythunkpos112= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l112; goto l107; + l112:; yy->__pos= yypos112; yy->__thunkpos= yythunkpos112; + } yy->__pos= yypos110; yy->__thunkpos= yythunkpos110; + } yyDo(yy, yy_1_RightAlign, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RightAlign", yy->__buf+yy->__pos)); + return 1; + l107:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RightAlign", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CenterAlign(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CenterAlign")); if (!yymatchChar(yy, ':')) goto l113; + l114:; + { int yypos115= yy->__pos, yythunkpos115= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l115; goto l114; + l115:; yy->__pos= yypos115; yy->__thunkpos= yythunkpos115; + } if (!yymatchChar(yy, ':')) goto l113; + { int yypos116= yy->__pos, yythunkpos116= yy->__thunkpos; + { int yypos117= yy->__pos, yythunkpos117= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l117; goto l113; + l117:; yy->__pos= yypos117; yy->__thunkpos= yythunkpos117; + } + { int yypos118= yy->__pos, yythunkpos118= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l118; goto l113; + l118:; yy->__pos= yypos118; yy->__thunkpos= yythunkpos118; + } yy->__pos= yypos116; yy->__thunkpos= yythunkpos116; + } yyDo(yy, yy_1_CenterAlign, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CenterAlign", yy->__buf+yy->__pos)); + return 1; + l113:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CenterAlign", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_LeftAlign(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "LeftAlign")); if (!yymatchChar(yy, ':')) goto l119; if (!yymatchChar(yy, '-')) goto l119; + l120:; + { int yypos121= yy->__pos, yythunkpos121= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l121; goto l120; + l121:; yy->__pos= yypos121; yy->__thunkpos= yythunkpos121; + } + { int yypos122= yy->__pos, yythunkpos122= yy->__thunkpos; + { int yypos123= yy->__pos, yythunkpos123= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l123; goto l119; + l123:; yy->__pos= yypos123; yy->__thunkpos= yythunkpos123; + } + { int yypos124= yy->__pos, yythunkpos124= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l124; goto l119; + l124:; yy->__pos= yypos124; yy->__thunkpos= yythunkpos124; + } yy->__pos= yypos122; yy->__thunkpos= yythunkpos122; + } yyDo(yy, yy_1_LeftAlign, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "LeftAlign", yy->__buf+yy->__pos)); + return 1; + l119:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "LeftAlign", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NaturalAlignWrap(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NaturalAlignWrap")); if (!yymatchChar(yy, '-')) goto l125; + l126:; + { int yypos127= yy->__pos, yythunkpos127= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l127; goto l126; + l127:; yy->__pos= yypos127; yy->__thunkpos= yythunkpos127; + } if (!yymatchChar(yy, '+')) goto l125; + { int yypos128= yy->__pos, yythunkpos128= yy->__thunkpos; + { int yypos129= yy->__pos, yythunkpos129= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l129; goto l125; + l129:; yy->__pos= yypos129; yy->__thunkpos= yythunkpos129; + } + { int yypos130= yy->__pos, yythunkpos130= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l130; goto l125; + l130:; yy->__pos= yypos130; yy->__thunkpos= yythunkpos130; + } yy->__pos= yypos128; yy->__thunkpos= yythunkpos128; + } yyDo(yy, yy_1_NaturalAlignWrap, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "NaturalAlignWrap", yy->__buf+yy->__pos)); + return 1; + l125:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NaturalAlignWrap", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RightAlignWrap(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RightAlignWrap")); if (!yymatchChar(yy, '-')) goto l131; + l132:; + { int yypos133= yy->__pos, yythunkpos133= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l133; goto l132; + l133:; yy->__pos= yypos133; yy->__thunkpos= yythunkpos133; + } if (!yymatchChar(yy, ':')) goto l131; if (!yymatchChar(yy, '+')) goto l131; + { int yypos134= yy->__pos, yythunkpos134= yy->__thunkpos; + { int yypos135= yy->__pos, yythunkpos135= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l135; goto l131; + l135:; yy->__pos= yypos135; yy->__thunkpos= yythunkpos135; + } + { int yypos136= yy->__pos, yythunkpos136= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l136; goto l131; + l136:; yy->__pos= yypos136; yy->__thunkpos= yythunkpos136; + } yy->__pos= yypos134; yy->__thunkpos= yythunkpos134; + } yyDo(yy, yy_1_RightAlignWrap, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RightAlignWrap", yy->__buf+yy->__pos)); + return 1; + l131:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RightAlignWrap", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CenterAlignWrap(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CenterAlignWrap")); if (!yymatchChar(yy, ':')) goto l137; + l138:; + { int yypos139= yy->__pos, yythunkpos139= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l139; goto l138; + l139:; yy->__pos= yypos139; yy->__thunkpos= yythunkpos139; + } if (!yymatchChar(yy, '+')) goto l137; if (!yymatchChar(yy, ':')) goto l137; + { int yypos140= yy->__pos, yythunkpos140= yy->__thunkpos; + { int yypos141= yy->__pos, yythunkpos141= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l141; goto l137; + l141:; yy->__pos= yypos141; yy->__thunkpos= yythunkpos141; + } + { int yypos142= yy->__pos, yythunkpos142= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l142; goto l137; + l142:; yy->__pos= yypos142; yy->__thunkpos= yythunkpos142; + } yy->__pos= yypos140; yy->__thunkpos= yythunkpos140; + } yyDo(yy, yy_1_CenterAlignWrap, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CenterAlignWrap", yy->__buf+yy->__pos)); + return 1; + l137:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CenterAlignWrap", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_LeftAlignWrap(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "LeftAlignWrap")); if (!yymatchChar(yy, ':')) goto l143; if (!yymatchChar(yy, '-')) goto l143; + l144:; + { int yypos145= yy->__pos, yythunkpos145= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l145; goto l144; + l145:; yy->__pos= yypos145; yy->__thunkpos= yythunkpos145; + } if (!yymatchChar(yy, '+')) goto l143; + { int yypos146= yy->__pos, yythunkpos146= yy->__thunkpos; + { int yypos147= yy->__pos, yythunkpos147= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l147; goto l143; + l147:; yy->__pos= yypos147; yy->__thunkpos= yythunkpos147; + } + { int yypos148= yy->__pos, yythunkpos148= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l148; goto l143; + l148:; yy->__pos= yypos148; yy->__thunkpos= yythunkpos148; + } yy->__pos= yypos146; yy->__thunkpos= yythunkpos146; + } yyDo(yy, yy_1_LeftAlignWrap, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "LeftAlignWrap", yy->__buf+yy->__pos)); + return 1; + l143:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "LeftAlignWrap", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AlignmentCell(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AlignmentCell")); if (!yy_Sp(yy)) goto l149; + { int yypos150= yy->__pos, yythunkpos150= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l150; goto l149; + l150:; yy->__pos= yypos150; yy->__thunkpos= yythunkpos150; + } + { int yypos151= yy->__pos, yythunkpos151= yy->__thunkpos; if (!yy_LeftAlignWrap(yy)) goto l152; goto l151; + l152:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_CenterAlignWrap(yy)) goto l153; goto l151; + l153:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_RightAlignWrap(yy)) goto l154; goto l151; + l154:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_NaturalAlignWrap(yy)) goto l155; goto l151; + l155:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_LeftAlign(yy)) goto l156; goto l151; + l156:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_CenterAlign(yy)) goto l157; goto l151; + l157:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_RightAlign(yy)) goto l158; goto l151; + l158:; yy->__pos= yypos151; yy->__thunkpos= yythunkpos151; if (!yy_NaturalAlign(yy)) goto l149; + } + l151:; if (!yy_Sp(yy)) goto l149; + { int yypos159= yy->__pos, yythunkpos159= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l159; goto l160; + l159:; yy->__pos= yypos159; yy->__thunkpos= yythunkpos159; + } + l160:; + yyprintf((stderr, " ok %s @ %s\n", "AlignmentCell", yy->__buf+yy->__pos)); + return 1; + l149:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AlignmentCell", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CellStr(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CellStr")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l161; +#undef yytext +#undef yyleng + } + { int yypos162= yy->__pos, yythunkpos162= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l162; goto l161; + l162:; yy->__pos= yypos162; yy->__thunkpos= yythunkpos162; + } if (!yy_NormalChar(yy)) goto l161; + l163:; + { int yypos164= yy->__pos, yythunkpos164= yy->__thunkpos; + { int yypos165= yy->__pos, yythunkpos165= yy->__thunkpos; + { int yypos167= yy->__pos, yythunkpos167= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l167; goto l166; + l167:; yy->__pos= yypos167; yy->__thunkpos= yythunkpos167; + } if (!yy_NormalChar(yy)) goto l166; goto l165; + l166:; yy->__pos= yypos165; yy->__thunkpos= yythunkpos165; if (!yymatchChar(yy, '_')) goto l164; + l168:; + { int yypos169= yy->__pos, yythunkpos169= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l169; goto l168; + l169:; yy->__pos= yypos169; yy->__thunkpos= yythunkpos169; + } + { int yypos170= yy->__pos, yythunkpos170= yy->__thunkpos; if (!yy_Alphanumeric(yy)) goto l164; yy->__pos= yypos170; yy->__thunkpos= yythunkpos170; + } + } + l165:; goto l163; + l164:; yy->__pos= yypos164; yy->__thunkpos= yythunkpos164; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l161; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_CellStr, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CellStr", yy->__buf+yy->__pos)); + return 1; + l161:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CellStr", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FullCell(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "FullCell")); if (!yy_Sp(yy)) goto l171; if (!yy_StartList(yy)) goto l171; yyDo(yy, yySet, -1, 0); + { int yypos174= yy->__pos, yythunkpos174= yy->__thunkpos; + { int yypos176= yy->__pos, yythunkpos176= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l176; goto l175; + l176:; yy->__pos= yypos176; yy->__thunkpos= yythunkpos176; + } if (!yy_CellStr(yy)) goto l175; goto l174; + l175:; yy->__pos= yypos174; yy->__thunkpos= yythunkpos174; + { int yypos177= yy->__pos, yythunkpos177= yy->__thunkpos; if (!yy_Newline(yy)) goto l177; goto l171; + l177:; yy->__pos= yypos177; yy->__thunkpos= yythunkpos177; + } + { int yypos178= yy->__pos, yythunkpos178= yy->__thunkpos; if (!yy_Endline(yy)) goto l178; goto l171; + l178:; yy->__pos= yypos178; yy->__thunkpos= yythunkpos178; + } + { int yypos179= yy->__pos, yythunkpos179= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l179; goto l171; + l179:; yy->__pos= yypos179; yy->__thunkpos= yythunkpos179; + } + { int yypos180= yy->__pos, yythunkpos180= yy->__thunkpos; if (!yy_Str(yy)) goto l180; goto l171; + l180:; yy->__pos= yypos180; yy->__thunkpos= yythunkpos180; + } + { int yypos181= yy->__pos, yythunkpos181= yy->__thunkpos; if (!yy_Sp(yy)) goto l181; + { int yypos182= yy->__pos, yythunkpos182= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l181; yy->__pos= yypos182; yy->__thunkpos= yythunkpos182; + } goto l171; + l181:; yy->__pos= yypos181; yy->__thunkpos= yythunkpos181; + } if (!yy_Inline(yy)) goto l171; + } + l174:; yyDo(yy, yy_1_FullCell, yy->__begin, yy->__end); + l172:; + { int yypos173= yy->__pos, yythunkpos173= yy->__thunkpos; + { int yypos183= yy->__pos, yythunkpos183= yy->__thunkpos; + { int yypos185= yy->__pos, yythunkpos185= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l185; goto l184; + l185:; yy->__pos= yypos185; yy->__thunkpos= yythunkpos185; + } if (!yy_CellStr(yy)) goto l184; goto l183; + l184:; yy->__pos= yypos183; yy->__thunkpos= yythunkpos183; + { int yypos186= yy->__pos, yythunkpos186= yy->__thunkpos; if (!yy_Newline(yy)) goto l186; goto l173; + l186:; yy->__pos= yypos186; yy->__thunkpos= yythunkpos186; + } + { int yypos187= yy->__pos, yythunkpos187= yy->__thunkpos; if (!yy_Endline(yy)) goto l187; goto l173; + l187:; yy->__pos= yypos187; yy->__thunkpos= yythunkpos187; + } + { int yypos188= yy->__pos, yythunkpos188= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l188; goto l173; + l188:; yy->__pos= yypos188; yy->__thunkpos= yythunkpos188; + } + { int yypos189= yy->__pos, yythunkpos189= yy->__thunkpos; if (!yy_Str(yy)) goto l189; goto l173; + l189:; yy->__pos= yypos189; yy->__thunkpos= yythunkpos189; + } + { int yypos190= yy->__pos, yythunkpos190= yy->__thunkpos; if (!yy_Sp(yy)) goto l190; + { int yypos191= yy->__pos, yythunkpos191= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l190; yy->__pos= yypos191; yy->__thunkpos= yythunkpos191; + } goto l173; + l190:; yy->__pos= yypos190; yy->__thunkpos= yythunkpos190; + } if (!yy_Inline(yy)) goto l173; + } + l183:; yyDo(yy, yy_1_FullCell, yy->__begin, yy->__end); goto l172; + l173:; yy->__pos= yypos173; yy->__thunkpos= yythunkpos173; + } if (!yy_Sp(yy)) goto l171; + { int yypos192= yy->__pos, yythunkpos192= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l192; goto l193; + l192:; yy->__pos= yypos192; yy->__thunkpos= yythunkpos192; + } + l193:; yyDo(yy, yy_2_FullCell, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FullCell", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l171:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FullCell", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EmptyCell(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "EmptyCell")); if (!yy_Sp(yy)) goto l194; if (!yy_CellDivider(yy)) goto l194; yyDo(yy, yy_1_EmptyCell, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EmptyCell", yy->__buf+yy->__pos)); + return 1; + l194:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EmptyCell", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ExtendedCell(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ExtendedCell")); + { int yypos196= yy->__pos, yythunkpos196= yy->__thunkpos; if (!yy_EmptyCell(yy)) goto l197; goto l196; + l197:; yy->__pos= yypos196; yy->__thunkpos= yythunkpos196; if (!yy_FullCell(yy)) goto l195; + } + l196:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l195; +#undef yytext +#undef yyleng + } if (!yy_CellDivider(yy)) goto l195; + l198:; + { int yypos199= yy->__pos, yythunkpos199= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l199; goto l198; + l199:; yy->__pos= yypos199; yy->__thunkpos= yythunkpos199; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l195; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_ExtendedCell, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ExtendedCell", yy->__buf+yy->__pos)); + return 1; + l195:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ExtendedCell", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TableCell(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TableCell")); + { int yypos201= yy->__pos, yythunkpos201= yy->__thunkpos; if (!yy_ExtendedCell(yy)) goto l202; goto l201; + l202:; yy->__pos= yypos201; yy->__thunkpos= yythunkpos201; if (!yy_EmptyCell(yy)) goto l203; goto l201; + l203:; yy->__pos= yypos201; yy->__thunkpos= yythunkpos201; if (!yy_FullCell(yy)) goto l200; + } + l201:; + yyprintf((stderr, " ok %s @ %s\n", "TableCell", yy->__buf+yy->__pos)); + return 1; + l200:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TableCell", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CellDivider(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CellDivider")); if (!yymatchChar(yy, '|')) goto l204; + yyprintf((stderr, " ok %s @ %s\n", "CellDivider", yy->__buf+yy->__pos)); + return 1; + l204:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CellDivider", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TableLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TableLine")); + l206:; + { int yypos207= yy->__pos, yythunkpos207= yy->__thunkpos; + { int yypos208= yy->__pos, yythunkpos208= yy->__thunkpos; if (!yy_Newline(yy)) goto l208; goto l207; + l208:; yy->__pos= yypos208; yy->__thunkpos= yythunkpos208; + } + { int yypos209= yy->__pos, yythunkpos209= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l209; goto l207; + l209:; yy->__pos= yypos209; yy->__thunkpos= yythunkpos209; + } if (!yymatchDot(yy)) goto l207; goto l206; + l207:; yy->__pos= yypos207; yy->__thunkpos= yythunkpos207; + } if (!yy_CellDivider(yy)) goto l205; + yyprintf((stderr, " ok %s @ %s\n", "TableLine", yy->__buf+yy->__pos)); + return 1; + l205:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TableLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TableRow(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "TableRow")); if (!yy_StartList(yy)) goto l210; yyDo(yy, yySet, -1, 0); + { int yypos211= yy->__pos, yythunkpos211= yy->__thunkpos; if (!yy_SeparatorLine(yy)) goto l211; goto l210; + l211:; yy->__pos= yypos211; yy->__thunkpos= yythunkpos211; + } + { int yypos212= yy->__pos, yythunkpos212= yy->__thunkpos; if (!yy_TableLine(yy)) goto l210; yy->__pos= yypos212; yy->__thunkpos= yythunkpos212; + } + { int yypos213= yy->__pos, yythunkpos213= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l213; goto l214; + l213:; yy->__pos= yypos213; yy->__thunkpos= yythunkpos213; + } + l214:; if (!yy_TableCell(yy)) goto l210; yyDo(yy, yy_1_TableRow, yy->__begin, yy->__end); + l215:; + { int yypos216= yy->__pos, yythunkpos216= yy->__thunkpos; if (!yy_TableCell(yy)) goto l216; yyDo(yy, yy_1_TableRow, yy->__begin, yy->__end); goto l215; + l216:; yy->__pos= yypos216; yy->__thunkpos= yythunkpos216; + } if (!yy_Sp(yy)) goto l210; if (!yy_Newline(yy)) goto l210; if (!yy_ULNewline(yy)) goto l210; yyDo(yy, yy_2_TableRow, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "TableRow", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l210:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TableRow", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ULNewline(yycontext *yy) +{ + yyprintf((stderr, "%s\n", "ULNewline")); + { int yypos218= yy->__pos, yythunkpos218= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES) )) goto l218; +#undef yytext +#undef yyleng + } if (!yy_BlankLine(yy)) goto l218; goto l219; + l218:; yy->__pos= yypos218; yy->__thunkpos= yythunkpos218; + } + l219:; + yyprintf((stderr, " ok %s @ %s\n", "ULNewline", yy->__buf+yy->__pos)); + return 1; +} +YY_RULE(int) yy_Definition(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Definition")); if (!yy_StartList(yy)) goto l220; yyDo(yy, yySet, -2, 0); if (!yy_StartList(yy)) goto l220; yyDo(yy, yySet, -1, 0); + { int yypos221= yy->__pos, yythunkpos221= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l221; yyDo(yy, yy_1_Definition, yy->__begin, yy->__end); goto l222; + l221:; yy->__pos= yypos221; yy->__thunkpos= yythunkpos221; + } + l222:; if (!yy_NonindentSpace(yy)) goto l220; if (!yymatchChar(yy, ':')) goto l220; if (!yy_Sp(yy)) goto l220; if (!yy_RawLine(yy)) goto l220; yyDo(yy, yy_2_Definition, yy->__begin, yy->__end); + l223:; + { int yypos224= yy->__pos, yythunkpos224= yy->__thunkpos; + { int yypos225= yy->__pos, yythunkpos225= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l225; goto l224; + l225:; yy->__pos= yypos225; yy->__thunkpos= yythunkpos225; + } + { int yypos226= yy->__pos, yythunkpos226= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l226; goto l224; + l226:; yy->__pos= yypos226; yy->__thunkpos= yythunkpos226; + } if (!yy_RawLine(yy)) goto l224; yyDo(yy, yy_3_Definition, yy->__begin, yy->__end); goto l223; + l224:; yy->__pos= yypos224; yy->__thunkpos= yythunkpos224; + } + l227:; + { int yypos228= yy->__pos, yythunkpos228= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l228; yyDo(yy, yy_4_Definition, yy->__begin, yy->__end); if (!yy_IndentedLine(yy)) goto l228; yyDo(yy, yy_5_Definition, yy->__begin, yy->__end); + l229:; + { int yypos230= yy->__pos, yythunkpos230= yy->__thunkpos; if (!yy_IndentedLine(yy)) goto l230; yyDo(yy, yy_5_Definition, yy->__begin, yy->__end); goto l229; + l230:; yy->__pos= yypos230; yy->__thunkpos= yythunkpos230; + } yyDo(yy, yy_6_Definition, yy->__begin, yy->__end); goto l227; + l228:; yy->__pos= yypos228; yy->__thunkpos= yythunkpos228; + } yyDo(yy, yy_7_Definition, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Definition", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l220:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Definition", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Term(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Term")); if (!yy_StartList(yy)) goto l231; yyDo(yy, yySet, -1, 0); + { int yypos232= yy->__pos, yythunkpos232= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l232; goto l231; + l232:; yy->__pos= yypos232; yy->__thunkpos= yythunkpos232; + } + { int yypos233= yy->__pos, yythunkpos233= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l233; goto l231; + l233:; yy->__pos= yypos233; yy->__thunkpos= yythunkpos233; + } + { int yypos236= yy->__pos, yythunkpos236= yy->__thunkpos; if (!yy_Newline(yy)) goto l236; goto l231; + l236:; yy->__pos= yypos236; yy->__thunkpos= yythunkpos236; + } + { int yypos237= yy->__pos, yythunkpos237= yy->__thunkpos; if (!yy_Endline(yy)) goto l237; goto l231; + l237:; yy->__pos= yypos237; yy->__thunkpos= yythunkpos237; + } if (!yy_Inline(yy)) goto l231; yyDo(yy, yy_1_Term, yy->__begin, yy->__end); + l234:; + { int yypos235= yy->__pos, yythunkpos235= yy->__thunkpos; + { int yypos238= yy->__pos, yythunkpos238= yy->__thunkpos; if (!yy_Newline(yy)) goto l238; goto l235; + l238:; yy->__pos= yypos238; yy->__thunkpos= yythunkpos238; + } + { int yypos239= yy->__pos, yythunkpos239= yy->__thunkpos; if (!yy_Endline(yy)) goto l239; goto l235; + l239:; yy->__pos= yypos239; yy->__thunkpos= yythunkpos239; + } if (!yy_Inline(yy)) goto l235; yyDo(yy, yy_1_Term, yy->__begin, yy->__end); goto l234; + l235:; yy->__pos= yypos235; yy->__thunkpos= yythunkpos235; + } if (!yy_Newline(yy)) goto l231; yyDo(yy, yy_2_Term, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Term", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l231:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Term", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TermLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TermLine")); + { int yypos241= yy->__pos, yythunkpos241= yy->__thunkpos; if (!yymatchChar(yy, ':')) goto l241; goto l240; + l241:; yy->__pos= yypos241; yy->__thunkpos= yythunkpos241; + } + { int yypos242= yy->__pos, yythunkpos242= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l242; goto l240; + l242:; yy->__pos= yypos242; yy->__thunkpos= yythunkpos242; + } + l243:; + { int yypos244= yy->__pos, yythunkpos244= yy->__thunkpos; + { int yypos245= yy->__pos, yythunkpos245= yy->__thunkpos; if (!yy_Newline(yy)) goto l245; goto l244; + l245:; yy->__pos= yypos245; yy->__thunkpos= yythunkpos245; + } if (!yymatchDot(yy)) goto l244; goto l243; + l244:; yy->__pos= yypos244; yy->__thunkpos= yythunkpos244; + } if (!yy_Newline(yy)) goto l240; + yyprintf((stderr, " ok %s @ %s\n", "TermLine", yy->__buf+yy->__pos)); + return 1; + l240:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TermLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SeparatorLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "SeparatorLine")); if (!yy_StartList(yy)) goto l246; yyDo(yy, yySet, -1, 0); + { int yypos247= yy->__pos, yythunkpos247= yy->__thunkpos; if (!yy_TableLine(yy)) goto l246; yy->__pos= yypos247; yy->__thunkpos= yythunkpos247; + } + { int yypos248= yy->__pos, yythunkpos248= yy->__thunkpos; if (!yy_CellDivider(yy)) goto l248; goto l249; + l248:; yy->__pos= yypos248; yy->__thunkpos= yythunkpos248; + } + l249:; if (!yy_AlignmentCell(yy)) goto l246; yyDo(yy, yy_1_SeparatorLine, yy->__begin, yy->__end); + l250:; + { int yypos251= yy->__pos, yythunkpos251= yy->__thunkpos; if (!yy_AlignmentCell(yy)) goto l251; yyDo(yy, yy_1_SeparatorLine, yy->__begin, yy->__end); goto l250; + l251:; yy->__pos= yypos251; yy->__thunkpos= yythunkpos251; + } if (!yy_Sp(yy)) goto l246; if (!yy_Newline(yy)) goto l246; if (!yy_ULNewline(yy)) goto l246; yyDo(yy, yy_2_SeparatorLine, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "SeparatorLine", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l246:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SeparatorLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TableBody(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "TableBody")); if (!yy_StartList(yy)) goto l252; yyDo(yy, yySet, -1, 0); if (!yy_TableRow(yy)) goto l252; yyDo(yy, yy_1_TableBody, yy->__begin, yy->__end); + l253:; + { int yypos254= yy->__pos, yythunkpos254= yy->__thunkpos; if (!yy_TableRow(yy)) goto l254; yyDo(yy, yy_1_TableBody, yy->__begin, yy->__end); goto l253; + l254:; yy->__pos= yypos254; yy->__thunkpos= yythunkpos254; + } yyDo(yy, yy_2_TableBody, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "TableBody", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l252:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TableBody", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TableCaption(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 3, 0); + yyprintf((stderr, "%s\n", "TableCaption")); if (!yy_StartList(yy)) goto l255; yyDo(yy, yySet, -3, 0); if (!yy_Label(yy)) goto l255; yyDo(yy, yySet, -2, 0); + { int yypos256= yy->__pos, yythunkpos256= yy->__thunkpos; if (!yy_Label(yy)) goto l256; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_TableCaption, yy->__begin, yy->__end); goto l257; + l256:; yy->__pos= yypos256; yy->__thunkpos= yythunkpos256; + } + l257:; if (!yy_Sp(yy)) goto l255; if (!yy_Newline(yy)) goto l255; if (!yy_ULNewline(yy)) goto l255; yyDo(yy, yy_2_TableCaption, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "TableCaption", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 3, 0); + return 1; + l255:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TableCaption", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AutoLabels(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 3, 0); + yyprintf((stderr, "%s\n", "AutoLabels")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || (!extension(yy->state, EXT_COMPATIBILITY) && !extension(yy->state, EXT_NO_LABELS)))) goto l258; +#undef yytext +#undef yyleng + } if (!yy_StartList(yy)) goto l258; yyDo(yy, yySet, -3, 0); + l259:; + { int yypos260= yy->__pos, yythunkpos260= yy->__thunkpos; + { int yypos261= yy->__pos, yythunkpos261= yy->__thunkpos; if (!yy_Heading(yy)) goto l262; yyDo(yy, yySet, -2, 0); yyDo(yy, yy_1_AutoLabels, yy->__begin, yy->__end); goto l261; + l262:; yy->__pos= yypos261; yy->__thunkpos= yythunkpos261; if (!yy_TableCaption(yy)) goto l263; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_AutoLabels, yy->__begin, yy->__end); if (!yy_TableBody(yy)) goto l263; goto l261; + l263:; yy->__pos= yypos261; yy->__thunkpos= yythunkpos261; + { int yypos267= yy->__pos, yythunkpos267= yy->__thunkpos; if (!yy_TableBody(yy)) goto l268; goto l267; + l268:; yy->__pos= yypos267; yy->__thunkpos= yythunkpos267; if (!yy_SeparatorLine(yy)) goto l264; + } + l267:; + l265:; + { int yypos266= yy->__pos, yythunkpos266= yy->__thunkpos; + { int yypos269= yy->__pos, yythunkpos269= yy->__thunkpos; if (!yy_TableBody(yy)) goto l270; goto l269; + l270:; yy->__pos= yypos269; yy->__thunkpos= yythunkpos269; if (!yy_SeparatorLine(yy)) goto l266; + } + l269:; goto l265; + l266:; yy->__pos= yypos266; yy->__thunkpos= yythunkpos266; + } if (!yy_TableCaption(yy)) goto l264; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_3_AutoLabels, yy->__begin, yy->__end); goto l261; + l264:; yy->__pos= yypos261; yy->__thunkpos= yythunkpos261; if (!yy_SkipBlock(yy)) goto l260; + } + l261:; goto l259; + l260:; yy->__pos= yypos260; yy->__thunkpos= yythunkpos260; + } yyDo(yy, yy_4_AutoLabels, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AutoLabels", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 3, 0); + return 1; + l258:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AutoLabels", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RawCitationReference(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RawCitationReference")); if (!yymatchString(yy, "[#")) goto l271; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l271; +#undef yytext +#undef yyleng + } + { int yypos274= yy->__pos, yythunkpos274= yy->__thunkpos; if (!yy_Newline(yy)) goto l274; goto l271; + l274:; yy->__pos= yypos274; yy->__thunkpos= yythunkpos274; + } + { int yypos275= yy->__pos, yythunkpos275= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l275; goto l271; + l275:; yy->__pos= yypos275; yy->__thunkpos= yythunkpos275; + } if (!yymatchDot(yy)) goto l271; + l272:; + { int yypos273= yy->__pos, yythunkpos273= yy->__thunkpos; + { int yypos276= yy->__pos, yythunkpos276= yy->__thunkpos; if (!yy_Newline(yy)) goto l276; goto l273; + l276:; yy->__pos= yypos276; yy->__thunkpos= yythunkpos276; + } + { int yypos277= yy->__pos, yythunkpos277= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l277; goto l273; + l277:; yy->__pos= yypos277; yy->__thunkpos= yythunkpos277; + } if (!yymatchDot(yy)) goto l273; goto l272; + l273:; yy->__pos= yypos273; yy->__thunkpos= yythunkpos273; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l271; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ']')) goto l271; yyDo(yy, yy_1_RawCitationReference, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RawCitationReference", yy->__buf+yy->__pos)); + return 1; + l271:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RawCitationReference", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CitationReferenceSingle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "CitationReferenceSingle")); + { int yypos279= yy->__pos, yythunkpos279= yy->__thunkpos; if (!yymatchString(yy, "[]")) goto l280; if (!yy_Spnl(yy)) goto l280; if (!yy_RawCitationReference(yy)) goto l280; yyDo(yy, yySet, -1, 0); goto l279; + l280:; yy->__pos= yypos279; yy->__thunkpos= yythunkpos279; if (!yy_RawCitationReference(yy)) goto l278; yyDo(yy, yySet, -1, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l278; +#undef yytext +#undef yyleng + } + { int yypos281= yy->__pos, yythunkpos281= yy->__thunkpos; if (!yy_Spnl(yy)) goto l281; if (!yymatchString(yy, "[]")) goto l281; goto l282; + l281:; yy->__pos= yypos281; yy->__thunkpos= yythunkpos281; + } + l282:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l278; +#undef yytext +#undef yyleng + } + } + l279:; yyDo(yy, yy_1_CitationReferenceSingle, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CitationReferenceSingle", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l278:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CitationReferenceSingle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CitationReferenceDouble(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "CitationReferenceDouble")); + { int yypos284= yy->__pos, yythunkpos284= yy->__thunkpos; if (!yymatchString(yy, "[]")) goto l284; goto l283; + l284:; yy->__pos= yypos284; yy->__thunkpos= yythunkpos284; + } if (!yy_Label(yy)) goto l283; yyDo(yy, yySet, -2, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l283; +#undef yytext +#undef yyleng + } if (!yy_Spnl(yy)) goto l283; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l283; +#undef yytext +#undef yyleng + } + { int yypos285= yy->__pos, yythunkpos285= yy->__thunkpos; if (!yymatchString(yy, "[]")) goto l285; goto l283; + l285:; yy->__pos= yypos285; yy->__thunkpos= yythunkpos285; + } if (!yy_RawCitationReference(yy)) goto l283; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_CitationReferenceDouble, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CitationReferenceDouble", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l283:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CitationReferenceDouble", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Notes(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Notes")); if (!yy_StartList(yy)) goto l286; yyDo(yy, yySet, -2, 0); + l287:; + { int yypos288= yy->__pos, yythunkpos288= yy->__thunkpos; + { int yypos289= yy->__pos, yythunkpos289= yy->__thunkpos; + { int yypos291= yy->__pos, yythunkpos291= yy->__thunkpos; if (!yy_Glossary(yy)) goto l292; yyDo(yy, yySet, -1, 0); goto l291; + l292:; yy->__pos= yypos291; yy->__thunkpos= yythunkpos291; if (!yy_Note(yy)) goto l290; yyDo(yy, yySet, -1, 0); + } + l291:; yyDo(yy, yy_1_Notes, yy->__begin, yy->__end); goto l289; + l290:; yy->__pos= yypos289; yy->__thunkpos= yythunkpos289; if (!yy_SkipBlock(yy)) goto l288; + } + l289:; goto l287; + l288:; yy->__pos= yypos288; yy->__thunkpos= yythunkpos288; + } yyDo(yy, yy_2_Notes, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Notes", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l286:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Notes", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_InlineNote(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "InlineNote")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l293; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "^[")) goto l293; if (!yy_StartList(yy)) goto l293; yyDo(yy, yySet, -1, 0); + { int yypos296= yy->__pos, yythunkpos296= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l296; goto l293; + l296:; yy->__pos= yypos296; yy->__thunkpos= yythunkpos296; + } if (!yy_Inline(yy)) goto l293; yyDo(yy, yy_1_InlineNote, yy->__begin, yy->__end); + l294:; + { int yypos295= yy->__pos, yythunkpos295= yy->__thunkpos; + { int yypos297= yy->__pos, yythunkpos297= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l297; goto l295; + l297:; yy->__pos= yypos297; yy->__thunkpos= yythunkpos297; + } if (!yy_Inline(yy)) goto l295; yyDo(yy, yy_1_InlineNote, yy->__begin, yy->__end); goto l294; + l295:; yy->__pos= yypos295; yy->__thunkpos= yythunkpos295; + } if (!yymatchChar(yy, ']')) goto l293; yyDo(yy, yy_2_InlineNote, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "InlineNote", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l293:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "InlineNote", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RawNoteBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "RawNoteBlock")); if (!yy_StartList(yy)) goto l298; yyDo(yy, yySet, -1, 0); + { int yypos301= yy->__pos, yythunkpos301= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l301; goto l298; + l301:; yy->__pos= yypos301; yy->__thunkpos= yythunkpos301; + } if (!yy_OptionallyIndentedLine(yy)) goto l298; yyDo(yy, yy_1_RawNoteBlock, yy->__begin, yy->__end); + l299:; + { int yypos300= yy->__pos, yythunkpos300= yy->__thunkpos; + { int yypos302= yy->__pos, yythunkpos302= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l302; goto l300; + l302:; yy->__pos= yypos302; yy->__thunkpos= yythunkpos302; + } if (!yy_OptionallyIndentedLine(yy)) goto l300; yyDo(yy, yy_1_RawNoteBlock, yy->__begin, yy->__end); goto l299; + l300:; yy->__pos= yypos300; yy->__thunkpos= yythunkpos300; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l298; +#undef yytext +#undef yyleng + } + l303:; + { int yypos304= yy->__pos, yythunkpos304= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l304; goto l303; + l304:; yy->__pos= yypos304; yy->__thunkpos= yythunkpos304; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l298; +#undef yytext +#undef yyleng + } yyDo(yy, yy_2_RawNoteBlock, yy->__begin, yy->__end); yyDo(yy, yy_3_RawNoteBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RawNoteBlock", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l298:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RawNoteBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_GlossarySortKey(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "GlossarySortKey")); if (!yymatchChar(yy, '(')) goto l305; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l305; +#undef yytext +#undef yyleng + } + l306:; + { int yypos307= yy->__pos, yythunkpos307= yy->__thunkpos; + { int yypos308= yy->__pos, yythunkpos308= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l308; goto l307; + l308:; yy->__pos= yypos308; yy->__thunkpos= yythunkpos308; + } + { int yypos309= yy->__pos, yythunkpos309= yy->__thunkpos; if (!yy_Newline(yy)) goto l309; goto l307; + l309:; yy->__pos= yypos309; yy->__thunkpos= yythunkpos309; + } if (!yymatchDot(yy)) goto l307; goto l306; + l307:; yy->__pos= yypos307; yy->__thunkpos= yythunkpos307; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l305; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ')')) goto l305; yyDo(yy, yy_1_GlossarySortKey, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "GlossarySortKey", yy->__buf+yy->__pos)); + return 1; + l305:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "GlossarySortKey", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_GlossaryTerm(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "GlossaryTerm")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l310; +#undef yytext +#undef yyleng + } + { int yypos313= yy->__pos, yythunkpos313= yy->__thunkpos; if (!yy_Newline(yy)) goto l313; goto l310; + l313:; yy->__pos= yypos313; yy->__thunkpos= yythunkpos313; + } + { int yypos314= yy->__pos, yythunkpos314= yy->__thunkpos; if (!yymatchChar(yy, '(')) goto l314; goto l310; + l314:; yy->__pos= yypos314; yy->__thunkpos= yythunkpos314; + } if (!yymatchDot(yy)) goto l310; + l311:; + { int yypos312= yy->__pos, yythunkpos312= yy->__thunkpos; + { int yypos315= yy->__pos, yythunkpos315= yy->__thunkpos; if (!yy_Newline(yy)) goto l315; goto l312; + l315:; yy->__pos= yypos315; yy->__thunkpos= yythunkpos315; + } + { int yypos316= yy->__pos, yythunkpos316= yy->__thunkpos; if (!yymatchChar(yy, '(')) goto l316; goto l312; + l316:; yy->__pos= yypos316; yy->__thunkpos= yythunkpos316; + } if (!yymatchDot(yy)) goto l312; goto l311; + l312:; yy->__pos= yypos312; yy->__thunkpos= yythunkpos312; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l310; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_GlossaryTerm, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "GlossaryTerm", yy->__buf+yy->__pos)); + return 1; + l310:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "GlossaryTerm", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RawNoteReference(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RawNoteReference")); + { int yypos318= yy->__pos, yythunkpos318= yy->__thunkpos; if (!yymatchString(yy, "[^")) goto l319; goto l318; + l319:; yy->__pos= yypos318; yy->__thunkpos= yythunkpos318; if (!yymatchString(yy, "[#")) goto l317; + } + l318:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l317; +#undef yytext +#undef yyleng + } + { int yypos322= yy->__pos, yythunkpos322= yy->__thunkpos; if (!yy_Newline(yy)) goto l322; goto l317; + l322:; yy->__pos= yypos322; yy->__thunkpos= yythunkpos322; + } + { int yypos323= yy->__pos, yythunkpos323= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l323; goto l317; + l323:; yy->__pos= yypos323; yy->__thunkpos= yythunkpos323; + } if (!yymatchDot(yy)) goto l317; + l320:; + { int yypos321= yy->__pos, yythunkpos321= yy->__thunkpos; + { int yypos324= yy->__pos, yythunkpos324= yy->__thunkpos; if (!yy_Newline(yy)) goto l324; goto l321; + l324:; yy->__pos= yypos324; yy->__thunkpos= yythunkpos324; + } + { int yypos325= yy->__pos, yythunkpos325= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l325; goto l321; + l325:; yy->__pos= yypos325; yy->__thunkpos= yythunkpos325; + } if (!yymatchDot(yy)) goto l321; goto l320; + l321:; yy->__pos= yypos321; yy->__thunkpos= yythunkpos321; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l317; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ']')) goto l317; yyDo(yy, yy_1_RawNoteReference, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RawNoteReference", yy->__buf+yy->__pos)); + return 1; + l317:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RawNoteReference", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DoubleQuoteEnd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "DoubleQuoteEnd")); if (!yymatchChar(yy, '"')) goto l326; + yyprintf((stderr, " ok %s @ %s\n", "DoubleQuoteEnd", yy->__buf+yy->__pos)); + return 1; + l326:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DoubleQuoteEnd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DoubleQuoteStart(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "DoubleQuoteStart")); if (!yymatchChar(yy, '"')) goto l327; + yyprintf((stderr, " ok %s @ %s\n", "DoubleQuoteStart", yy->__buf+yy->__pos)); + return 1; + l327:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DoubleQuoteStart", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SingleQuoteEnd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SingleQuoteEnd")); if (!yymatchChar(yy, '\'')) goto l328; + { int yypos329= yy->__pos, yythunkpos329= yy->__thunkpos; if (!yy_Alphanumeric(yy)) goto l329; goto l328; + l329:; yy->__pos= yypos329; yy->__thunkpos= yythunkpos329; + } + yyprintf((stderr, " ok %s @ %s\n", "SingleQuoteEnd", yy->__buf+yy->__pos)); + return 1; + l328:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SingleQuoteEnd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SingleQuoteStart(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SingleQuoteStart")); if (!yymatchChar(yy, '\'')) goto l330; + { int yypos331= yy->__pos, yythunkpos331= yy->__thunkpos; + { int yypos332= yy->__pos, yythunkpos332= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l333; goto l332; + l333:; yy->__pos= yypos332; yy->__thunkpos= yythunkpos332; if (!yy_Newline(yy)) goto l331; + } + l332:; goto l330; + l331:; yy->__pos= yypos331; yy->__thunkpos= yythunkpos331; + } + yyprintf((stderr, " ok %s @ %s\n", "SingleQuoteStart", yy->__buf+yy->__pos)); + return 1; + l330:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SingleQuoteStart", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EnDash(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "EnDash")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l334; +#undef yytext +#undef yyleng + } + { int yypos335= yy->__pos, yythunkpos335= yy->__thunkpos; if (!yymatchString(yy, "--")) goto l336; goto l335; + l336:; yy->__pos= yypos335; yy->__thunkpos= yythunkpos335; if (!yymatchChar(yy, '-')) goto l334; + { int yypos337= yy->__pos, yythunkpos337= yy->__thunkpos; if (!yy_Digit(yy)) goto l334; yy->__pos= yypos337; yy->__thunkpos= yythunkpos337; + } + } + l335:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l334; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_EnDash, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EnDash", yy->__buf+yy->__pos)); + return 1; + l334:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EnDash", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EmDash(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "EmDash")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l338; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "---")) goto l338; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l338; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_EmDash, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EmDash", yy->__buf+yy->__pos)); + return 1; + l338:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EmDash", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Apostrophe(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Apostrophe")); if (!yymatchChar(yy, '\'')) goto l339; yyDo(yy, yy_1_Apostrophe, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Apostrophe", yy->__buf+yy->__pos)); + return 1; + l339:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Apostrophe", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DoubleQuoted(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "DoubleQuoted")); if (!yy_DoubleQuoteStart(yy)) goto l340; if (!yy_StartList(yy)) goto l340; yyDo(yy, yySet, -2, 0); + { int yypos343= yy->__pos, yythunkpos343= yy->__thunkpos; if (!yy_DoubleQuoteEnd(yy)) goto l343; goto l340; + l343:; yy->__pos= yypos343; yy->__thunkpos= yythunkpos343; + } if (!yy_Inline(yy)) goto l340; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_DoubleQuoted, yy->__begin, yy->__end); + l341:; + { int yypos342= yy->__pos, yythunkpos342= yy->__thunkpos; + { int yypos344= yy->__pos, yythunkpos344= yy->__thunkpos; if (!yy_DoubleQuoteEnd(yy)) goto l344; goto l342; + l344:; yy->__pos= yypos344; yy->__thunkpos= yythunkpos344; + } if (!yy_Inline(yy)) goto l342; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_DoubleQuoted, yy->__begin, yy->__end); goto l341; + l342:; yy->__pos= yypos342; yy->__thunkpos= yythunkpos342; + } if (!yy_DoubleQuoteEnd(yy)) goto l340; yyDo(yy, yy_2_DoubleQuoted, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "DoubleQuoted", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l340:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DoubleQuoted", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SingleQuoted(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "SingleQuoted")); if (!yy_SingleQuoteStart(yy)) goto l345; if (!yy_StartList(yy)) goto l345; yyDo(yy, yySet, -2, 0); + { int yypos348= yy->__pos, yythunkpos348= yy->__thunkpos; if (!yy_SingleQuoteEnd(yy)) goto l348; goto l345; + l348:; yy->__pos= yypos348; yy->__thunkpos= yythunkpos348; + } if (!yy_Inline(yy)) goto l345; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_SingleQuoted, yy->__begin, yy->__end); + l346:; + { int yypos347= yy->__pos, yythunkpos347= yy->__thunkpos; + { int yypos349= yy->__pos, yythunkpos349= yy->__thunkpos; if (!yy_SingleQuoteEnd(yy)) goto l349; goto l347; + l349:; yy->__pos= yypos349; yy->__thunkpos= yythunkpos349; + } if (!yy_Inline(yy)) goto l347; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_SingleQuoted, yy->__begin, yy->__end); goto l346; + l347:; yy->__pos= yypos347; yy->__thunkpos= yythunkpos347; + } if (!yy_SingleQuoteEnd(yy)) goto l345; yyDo(yy, yy_2_SingleQuoted, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "SingleQuoted", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l345:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SingleQuoted", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Dash(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Dash")); + { int yypos351= yy->__pos, yythunkpos351= yy->__thunkpos; if (!yy_EmDash(yy)) goto l352; goto l351; + l352:; yy->__pos= yypos351; yy->__thunkpos= yythunkpos351; if (!yy_EnDash(yy)) goto l350; + } + l351:; + yyprintf((stderr, " ok %s @ %s\n", "Dash", yy->__buf+yy->__pos)); + return 1; + l350:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Dash", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ellipsis(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ellipsis")); + { int yypos354= yy->__pos, yythunkpos354= yy->__thunkpos; if (!yymatchString(yy, "...")) goto l355; goto l354; + l355:; yy->__pos= yypos354; yy->__thunkpos= yythunkpos354; if (!yymatchString(yy, ". . .")) goto l353; + } + l354:; yyDo(yy, yy_1_Ellipsis, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Ellipsis", yy->__buf+yy->__pos)); + return 1; + l353:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ellipsis", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Digit(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Digit")); if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l356; + yyprintf((stderr, " ok %s @ %s\n", "Digit", yy->__buf+yy->__pos)); + return 1; + l356:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Digit", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ExtendedSpecialChar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ExtendedSpecialChar")); + { int yypos358= yy->__pos, yythunkpos358= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_SMART) )) goto l359; +#undef yytext +#undef yyleng + } + { int yypos360= yy->__pos, yythunkpos360= yy->__thunkpos; if (!yymatchChar(yy, '.')) goto l361; goto l360; + l361:; yy->__pos= yypos360; yy->__thunkpos= yythunkpos360; if (!yymatchChar(yy, '-')) goto l362; goto l360; + l362:; yy->__pos= yypos360; yy->__thunkpos= yythunkpos360; if (!yymatchChar(yy, '\'')) goto l363; goto l360; + l363:; yy->__pos= yypos360; yy->__thunkpos= yythunkpos360; if (!yymatchChar(yy, '"')) goto l359; + } + l360:; goto l358; + l359:; yy->__pos= yypos358; yy->__thunkpos= yythunkpos358; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l364; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '^')) goto l364; goto l358; + l364:; yy->__pos= yypos358; yy->__thunkpos= yythunkpos358; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_MATH) )) goto l365; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '$')) goto l365; goto l358; + l365:; yy->__pos= yypos358; yy->__thunkpos= yythunkpos358; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_DELETE) )) goto l366; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '~')) goto l366; goto l358; + l366:; yy->__pos= yypos358; yy->__thunkpos= yythunkpos358; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_BLOCK_COMMENT) || extension(yy->state, EXT_INLINE_COMMENT) )) goto l357; +#undef yytext +#undef yyleng + } + { int yypos367= yy->__pos, yythunkpos367= yy->__thunkpos; if (!yymatchString(yy, "")) goto l357; + } + l367:; + } + l358:; + yyprintf((stderr, " ok %s @ %s\n", "ExtendedSpecialChar", yy->__buf+yy->__pos)); + return 1; + l357:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ExtendedSpecialChar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Quoted(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Quoted")); + { int yypos370= yy->__pos, yythunkpos370= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l371; + l372:; + { int yypos373= yy->__pos, yythunkpos373= yy->__thunkpos; + { int yypos374= yy->__pos, yythunkpos374= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l374; goto l373; + l374:; yy->__pos= yypos374; yy->__thunkpos= yythunkpos374; + } if (!yymatchDot(yy)) goto l373; goto l372; + l373:; yy->__pos= yypos373; yy->__thunkpos= yythunkpos373; + } if (!yymatchChar(yy, '"')) goto l371; goto l370; + l371:; yy->__pos= yypos370; yy->__thunkpos= yythunkpos370; if (!yymatchChar(yy, '\'')) goto l369; + l375:; + { int yypos376= yy->__pos, yythunkpos376= yy->__thunkpos; + { int yypos377= yy->__pos, yythunkpos377= yy->__thunkpos; if (!yymatchChar(yy, '\'')) goto l377; goto l376; + l377:; yy->__pos= yypos377; yy->__thunkpos= yythunkpos377; + } if (!yymatchDot(yy)) goto l376; goto l375; + l376:; yy->__pos= yypos376; yy->__thunkpos= yythunkpos376; + } if (!yymatchChar(yy, '\'')) goto l369; + } + l370:; + yyprintf((stderr, " ok %s @ %s\n", "Quoted", yy->__buf+yy->__pos)); + return 1; + l369:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Quoted", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlTag(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlTag")); if (!yymatchChar(yy, '<')) goto l378; if (!yy_Spnl(yy)) goto l378; + { int yypos379= yy->__pos, yythunkpos379= yy->__thunkpos; if (!yymatchChar(yy, '/')) goto l379; goto l380; + l379:; yy->__pos= yypos379; yy->__thunkpos= yythunkpos379; + } + l380:; if (!yy_AlphanumericAscii(yy)) goto l378; + l381:; + { int yypos382= yy->__pos, yythunkpos382= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l382; goto l381; + l382:; yy->__pos= yypos382; yy->__thunkpos= yythunkpos382; + } if (!yy_Spnl(yy)) goto l378; + l383:; + { int yypos384= yy->__pos, yythunkpos384= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l384; goto l383; + l384:; yy->__pos= yypos384; yy->__thunkpos= yythunkpos384; + } + { int yypos385= yy->__pos, yythunkpos385= yy->__thunkpos; if (!yymatchChar(yy, '/')) goto l385; goto l386; + l385:; yy->__pos= yypos385; yy->__thunkpos= yythunkpos385; + } + l386:; if (!yy_Spnl(yy)) goto l378; if (!yymatchChar(yy, '>')) goto l378; + yyprintf((stderr, " ok %s @ %s\n", "HtmlTag", yy->__buf+yy->__pos)); + return 1; + l378:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlTag", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ticks5(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ticks5")); if (!yymatchString(yy, "`````")) goto l387; + { int yypos388= yy->__pos, yythunkpos388= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l388; goto l387; + l388:; yy->__pos= yypos388; yy->__thunkpos= yythunkpos388; + } + yyprintf((stderr, " ok %s @ %s\n", "Ticks5", yy->__buf+yy->__pos)); + return 1; + l387:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ticks5", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ticks4(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ticks4")); if (!yymatchString(yy, "````")) goto l389; + { int yypos390= yy->__pos, yythunkpos390= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l390; goto l389; + l390:; yy->__pos= yypos390; yy->__thunkpos= yythunkpos390; + } + yyprintf((stderr, " ok %s @ %s\n", "Ticks4", yy->__buf+yy->__pos)); + return 1; + l389:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ticks4", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ticks3(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ticks3")); if (!yymatchString(yy, "```")) goto l391; + { int yypos392= yy->__pos, yythunkpos392= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l392; goto l391; + l392:; yy->__pos= yypos392; yy->__thunkpos= yythunkpos392; + } + yyprintf((stderr, " ok %s @ %s\n", "Ticks3", yy->__buf+yy->__pos)); + return 1; + l391:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ticks3", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ticks2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ticks2")); if (!yymatchString(yy, "``")) goto l393; + { int yypos394= yy->__pos, yythunkpos394= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l394; goto l393; + l394:; yy->__pos= yypos394; yy->__thunkpos= yythunkpos394; + } + yyprintf((stderr, " ok %s @ %s\n", "Ticks2", yy->__buf+yy->__pos)); + return 1; + l393:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ticks2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Ticks1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Ticks1")); if (!yymatchChar(yy, '`')) goto l395; + { int yypos396= yy->__pos, yythunkpos396= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l396; goto l395; + l396:; yy->__pos= yypos396; yy->__thunkpos= yythunkpos396; + } + yyprintf((stderr, " ok %s @ %s\n", "Ticks1", yy->__buf+yy->__pos)); + return 1; + l395:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Ticks1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SkipBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SkipBlock")); + { int yypos398= yy->__pos, yythunkpos398= yy->__thunkpos; if (!yy_HtmlBlock(yy)) goto l399; goto l398; + l399:; yy->__pos= yypos398; yy->__thunkpos= yythunkpos398; + { int yypos403= yy->__pos, yythunkpos403= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l403; goto l400; + l403:; yy->__pos= yypos403; yy->__thunkpos= yythunkpos403; + } + { int yypos404= yy->__pos, yythunkpos404= yy->__thunkpos; if (!yy_SetextBottom1(yy)) goto l404; goto l400; + l404:; yy->__pos= yypos404; yy->__thunkpos= yythunkpos404; + } + { int yypos405= yy->__pos, yythunkpos405= yy->__thunkpos; if (!yy_SetextBottom2(yy)) goto l405; goto l400; + l405:; yy->__pos= yypos405; yy->__thunkpos= yythunkpos405; + } + { int yypos406= yy->__pos, yythunkpos406= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l406; goto l400; + l406:; yy->__pos= yypos406; yy->__thunkpos= yythunkpos406; + } if (!yy_RawLine(yy)) goto l400; + l401:; + { int yypos402= yy->__pos, yythunkpos402= yy->__thunkpos; + { int yypos407= yy->__pos, yythunkpos407= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l407; goto l402; + l407:; yy->__pos= yypos407; yy->__thunkpos= yythunkpos407; + } + { int yypos408= yy->__pos, yythunkpos408= yy->__thunkpos; if (!yy_SetextBottom1(yy)) goto l408; goto l402; + l408:; yy->__pos= yypos408; yy->__thunkpos= yythunkpos408; + } + { int yypos409= yy->__pos, yythunkpos409= yy->__thunkpos; if (!yy_SetextBottom2(yy)) goto l409; goto l402; + l409:; yy->__pos= yypos409; yy->__thunkpos= yythunkpos409; + } + { int yypos410= yy->__pos, yythunkpos410= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l410; goto l402; + l410:; yy->__pos= yypos410; yy->__thunkpos= yythunkpos410; + } if (!yy_RawLine(yy)) goto l402; goto l401; + l402:; yy->__pos= yypos402; yy->__thunkpos= yythunkpos402; + } + l411:; + { int yypos412= yy->__pos, yythunkpos412= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l412; goto l411; + l412:; yy->__pos= yypos412; yy->__thunkpos= yythunkpos412; + } goto l398; + l400:; yy->__pos= yypos398; yy->__thunkpos= yythunkpos398; if (!yy_MagicBlankLine(yy)) goto l413; + l414:; + { int yypos415= yy->__pos, yythunkpos415= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l415; goto l414; + l415:; yy->__pos= yypos415; yy->__thunkpos= yythunkpos415; + } goto l398; + l413:; yy->__pos= yypos398; yy->__thunkpos= yythunkpos398; if (!yy_RawLine(yy)) goto l397; + } + l398:; + yyprintf((stderr, " ok %s @ %s\n", "SkipBlock", yy->__buf+yy->__pos)); + return 1; + l397:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SkipBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_References(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "References")); if (!yy_StartList(yy)) goto l416; yyDo(yy, yySet, -2, 0); + l417:; + { int yypos418= yy->__pos, yythunkpos418= yy->__thunkpos; + { int yypos419= yy->__pos, yythunkpos419= yy->__thunkpos; if (!yy_Reference(yy)) goto l420; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_References, yy->__begin, yy->__end); goto l419; + l420:; yy->__pos= yypos419; yy->__thunkpos= yythunkpos419; if (!yy_SkipBlock(yy)) goto l418; + } + l419:; goto l417; + l418:; yy->__pos= yypos418; yy->__thunkpos= yythunkpos418; + } yyDo(yy, yy_2_References, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "References", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l416:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "References", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EmptyTitle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "EmptyTitle")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l421; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "")) goto l421; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l421; +#undef yytext +#undef yyleng + } + yyprintf((stderr, " ok %s @ %s\n", "EmptyTitle", yy->__buf+yy->__pos)); + return 1; + l421:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EmptyTitle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RefTitleParens(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RefTitleParens")); if (!yy_Spnl(yy)) goto l422; if (!yymatchChar(yy, '(')) goto l422; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l422; +#undef yytext +#undef yyleng + } + l423:; + { int yypos424= yy->__pos, yythunkpos424= yy->__thunkpos; + { int yypos425= yy->__pos, yythunkpos425= yy->__thunkpos; + { int yypos426= yy->__pos, yythunkpos426= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l427; if (!yy_Sp(yy)) goto l427; if (!yy_Newline(yy)) goto l427; goto l426; + l427:; yy->__pos= yypos426; yy->__thunkpos= yythunkpos426; if (!yy_Newline(yy)) goto l428; goto l426; + l428:; yy->__pos= yypos426; yy->__thunkpos= yythunkpos426; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l425; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ')')) goto l425; if (!yy_Sp(yy)) goto l425; if (!yy_AlphanumericAscii(yy)) goto l425; + l429:; + { int yypos430= yy->__pos, yythunkpos430= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l430; goto l429; + l430:; yy->__pos= yypos430; yy->__thunkpos= yythunkpos430; + } if (!yymatchChar(yy, '=')) goto l425; + } + l426:; goto l424; + l425:; yy->__pos= yypos425; yy->__thunkpos= yythunkpos425; + } if (!yymatchDot(yy)) goto l424; goto l423; + l424:; yy->__pos= yypos424; yy->__thunkpos= yythunkpos424; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l422; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ')')) goto l422; + yyprintf((stderr, " ok %s @ %s\n", "RefTitleParens", yy->__buf+yy->__pos)); + return 1; + l422:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RefTitleParens", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RefTitleDouble(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RefTitleDouble")); if (!yy_Spnl(yy)) goto l431; if (!yymatchChar(yy, '"')) goto l431; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l431; +#undef yytext +#undef yyleng + } + l432:; + { int yypos433= yy->__pos, yythunkpos433= yy->__thunkpos; + { int yypos434= yy->__pos, yythunkpos434= yy->__thunkpos; + { int yypos435= yy->__pos, yythunkpos435= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l436; if (!yy_Sp(yy)) goto l436; if (!yy_Newline(yy)) goto l436; goto l435; + l436:; yy->__pos= yypos435; yy->__thunkpos= yythunkpos435; if (!yy_Newline(yy)) goto l437; goto l435; + l437:; yy->__pos= yypos435; yy->__thunkpos= yythunkpos435; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l434; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '"')) goto l434; if (!yy_Sp(yy)) goto l434; if (!yy_AlphanumericAscii(yy)) goto l434; + l438:; + { int yypos439= yy->__pos, yythunkpos439= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l439; goto l438; + l439:; yy->__pos= yypos439; yy->__thunkpos= yythunkpos439; + } if (!yymatchChar(yy, '=')) goto l434; + } + l435:; goto l433; + l434:; yy->__pos= yypos434; yy->__thunkpos= yythunkpos434; + } if (!yymatchDot(yy)) goto l433; goto l432; + l433:; yy->__pos= yypos433; yy->__thunkpos= yythunkpos433; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l431; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '"')) goto l431; + yyprintf((stderr, " ok %s @ %s\n", "RefTitleDouble", yy->__buf+yy->__pos)); + return 1; + l431:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RefTitleDouble", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RefTitleSingle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RefTitleSingle")); if (!yy_Spnl(yy)) goto l440; if (!yymatchChar(yy, '\'')) goto l440; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l440; +#undef yytext +#undef yyleng + } + l441:; + { int yypos442= yy->__pos, yythunkpos442= yy->__thunkpos; + { int yypos443= yy->__pos, yythunkpos443= yy->__thunkpos; + { int yypos444= yy->__pos, yythunkpos444= yy->__thunkpos; if (!yymatchChar(yy, '\'')) goto l445; if (!yy_Sp(yy)) goto l445; if (!yy_Newline(yy)) goto l445; goto l444; + l445:; yy->__pos= yypos444; yy->__thunkpos= yythunkpos444; if (!yy_Newline(yy)) goto l446; goto l444; + l446:; yy->__pos= yypos444; yy->__thunkpos= yythunkpos444; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l443; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '\'')) goto l443; if (!yy_Sp(yy)) goto l443; if (!yy_AlphanumericAscii(yy)) goto l443; + l447:; + { int yypos448= yy->__pos, yythunkpos448= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l448; goto l447; + l448:; yy->__pos= yypos448; yy->__thunkpos= yythunkpos448; + } if (!yymatchChar(yy, '=')) goto l443; + } + l444:; goto l442; + l443:; yy->__pos= yypos443; yy->__thunkpos= yythunkpos443; + } if (!yymatchDot(yy)) goto l442; goto l441; + l442:; yy->__pos= yypos442; yy->__thunkpos= yythunkpos442; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l440; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '\'')) goto l440; + yyprintf((stderr, " ok %s @ %s\n", "RefTitleSingle", yy->__buf+yy->__pos)); + return 1; + l440:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RefTitleSingle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_UnQuotedValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "UnQuotedValue")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l449; +#undef yytext +#undef yyleng + } + { int yypos452= yy->__pos, yythunkpos452= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l453; goto l452; + l453:; yy->__pos= yypos452; yy->__thunkpos= yythunkpos452; if (!yymatchChar(yy, '.')) goto l454; goto l452; + l454:; yy->__pos= yypos452; yy->__thunkpos= yythunkpos452; if (!yymatchChar(yy, '%')) goto l449; + } + l452:; + l450:; + { int yypos451= yy->__pos, yythunkpos451= yy->__thunkpos; + { int yypos455= yy->__pos, yythunkpos455= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l456; goto l455; + l456:; yy->__pos= yypos455; yy->__thunkpos= yythunkpos455; if (!yymatchChar(yy, '.')) goto l457; goto l455; + l457:; yy->__pos= yypos455; yy->__thunkpos= yythunkpos455; if (!yymatchChar(yy, '%')) goto l451; + } + l455:; goto l450; + l451:; yy->__pos= yypos451; yy->__thunkpos= yythunkpos451; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l449; +#undef yytext +#undef yyleng + } + yyprintf((stderr, " ok %s @ %s\n", "UnQuotedValue", yy->__buf+yy->__pos)); + return 1; + l449:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "UnQuotedValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_QuotedValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "QuotedValue")); if (!yymatchChar(yy, '"')) goto l458; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l458; +#undef yytext +#undef yyleng + } + l459:; + { int yypos460= yy->__pos, yythunkpos460= yy->__thunkpos; + { int yypos461= yy->__pos, yythunkpos461= yy->__thunkpos; if (!yymatchString(yy, "\\\"")) goto l462; goto l461; + l462:; yy->__pos= yypos461; yy->__thunkpos= yythunkpos461; + { int yypos463= yy->__pos, yythunkpos463= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l463; goto l460; + l463:; yy->__pos= yypos463; yy->__thunkpos= yythunkpos463; + } if (!yymatchDot(yy)) goto l460; + } + l461:; goto l459; + l460:; yy->__pos= yypos460; yy->__thunkpos= yythunkpos460; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l458; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '"')) goto l458; + yyprintf((stderr, " ok %s @ %s\n", "QuotedValue", yy->__buf+yy->__pos)); + return 1; + l458:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "QuotedValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AttrValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AttrValue")); + { int yypos465= yy->__pos, yythunkpos465= yy->__thunkpos; if (!yy_QuotedValue(yy)) goto l466; goto l465; + l466:; yy->__pos= yypos465; yy->__thunkpos= yythunkpos465; if (!yy_UnQuotedValue(yy)) goto l464; + } + l465:; yyDo(yy, yy_1_AttrValue, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AttrValue", yy->__buf+yy->__pos)); + return 1; + l464:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AttrValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AttrKey(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AttrKey")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l467; +#undef yytext +#undef yyleng + } if (!yy_AlphanumericAscii(yy)) goto l467; + l468:; + { int yypos469= yy->__pos, yythunkpos469= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l469; goto l468; + l469:; yy->__pos= yypos469; yy->__thunkpos= yythunkpos469; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l467; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_AttrKey, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AttrKey", yy->__buf+yy->__pos)); + return 1; + l467:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AttrKey", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Attribute(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Attribute")); if (!yy_Spnl(yy)) goto l470; if (!yy_AttrKey(yy)) goto l470; yyDo(yy, yySet, -2, 0); if (!yymatchChar(yy, '=')) goto l470; if (!yy_AttrValue(yy)) goto l470; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Attribute, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Attribute", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l470:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Attribute", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RefTitle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RefTitle")); + { int yypos472= yy->__pos, yythunkpos472= yy->__thunkpos; if (!yy_RefTitleSingle(yy)) goto l473; goto l472; + l473:; yy->__pos= yypos472; yy->__thunkpos= yythunkpos472; if (!yy_RefTitleDouble(yy)) goto l474; goto l472; + l474:; yy->__pos= yypos472; yy->__thunkpos= yythunkpos472; if (!yy_RefTitleParens(yy)) goto l475; goto l472; + l475:; yy->__pos= yypos472; yy->__thunkpos= yythunkpos472; if (!yy_EmptyTitle(yy)) goto l471; + } + l472:; yyDo(yy, yy_1_RefTitle, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RefTitle", yy->__buf+yy->__pos)); + return 1; + l471:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RefTitle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RefSrc(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RefSrc")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l476; +#undef yytext +#undef yyleng + } if (!yy_Nonspacechar(yy)) goto l476; + l477:; + { int yypos478= yy->__pos, yythunkpos478= yy->__thunkpos; if (!yy_Nonspacechar(yy)) goto l478; goto l477; + l478:; yy->__pos= yypos478; yy->__thunkpos= yythunkpos478; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l476; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_RefSrc, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RefSrc", yy->__buf+yy->__pos)); + return 1; + l476:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RefSrc", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AutoLinkEmail(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AutoLinkEmail")); if (!yymatchChar(yy, '<')) goto l479; + { int yypos480= yy->__pos, yythunkpos480= yy->__thunkpos; if (!yymatchString(yy, "mailto:")) goto l480; goto l481; + l480:; yy->__pos= yypos480; yy->__thunkpos= yythunkpos480; + } + l481:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l479; +#undef yytext +#undef yyleng + } if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\062\350\377\003\376\377\377\207\376\377\377\107\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l479; + l482:; + { int yypos483= yy->__pos, yythunkpos483= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\062\350\377\003\376\377\377\207\376\377\377\107\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l483; goto l482; + l483:; yy->__pos= yypos483; yy->__thunkpos= yythunkpos483; + } if (!yymatchChar(yy, '@')) goto l479; + { int yypos486= yy->__pos, yythunkpos486= yy->__thunkpos; if (!yy_Newline(yy)) goto l486; goto l479; + l486:; yy->__pos= yypos486; yy->__thunkpos= yythunkpos486; + } + { int yypos487= yy->__pos, yythunkpos487= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l487; goto l479; + l487:; yy->__pos= yypos487; yy->__thunkpos= yythunkpos487; + } if (!yymatchDot(yy)) goto l479; + l484:; + { int yypos485= yy->__pos, yythunkpos485= yy->__thunkpos; + { int yypos488= yy->__pos, yythunkpos488= yy->__thunkpos; if (!yy_Newline(yy)) goto l488; goto l485; + l488:; yy->__pos= yypos488; yy->__thunkpos= yythunkpos488; + } + { int yypos489= yy->__pos, yythunkpos489= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l489; goto l485; + l489:; yy->__pos= yypos489; yy->__thunkpos= yythunkpos489; + } if (!yymatchDot(yy)) goto l485; goto l484; + l485:; yy->__pos= yypos485; yy->__thunkpos= yythunkpos485; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l479; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '>')) goto l479; yyDo(yy, yy_1_AutoLinkEmail, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AutoLinkEmail", yy->__buf+yy->__pos)); + return 1; + l479:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AutoLinkEmail", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AutoLinkUrl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AutoLinkUrl")); if (!yymatchChar(yy, '<')) goto l490; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l490; +#undef yytext +#undef yyleng + } if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l490; + l491:; + { int yypos492= yy->__pos, yythunkpos492= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l492; goto l491; + l492:; yy->__pos= yypos492; yy->__thunkpos= yythunkpos492; + } if (!yymatchString(yy, "://")) goto l490; + { int yypos495= yy->__pos, yythunkpos495= yy->__thunkpos; if (!yy_Newline(yy)) goto l495; goto l490; + l495:; yy->__pos= yypos495; yy->__thunkpos= yythunkpos495; + } + { int yypos496= yy->__pos, yythunkpos496= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l496; goto l490; + l496:; yy->__pos= yypos496; yy->__thunkpos= yythunkpos496; + } if (!yymatchDot(yy)) goto l490; + l493:; + { int yypos494= yy->__pos, yythunkpos494= yy->__thunkpos; + { int yypos497= yy->__pos, yythunkpos497= yy->__thunkpos; if (!yy_Newline(yy)) goto l497; goto l494; + l497:; yy->__pos= yypos497; yy->__thunkpos= yythunkpos497; + } + { int yypos498= yy->__pos, yythunkpos498= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l498; goto l494; + l498:; yy->__pos= yypos498; yy->__thunkpos= yythunkpos498; + } if (!yymatchDot(yy)) goto l494; goto l493; + l494:; yy->__pos= yypos494; yy->__thunkpos= yythunkpos494; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l490; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '>')) goto l490; yyDo(yy, yy_1_AutoLinkUrl, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AutoLinkUrl", yy->__buf+yy->__pos)); + return 1; + l490:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AutoLinkUrl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TitleDouble(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TitleDouble")); if (!yymatchChar(yy, '"')) goto l499; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l499; +#undef yytext +#undef yyleng + } + l500:; + { int yypos501= yy->__pos, yythunkpos501= yy->__thunkpos; + { int yypos502= yy->__pos, yythunkpos502= yy->__thunkpos; if (!yymatchChar(yy, '"')) goto l502; if (!yy_Sp(yy)) goto l502; + { int yypos503= yy->__pos, yythunkpos503= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l504; goto l503; + l504:; yy->__pos= yypos503; yy->__thunkpos= yythunkpos503; if (!yy_Newline(yy)) goto l505; goto l503; + l505:; yy->__pos= yypos503; yy->__thunkpos= yythunkpos503; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l502; +#undef yytext +#undef yyleng + } if (!yy_AlphanumericAscii(yy)) goto l502; + l506:; + { int yypos507= yy->__pos, yythunkpos507= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l507; goto l506; + l507:; yy->__pos= yypos507; yy->__thunkpos= yythunkpos507; + } if (!yymatchChar(yy, '=')) goto l502; + } + l503:; goto l501; + l502:; yy->__pos= yypos502; yy->__thunkpos= yythunkpos502; + } if (!yymatchDot(yy)) goto l501; goto l500; + l501:; yy->__pos= yypos501; yy->__thunkpos= yythunkpos501; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l499; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '"')) goto l499; + yyprintf((stderr, " ok %s @ %s\n", "TitleDouble", yy->__buf+yy->__pos)); + return 1; + l499:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TitleDouble", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TitleSingle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TitleSingle")); if (!yymatchChar(yy, '\'')) goto l508; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l508; +#undef yytext +#undef yyleng + } + l509:; + { int yypos510= yy->__pos, yythunkpos510= yy->__thunkpos; + { int yypos511= yy->__pos, yythunkpos511= yy->__thunkpos; if (!yymatchChar(yy, '\'')) goto l511; if (!yy_Sp(yy)) goto l511; + { int yypos512= yy->__pos, yythunkpos512= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l513; goto l512; + l513:; yy->__pos= yypos512; yy->__thunkpos= yythunkpos512; if (!yy_Newline(yy)) goto l514; goto l512; + l514:; yy->__pos= yypos512; yy->__thunkpos= yythunkpos512; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l511; +#undef yytext +#undef yyleng + } if (!yy_AlphanumericAscii(yy)) goto l511; + l515:; + { int yypos516= yy->__pos, yythunkpos516= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l516; goto l515; + l516:; yy->__pos= yypos516; yy->__thunkpos= yythunkpos516; + } if (!yymatchChar(yy, '=')) goto l511; + } + l512:; goto l510; + l511:; yy->__pos= yypos511; yy->__thunkpos= yythunkpos511; + } if (!yymatchDot(yy)) goto l510; goto l509; + l510:; yy->__pos= yypos510; yy->__thunkpos= yythunkpos510; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l508; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '\'')) goto l508; + yyprintf((stderr, " ok %s @ %s\n", "TitleSingle", yy->__buf+yy->__pos)); + return 1; + l508:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TitleSingle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Nonspacechar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Nonspacechar")); + { int yypos518= yy->__pos, yythunkpos518= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l518; goto l517; + l518:; yy->__pos= yypos518; yy->__thunkpos= yythunkpos518; + } + { int yypos519= yy->__pos, yythunkpos519= yy->__thunkpos; if (!yy_Newline(yy)) goto l519; goto l517; + l519:; yy->__pos= yypos519; yy->__thunkpos= yythunkpos519; + } if (!yymatchDot(yy)) goto l517; + yyprintf((stderr, " ok %s @ %s\n", "Nonspacechar", yy->__buf+yy->__pos)); + return 1; + l517:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Nonspacechar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SourceContents(yycontext *yy) +{ + yyprintf((stderr, "%s\n", "SourceContents")); + l521:; + { int yypos522= yy->__pos, yythunkpos522= yy->__thunkpos; + { int yypos523= yy->__pos, yythunkpos523= yy->__thunkpos; + { int yypos527= yy->__pos, yythunkpos527= yy->__thunkpos; if (!yymatchChar(yy, '(')) goto l527; goto l524; + l527:; yy->__pos= yypos527; yy->__thunkpos= yythunkpos527; + } + { int yypos528= yy->__pos, yythunkpos528= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l528; goto l524; + l528:; yy->__pos= yypos528; yy->__thunkpos= yythunkpos528; + } + { int yypos529= yy->__pos, yythunkpos529= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l529; goto l524; + l529:; yy->__pos= yypos529; yy->__thunkpos= yythunkpos529; + } if (!yy_Nonspacechar(yy)) goto l524; + l525:; + { int yypos526= yy->__pos, yythunkpos526= yy->__thunkpos; + { int yypos530= yy->__pos, yythunkpos530= yy->__thunkpos; if (!yymatchChar(yy, '(')) goto l530; goto l526; + l530:; yy->__pos= yypos530; yy->__thunkpos= yythunkpos530; + } + { int yypos531= yy->__pos, yythunkpos531= yy->__thunkpos; if (!yymatchChar(yy, ')')) goto l531; goto l526; + l531:; yy->__pos= yypos531; yy->__thunkpos= yythunkpos531; + } + { int yypos532= yy->__pos, yythunkpos532= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l532; goto l526; + l532:; yy->__pos= yypos532; yy->__thunkpos= yythunkpos532; + } if (!yy_Nonspacechar(yy)) goto l526; goto l525; + l526:; yy->__pos= yypos526; yy->__thunkpos= yythunkpos526; + } goto l523; + l524:; yy->__pos= yypos523; yy->__thunkpos= yythunkpos523; if (!yymatchChar(yy, '(')) goto l522; if (!yy_SourceContents(yy)) goto l522; if (!yymatchChar(yy, ')')) goto l522; + } + l523:; goto l521; + l522:; yy->__pos= yypos522; yy->__thunkpos= yythunkpos522; + } + yyprintf((stderr, " ok %s @ %s\n", "SourceContents", yy->__buf+yy->__pos)); + return 1; +} +YY_RULE(int) yy_Attributes(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Attributes")); if (!yy_StartList(yy)) goto l533; yyDo(yy, yySet, -1, 0); if (!yy_Attribute(yy)) goto l533; yyDo(yy, yy_1_Attributes, yy->__begin, yy->__end); + l534:; + { int yypos535= yy->__pos, yythunkpos535= yy->__thunkpos; if (!yy_Attribute(yy)) goto l535; yyDo(yy, yy_1_Attributes, yy->__begin, yy->__end); goto l534; + l535:; yy->__pos= yypos535; yy->__thunkpos= yythunkpos535; + } yyDo(yy, yy_2_Attributes, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Attributes", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l533:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Attributes", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Title(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Title")); + { int yypos537= yy->__pos, yythunkpos537= yy->__thunkpos; if (!yy_TitleSingle(yy)) goto l538; goto l537; + l538:; yy->__pos= yypos537; yy->__thunkpos= yythunkpos537; if (!yy_TitleDouble(yy)) goto l539; goto l537; + l539:; yy->__pos= yypos537; yy->__thunkpos= yythunkpos537; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l536; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "")) goto l536; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l536; +#undef yytext +#undef yyleng + } + } + l537:; yyDo(yy, yy_1_Title, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Title", yy->__buf+yy->__pos)); + return 1; + l536:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Title", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Source(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Source")); + { int yypos541= yy->__pos, yythunkpos541= yy->__thunkpos; if (!yymatchChar(yy, '<')) goto l542; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l542; +#undef yytext +#undef yyleng + } if (!yy_SourceContents(yy)) goto l542; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l542; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '>')) goto l542; goto l541; + l542:; yy->__pos= yypos541; yy->__thunkpos= yythunkpos541; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l540; +#undef yytext +#undef yyleng + } if (!yy_SourceContents(yy)) goto l540; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l540; +#undef yytext +#undef yyleng + } + } + l541:; yyDo(yy, yy_1_Source, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Source", yy->__buf+yy->__pos)); + return 1; + l540:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Source", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Label(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Label")); if (!yymatchChar(yy, '[')) goto l543; + { int yypos544= yy->__pos, yythunkpos544= yy->__thunkpos; if (!yymatchChar(yy, '[')) goto l544; goto l543; + l544:; yy->__pos= yypos544; yy->__thunkpos= yythunkpos544; + } + { int yypos545= yy->__pos, yythunkpos545= yy->__thunkpos; + { int yypos547= yy->__pos, yythunkpos547= yy->__thunkpos; if (!yymatchChar(yy, '^')) goto l547; goto l546; + l547:; yy->__pos= yypos547; yy->__thunkpos= yythunkpos547; + } + { int yypos548= yy->__pos, yythunkpos548= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l548; goto l546; + l548:; yy->__pos= yypos548; yy->__thunkpos= yythunkpos548; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l546; +#undef yytext +#undef yyleng + } goto l545; + l546:; yy->__pos= yypos545; yy->__thunkpos= yythunkpos545; + { int yypos549= yy->__pos, yythunkpos549= yy->__thunkpos; if (!yymatchDot(yy)) goto l543; yy->__pos= yypos549; yy->__thunkpos= yythunkpos549; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_NOTES) )) goto l543; +#undef yytext +#undef yyleng + } + } + l545:; if (!yy_StartList(yy)) goto l543; yyDo(yy, yySet, -1, 0); + l550:; + { int yypos551= yy->__pos, yythunkpos551= yy->__thunkpos; + { int yypos552= yy->__pos, yythunkpos552= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l552; goto l551; + l552:; yy->__pos= yypos552; yy->__thunkpos= yythunkpos552; + } if (!yy_Inline(yy)) goto l551; yyDo(yy, yy_1_Label, yy->__begin, yy->__end); goto l550; + l551:; yy->__pos= yypos551; yy->__thunkpos= yythunkpos551; + } if (!yymatchChar(yy, ']')) goto l543; yyDo(yy, yy_2_Label, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Label", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l543:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Label", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ReferenceLinkSingle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "ReferenceLinkSingle")); if (!yy_Label(yy)) goto l553; yyDo(yy, yySet, -1, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l553; +#undef yytext +#undef yyleng + } + { int yypos554= yy->__pos, yythunkpos554= yy->__thunkpos; if (!yy_Spnl(yy)) goto l554; if (!yymatchString(yy, "[]")) goto l554; goto l555; + l554:; yy->__pos= yypos554; yy->__thunkpos= yythunkpos554; + } + l555:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l553; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_ReferenceLinkSingle, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ReferenceLinkSingle", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l553:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ReferenceLinkSingle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ReferenceLinkDouble(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 3, 0); + yyprintf((stderr, "%s\n", "ReferenceLinkDouble")); if (!yy_Label(yy)) goto l556; yyDo(yy, yySet, -3, 0); if (!yy_OptionalSpace(yy)) goto l556; yyDo(yy, yySet, -2, 0); + { int yypos557= yy->__pos, yythunkpos557= yy->__thunkpos; if (!yymatchString(yy, "[]")) goto l557; goto l556; + l557:; yy->__pos= yypos557; yy->__thunkpos= yythunkpos557; + } if (!yy_Label(yy)) goto l556; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_ReferenceLinkDouble, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ReferenceLinkDouble", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 3, 0); + return 1; + l556:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ReferenceLinkDouble", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AutoLink(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AutoLink")); + { int yypos559= yy->__pos, yythunkpos559= yy->__thunkpos; if (!yy_AutoLinkUrl(yy)) goto l560; goto l559; + l560:; yy->__pos= yypos559; yy->__thunkpos= yythunkpos559; if (!yy_AutoLinkEmail(yy)) goto l558; + } + l559:; + yyprintf((stderr, " ok %s @ %s\n", "AutoLink", yy->__buf+yy->__pos)); + return 1; + l558:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AutoLink", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ReferenceLink(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ReferenceLink")); + { int yypos562= yy->__pos, yythunkpos562= yy->__thunkpos; if (!yy_ReferenceLinkDouble(yy)) goto l563; goto l562; + l563:; yy->__pos= yypos562; yy->__thunkpos= yythunkpos562; if (!yy_ReferenceLinkSingle(yy)) goto l561; + } + l562:; + yyprintf((stderr, " ok %s @ %s\n", "ReferenceLink", yy->__buf+yy->__pos)); + return 1; + l561:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ReferenceLink", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ExplicitLink(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 4, 0); + yyprintf((stderr, "%s\n", "ExplicitLink")); if (!yy_StartList(yy)) goto l564; yyDo(yy, yySet, -4, 0); if (!yy_Label(yy)) goto l564; yyDo(yy, yySet, -3, 0); if (!yymatchChar(yy, '(')) goto l564; if (!yy_Sp(yy)) goto l564; if (!yy_Source(yy)) goto l564; yyDo(yy, yySet, -2, 0); if (!yy_Spnl(yy)) goto l564; if (!yy_Title(yy)) goto l564; yyDo(yy, yySet, -1, 0); + { int yypos565= yy->__pos, yythunkpos565= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l565; +#undef yytext +#undef yyleng + } + { int yypos567= yy->__pos, yythunkpos567= yy->__thunkpos; if (!yy_Attributes(yy)) goto l567; yyDo(yy, yy_1_ExplicitLink, yy->__begin, yy->__end); goto l568; + l567:; yy->__pos= yypos567; yy->__thunkpos= yythunkpos567; + } + l568:; goto l566; + l565:; yy->__pos= yypos565; yy->__thunkpos= yythunkpos565; + } + l566:; if (!yy_Sp(yy)) goto l564; if (!yymatchChar(yy, ')')) goto l564; yyDo(yy, yy_2_ExplicitLink, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ExplicitLink", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 4, 0); + return 1; + l564:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ExplicitLink", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StrongUl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "StrongUl")); if (!yymatchString(yy, "__")) goto l569; + { int yypos570= yy->__pos, yythunkpos570= yy->__thunkpos; if (!yy_Whitespace(yy)) goto l570; goto l569; + l570:; yy->__pos= yypos570; yy->__thunkpos= yythunkpos570; + } if (!yy_StartList(yy)) goto l569; yyDo(yy, yySet, -2, 0); + { int yypos573= yy->__pos, yythunkpos573= yy->__thunkpos; if (!yymatchString(yy, "__")) goto l573; goto l569; + l573:; yy->__pos= yypos573; yy->__thunkpos= yythunkpos573; + } if (!yy_Inline(yy)) goto l569; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_StrongUl, yy->__begin, yy->__end); + l571:; + { int yypos572= yy->__pos, yythunkpos572= yy->__thunkpos; + { int yypos574= yy->__pos, yythunkpos574= yy->__thunkpos; if (!yymatchString(yy, "__")) goto l574; goto l572; + l574:; yy->__pos= yypos574; yy->__thunkpos= yythunkpos574; + } if (!yy_Inline(yy)) goto l572; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_StrongUl, yy->__begin, yy->__end); goto l571; + l572:; yy->__pos= yypos572; yy->__thunkpos= yythunkpos572; + } if (!yymatchString(yy, "__")) goto l569; yyDo(yy, yy_2_StrongUl, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "StrongUl", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l569:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StrongUl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StrongStar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "StrongStar")); if (!yymatchString(yy, "**")) goto l575; + { int yypos576= yy->__pos, yythunkpos576= yy->__thunkpos; if (!yy_Whitespace(yy)) goto l576; goto l575; + l576:; yy->__pos= yypos576; yy->__thunkpos= yythunkpos576; + } if (!yy_StartList(yy)) goto l575; yyDo(yy, yySet, -2, 0); + { int yypos579= yy->__pos, yythunkpos579= yy->__thunkpos; if (!yymatchString(yy, "**")) goto l579; goto l575; + l579:; yy->__pos= yypos579; yy->__thunkpos= yythunkpos579; + } if (!yy_Inline(yy)) goto l575; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_StrongStar, yy->__begin, yy->__end); + l577:; + { int yypos578= yy->__pos, yythunkpos578= yy->__thunkpos; + { int yypos580= yy->__pos, yythunkpos580= yy->__thunkpos; if (!yymatchString(yy, "**")) goto l580; goto l578; + l580:; yy->__pos= yypos580; yy->__thunkpos= yythunkpos580; + } if (!yy_Inline(yy)) goto l578; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_StrongStar, yy->__begin, yy->__end); goto l577; + l578:; yy->__pos= yypos578; yy->__thunkpos= yythunkpos578; + } if (!yymatchString(yy, "**")) goto l575; yyDo(yy, yy_2_StrongStar, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "StrongStar", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l575:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StrongStar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Whitespace(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Whitespace")); + { int yypos582= yy->__pos, yythunkpos582= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l583; goto l582; + l583:; yy->__pos= yypos582; yy->__thunkpos= yythunkpos582; if (!yy_Newline(yy)) goto l581; + } + l582:; + yyprintf((stderr, " ok %s @ %s\n", "Whitespace", yy->__buf+yy->__pos)); + return 1; + l581:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Whitespace", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EmphUl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "EmphUl")); if (!yymatchChar(yy, '_')) goto l584; + { int yypos585= yy->__pos, yythunkpos585= yy->__thunkpos; if (!yy_Whitespace(yy)) goto l585; goto l584; + l585:; yy->__pos= yypos585; yy->__thunkpos= yythunkpos585; + } if (!yy_StartList(yy)) goto l584; yyDo(yy, yySet, -2, 0); + { int yypos588= yy->__pos, yythunkpos588= yy->__thunkpos; + { int yypos590= yy->__pos, yythunkpos590= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l590; goto l589; + l590:; yy->__pos= yypos590; yy->__thunkpos= yythunkpos590; + } if (!yy_Inline(yy)) goto l589; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_EmphUl, yy->__begin, yy->__end); goto l588; + l589:; yy->__pos= yypos588; yy->__thunkpos= yythunkpos588; if (!yy_StrongUl(yy)) goto l584; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_EmphUl, yy->__begin, yy->__end); + } + l588:; + l586:; + { int yypos587= yy->__pos, yythunkpos587= yy->__thunkpos; + { int yypos591= yy->__pos, yythunkpos591= yy->__thunkpos; + { int yypos593= yy->__pos, yythunkpos593= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l593; goto l592; + l593:; yy->__pos= yypos593; yy->__thunkpos= yythunkpos593; + } if (!yy_Inline(yy)) goto l592; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_EmphUl, yy->__begin, yy->__end); goto l591; + l592:; yy->__pos= yypos591; yy->__thunkpos= yythunkpos591; if (!yy_StrongUl(yy)) goto l587; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_EmphUl, yy->__begin, yy->__end); + } + l591:; goto l586; + l587:; yy->__pos= yypos587; yy->__thunkpos= yythunkpos587; + } if (!yymatchChar(yy, '_')) goto l584; yyDo(yy, yy_3_EmphUl, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EmphUl", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l584:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EmphUl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EmphStar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "EmphStar")); if (!yymatchChar(yy, '*')) goto l594; + { int yypos595= yy->__pos, yythunkpos595= yy->__thunkpos; if (!yy_Whitespace(yy)) goto l595; goto l594; + l595:; yy->__pos= yypos595; yy->__thunkpos= yythunkpos595; + } if (!yy_StartList(yy)) goto l594; yyDo(yy, yySet, -2, 0); + { int yypos598= yy->__pos, yythunkpos598= yy->__thunkpos; + { int yypos600= yy->__pos, yythunkpos600= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l600; goto l599; + l600:; yy->__pos= yypos600; yy->__thunkpos= yythunkpos600; + } if (!yy_Inline(yy)) goto l599; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_EmphStar, yy->__begin, yy->__end); goto l598; + l599:; yy->__pos= yypos598; yy->__thunkpos= yythunkpos598; if (!yy_StrongStar(yy)) goto l594; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_EmphStar, yy->__begin, yy->__end); + } + l598:; + l596:; + { int yypos597= yy->__pos, yythunkpos597= yy->__thunkpos; + { int yypos601= yy->__pos, yythunkpos601= yy->__thunkpos; + { int yypos603= yy->__pos, yythunkpos603= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l603; goto l602; + l603:; yy->__pos= yypos603; yy->__thunkpos= yythunkpos603; + } if (!yy_Inline(yy)) goto l602; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_EmphStar, yy->__begin, yy->__end); goto l601; + l602:; yy->__pos= yypos601; yy->__thunkpos= yythunkpos601; if (!yy_StrongStar(yy)) goto l597; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_EmphStar, yy->__begin, yy->__end); + } + l601:; goto l596; + l597:; yy->__pos= yypos597; yy->__thunkpos= yythunkpos597; + } if (!yymatchChar(yy, '*')) goto l594; yyDo(yy, yy_3_EmphStar, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EmphStar", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l594:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EmphStar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StarLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StarLine")); + { int yypos605= yy->__pos, yythunkpos605= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l606; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "****")) goto l606; + l607:; + { int yypos608= yy->__pos, yythunkpos608= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l608; goto l607; + l608:; yy->__pos= yypos608; yy->__thunkpos= yythunkpos608; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l606; +#undef yytext +#undef yyleng + } goto l605; + l606:; yy->__pos= yypos605; yy->__thunkpos= yythunkpos605; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l604; +#undef yytext +#undef yyleng + } if (!yy_Spacechar(yy)) goto l604; if (!yymatchChar(yy, '*')) goto l604; + l609:; + { int yypos610= yy->__pos, yythunkpos610= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l610; goto l609; + l610:; yy->__pos= yypos610; yy->__thunkpos= yythunkpos610; + } + { int yypos611= yy->__pos, yythunkpos611= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l604; yy->__pos= yypos611; yy->__thunkpos= yythunkpos611; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l604; +#undef yytext +#undef yyleng + } + } + l605:; + yyprintf((stderr, " ok %s @ %s\n", "StarLine", yy->__buf+yy->__pos)); + return 1; + l604:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StarLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_UlLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "UlLine")); + { int yypos613= yy->__pos, yythunkpos613= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l614; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "____")) goto l614; + l615:; + { int yypos616= yy->__pos, yythunkpos616= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l616; goto l615; + l616:; yy->__pos= yypos616; yy->__thunkpos= yythunkpos616; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l614; +#undef yytext +#undef yyleng + } goto l613; + l614:; yy->__pos= yypos613; yy->__thunkpos= yythunkpos613; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l612; +#undef yytext +#undef yyleng + } if (!yy_Spacechar(yy)) goto l612; if (!yymatchChar(yy, '_')) goto l612; + l617:; + { int yypos618= yy->__pos, yythunkpos618= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l618; goto l617; + l618:; yy->__pos= yypos618; yy->__thunkpos= yythunkpos618; + } + { int yypos619= yy->__pos, yythunkpos619= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l612; yy->__pos= yypos619; yy->__thunkpos= yythunkpos619; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l612; +#undef yytext +#undef yyleng + } + } + l613:; + yyprintf((stderr, " ok %s @ %s\n", "UlLine", yy->__buf+yy->__pos)); + return 1; + l612:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "UlLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SpecialChar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SpecialChar")); + { int yypos621= yy->__pos, yythunkpos621= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l622; goto l621; + l622:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '_')) goto l623; goto l621; + l623:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '`')) goto l624; goto l621; + l624:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '&')) goto l625; goto l621; + l625:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '[')) goto l626; goto l621; + l626:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, ']')) goto l627; goto l621; + l627:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '(')) goto l628; goto l621; + l628:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, ')')) goto l629; goto l621; + l629:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '<')) goto l630; goto l621; + l630:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '!')) goto l631; goto l621; + l631:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '#')) goto l632; goto l621; + l632:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '\\')) goto l633; goto l621; + l633:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '\'')) goto l634; goto l621; + l634:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yymatchChar(yy, '"')) goto l635; goto l621; + l635:; yy->__pos= yypos621; yy->__thunkpos= yythunkpos621; if (!yy_ExtendedSpecialChar(yy)) goto l620; + } + l621:; + yyprintf((stderr, " ok %s @ %s\n", "SpecialChar", yy->__buf+yy->__pos)); + return 1; + l620:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SpecialChar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NormalEndline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NormalEndline")); if (!yy_Sp(yy)) goto l636; if (!yy_Newline(yy)) goto l636; + { int yypos637= yy->__pos, yythunkpos637= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l637; goto l636; + l637:; yy->__pos= yypos637; yy->__thunkpos= yythunkpos637; + } + { int yypos638= yy->__pos, yythunkpos638= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l638; goto l636; + l638:; yy->__pos= yypos638; yy->__thunkpos= yythunkpos638; + } + { int yypos639= yy->__pos, yythunkpos639= yy->__thunkpos; if (!yy_AtxStart(yy)) goto l639; goto l636; + l639:; yy->__pos= yypos639; yy->__thunkpos= yythunkpos639; + } + { int yypos640= yy->__pos, yythunkpos640= yy->__thunkpos; if (!yy_Line(yy)) goto l640; + { int yypos641= yy->__pos, yythunkpos641= yy->__thunkpos; if (!yymatchChar(yy, '=')) goto l642; + l643:; + { int yypos644= yy->__pos, yythunkpos644= yy->__thunkpos; if (!yymatchChar(yy, '=')) goto l644; goto l643; + l644:; yy->__pos= yypos644; yy->__thunkpos= yythunkpos644; + } goto l641; + l642:; yy->__pos= yypos641; yy->__thunkpos= yythunkpos641; if (!yymatchChar(yy, '-')) goto l640; + l645:; + { int yypos646= yy->__pos, yythunkpos646= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l646; goto l645; + l646:; yy->__pos= yypos646; yy->__thunkpos= yythunkpos646; + } + } + l641:; if (!yy_Newline(yy)) goto l640; goto l636; + l640:; yy->__pos= yypos640; yy->__thunkpos= yythunkpos640; + } yyDo(yy, yy_1_NormalEndline, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "NormalEndline", yy->__buf+yy->__pos)); + return 1; + l636:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NormalEndline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_TerminalEndline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "TerminalEndline")); if (!yy_Sp(yy)) goto l647; if (!yy_Newline(yy)) goto l647; if (!yy_Eof(yy)) goto l647; yyDo(yy, yy_1_TerminalEndline, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "TerminalEndline", yy->__buf+yy->__pos)); + return 1; + l647:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "TerminalEndline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CharEntity(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CharEntity")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l648; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '&')) goto l648; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l648; + l649:; + { int yypos650= yy->__pos, yythunkpos650= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l650; goto l649; + l650:; yy->__pos= yypos650; yy->__thunkpos= yythunkpos650; + } if (!yymatchChar(yy, ';')) goto l648; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l648; +#undef yytext +#undef yyleng + } + yyprintf((stderr, " ok %s @ %s\n", "CharEntity", yy->__buf+yy->__pos)); + return 1; + l648:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CharEntity", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DecEntity(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "DecEntity")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l651; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '&')) goto l651; if (!yymatchChar(yy, '#')) goto l651; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l651; + l652:; + { int yypos653= yy->__pos, yythunkpos653= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l653; goto l652; + l653:; yy->__pos= yypos653; yy->__thunkpos= yythunkpos653; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l651; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ';')) goto l651; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l651; +#undef yytext +#undef yyleng + } + yyprintf((stderr, " ok %s @ %s\n", "DecEntity", yy->__buf+yy->__pos)); + return 1; + l651:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DecEntity", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HexEntity(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HexEntity")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l654; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '&')) goto l654; if (!yymatchChar(yy, '#')) goto l654; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l654; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\176\000\000\000\176\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l654; + l655:; + { int yypos656= yy->__pos, yythunkpos656= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\176\000\000\000\176\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l656; goto l655; + l656:; yy->__pos= yypos656; yy->__thunkpos= yythunkpos656; + } if (!yymatchChar(yy, ';')) goto l654; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l654; +#undef yytext +#undef yyleng + } + yyprintf((stderr, " ok %s @ %s\n", "HexEntity", yy->__buf+yy->__pos)); + return 1; + l654:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HexEntity", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AposChunk(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AposChunk")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_SMART) )) goto l657; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '\'')) goto l657; + { int yypos658= yy->__pos, yythunkpos658= yy->__thunkpos; if (!yy_Alphanumeric(yy)) goto l657; yy->__pos= yypos658; yy->__thunkpos= yythunkpos658; + } yyDo(yy, yy_1_AposChunk, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AposChunk", yy->__buf+yy->__pos)); + return 1; + l657:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AposChunk", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Alphanumeric(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Alphanumeric")); + { int yypos660= yy->__pos, yythunkpos660= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l661; goto l660; + l661:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\200")) goto l662; goto l660; + l662:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\201")) goto l663; goto l660; + l663:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\202")) goto l664; goto l660; + l664:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\203")) goto l665; goto l660; + l665:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\204")) goto l666; goto l660; + l666:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\205")) goto l667; goto l660; + l667:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\206")) goto l668; goto l660; + l668:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\207")) goto l669; goto l660; + l669:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\210")) goto l670; goto l660; + l670:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\211")) goto l671; goto l660; + l671:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\212")) goto l672; goto l660; + l672:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\213")) goto l673; goto l660; + l673:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\214")) goto l674; goto l660; + l674:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\215")) goto l675; goto l660; + l675:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\216")) goto l676; goto l660; + l676:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\217")) goto l677; goto l660; + l677:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\220")) goto l678; goto l660; + l678:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\221")) goto l679; goto l660; + l679:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\222")) goto l680; goto l660; + l680:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\223")) goto l681; goto l660; + l681:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\224")) goto l682; goto l660; + l682:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\225")) goto l683; goto l660; + l683:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\226")) goto l684; goto l660; + l684:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\227")) goto l685; goto l660; + l685:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\230")) goto l686; goto l660; + l686:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\231")) goto l687; goto l660; + l687:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\232")) goto l688; goto l660; + l688:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\233")) goto l689; goto l660; + l689:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\234")) goto l690; goto l660; + l690:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\235")) goto l691; goto l660; + l691:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\236")) goto l692; goto l660; + l692:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\237")) goto l693; goto l660; + l693:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\240")) goto l694; goto l660; + l694:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\241")) goto l695; goto l660; + l695:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\242")) goto l696; goto l660; + l696:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\243")) goto l697; goto l660; + l697:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\244")) goto l698; goto l660; + l698:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\245")) goto l699; goto l660; + l699:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\246")) goto l700; goto l660; + l700:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\247")) goto l701; goto l660; + l701:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\250")) goto l702; goto l660; + l702:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\251")) goto l703; goto l660; + l703:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\252")) goto l704; goto l660; + l704:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\253")) goto l705; goto l660; + l705:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\254")) goto l706; goto l660; + l706:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\255")) goto l707; goto l660; + l707:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\256")) goto l708; goto l660; + l708:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\257")) goto l709; goto l660; + l709:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\260")) goto l710; goto l660; + l710:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\261")) goto l711; goto l660; + l711:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\262")) goto l712; goto l660; + l712:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\263")) goto l713; goto l660; + l713:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\264")) goto l714; goto l660; + l714:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\265")) goto l715; goto l660; + l715:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\266")) goto l716; goto l660; + l716:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\267")) goto l717; goto l660; + l717:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\270")) goto l718; goto l660; + l718:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\271")) goto l719; goto l660; + l719:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\272")) goto l720; goto l660; + l720:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\273")) goto l721; goto l660; + l721:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\274")) goto l722; goto l660; + l722:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\275")) goto l723; goto l660; + l723:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\276")) goto l724; goto l660; + l724:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\277")) goto l725; goto l660; + l725:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\300")) goto l726; goto l660; + l726:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\301")) goto l727; goto l660; + l727:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\302")) goto l728; goto l660; + l728:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\303")) goto l729; goto l660; + l729:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\304")) goto l730; goto l660; + l730:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\305")) goto l731; goto l660; + l731:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\306")) goto l732; goto l660; + l732:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\307")) goto l733; goto l660; + l733:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\310")) goto l734; goto l660; + l734:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\311")) goto l735; goto l660; + l735:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\312")) goto l736; goto l660; + l736:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\313")) goto l737; goto l660; + l737:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\314")) goto l738; goto l660; + l738:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\315")) goto l739; goto l660; + l739:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\316")) goto l740; goto l660; + l740:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\317")) goto l741; goto l660; + l741:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\320")) goto l742; goto l660; + l742:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\321")) goto l743; goto l660; + l743:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\322")) goto l744; goto l660; + l744:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\323")) goto l745; goto l660; + l745:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\324")) goto l746; goto l660; + l746:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\325")) goto l747; goto l660; + l747:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\326")) goto l748; goto l660; + l748:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\327")) goto l749; goto l660; + l749:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\330")) goto l750; goto l660; + l750:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\331")) goto l751; goto l660; + l751:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\332")) goto l752; goto l660; + l752:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\333")) goto l753; goto l660; + l753:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\334")) goto l754; goto l660; + l754:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\335")) goto l755; goto l660; + l755:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\336")) goto l756; goto l660; + l756:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\337")) goto l757; goto l660; + l757:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\340")) goto l758; goto l660; + l758:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\341")) goto l759; goto l660; + l759:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\342")) goto l760; goto l660; + l760:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\343")) goto l761; goto l660; + l761:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\344")) goto l762; goto l660; + l762:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\345")) goto l763; goto l660; + l763:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\346")) goto l764; goto l660; + l764:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\347")) goto l765; goto l660; + l765:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\350")) goto l766; goto l660; + l766:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\351")) goto l767; goto l660; + l767:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\352")) goto l768; goto l660; + l768:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\353")) goto l769; goto l660; + l769:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\354")) goto l770; goto l660; + l770:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\355")) goto l771; goto l660; + l771:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\356")) goto l772; goto l660; + l772:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\357")) goto l773; goto l660; + l773:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\360")) goto l774; goto l660; + l774:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\361")) goto l775; goto l660; + l775:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\362")) goto l776; goto l660; + l776:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\363")) goto l777; goto l660; + l777:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\364")) goto l778; goto l660; + l778:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\365")) goto l779; goto l660; + l779:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\366")) goto l780; goto l660; + l780:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\367")) goto l781; goto l660; + l781:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\370")) goto l782; goto l660; + l782:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\371")) goto l783; goto l660; + l783:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\372")) goto l784; goto l660; + l784:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\373")) goto l785; goto l660; + l785:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\374")) goto l786; goto l660; + l786:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\375")) goto l787; goto l660; + l787:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\376")) goto l788; goto l660; + l788:; yy->__pos= yypos660; yy->__thunkpos= yythunkpos660; if (!yymatchString(yy, "\377")) goto l659; + } + l660:; + yyprintf((stderr, " ok %s @ %s\n", "Alphanumeric", yy->__buf+yy->__pos)); + return 1; + l659:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Alphanumeric", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StrChunk(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StrChunk")); + { int yypos790= yy->__pos, yythunkpos790= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l791; +#undef yytext +#undef yyleng + } + { int yypos794= yy->__pos, yythunkpos794= yy->__thunkpos; if (!yy_NormalChar(yy)) goto l795; goto l794; + l795:; yy->__pos= yypos794; yy->__thunkpos= yythunkpos794; if (!yymatchChar(yy, '_')) goto l791; + l796:; + { int yypos797= yy->__pos, yythunkpos797= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l797; goto l796; + l797:; yy->__pos= yypos797; yy->__thunkpos= yythunkpos797; + } + { int yypos798= yy->__pos, yythunkpos798= yy->__thunkpos; if (!yy_Alphanumeric(yy)) goto l791; yy->__pos= yypos798; yy->__thunkpos= yythunkpos798; + } + } + l794:; + l792:; + { int yypos793= yy->__pos, yythunkpos793= yy->__thunkpos; + { int yypos799= yy->__pos, yythunkpos799= yy->__thunkpos; if (!yy_NormalChar(yy)) goto l800; goto l799; + l800:; yy->__pos= yypos799; yy->__thunkpos= yythunkpos799; if (!yymatchChar(yy, '_')) goto l793; + l801:; + { int yypos802= yy->__pos, yythunkpos802= yy->__thunkpos; if (!yymatchChar(yy, '_')) goto l802; goto l801; + l802:; yy->__pos= yypos802; yy->__thunkpos= yythunkpos802; + } + { int yypos803= yy->__pos, yythunkpos803= yy->__thunkpos; if (!yy_Alphanumeric(yy)) goto l793; yy->__pos= yypos803; yy->__thunkpos= yythunkpos803; + } + } + l799:; goto l792; + l793:; yy->__pos= yypos793; yy->__thunkpos= yythunkpos793; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l791; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_StrChunk, yy->__begin, yy->__end); goto l790; + l791:; yy->__pos= yypos790; yy->__thunkpos= yythunkpos790; if (!yy_AposChunk(yy)) goto l789; + } + l790:; + yyprintf((stderr, " ok %s @ %s\n", "StrChunk", yy->__buf+yy->__pos)); + return 1; + l789:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StrChunk", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NormalChar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NormalChar")); + { int yypos805= yy->__pos, yythunkpos805= yy->__thunkpos; + { int yypos806= yy->__pos, yythunkpos806= yy->__thunkpos; if (!yy_SpecialChar(yy)) goto l807; goto l806; + l807:; yy->__pos= yypos806; yy->__thunkpos= yythunkpos806; if (!yy_Spacechar(yy)) goto l808; goto l806; + l808:; yy->__pos= yypos806; yy->__thunkpos= yythunkpos806; if (!yy_Newline(yy)) goto l805; + } + l806:; goto l804; + l805:; yy->__pos= yypos805; yy->__thunkpos= yythunkpos805; + } if (!yymatchDot(yy)) goto l804; + yyprintf((stderr, " ok %s @ %s\n", "NormalChar", yy->__buf+yy->__pos)); + return 1; + l804:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NormalChar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OptionalSpace(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OptionalSpace")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l809; +#undef yytext +#undef yyleng + } + l810:; + { int yypos811= yy->__pos, yythunkpos811= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l811; goto l810; + l811:; yy->__pos= yypos811; yy->__thunkpos= yythunkpos811; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l809; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_OptionalSpace, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OptionalSpace", yy->__buf+yy->__pos)); + return 1; + l809:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OptionalSpace", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Symbol(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Symbol")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l812; +#undef yytext +#undef yyleng + } if (!yy_SpecialChar(yy)) goto l812; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l812; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_Symbol, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Symbol", yy->__buf+yy->__pos)); + return 1; + l812:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Symbol", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Smart(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Smart")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_SMART) )) goto l813; +#undef yytext +#undef yyleng + } + { int yypos814= yy->__pos, yythunkpos814= yy->__thunkpos; if (!yy_Ellipsis(yy)) goto l815; goto l814; + l815:; yy->__pos= yypos814; yy->__thunkpos= yythunkpos814; if (!yy_Dash(yy)) goto l816; goto l814; + l816:; yy->__pos= yypos814; yy->__thunkpos= yythunkpos814; if (!yy_SingleQuoted(yy)) goto l817; goto l814; + l817:; yy->__pos= yypos814; yy->__thunkpos= yythunkpos814; if (!yy_DoubleQuoted(yy)) goto l818; goto l814; + l818:; yy->__pos= yypos814; yy->__thunkpos= yythunkpos814; if (!yy_Apostrophe(yy)) goto l813; + } + l814:; + yyprintf((stderr, " ok %s @ %s\n", "Smart", yy->__buf+yy->__pos)); + return 1; + l813:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Smart", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_KeptEscapedChar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "KeptEscapedChar")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l819; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, '\\')) goto l819; + { int yypos820= yy->__pos, yythunkpos820= yy->__thunkpos; if (!yy_Newline(yy)) goto l820; goto l819; + l820:; yy->__pos= yypos820; yy->__thunkpos= yythunkpos820; + } if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\032\157\000\120\000\000\000\270\001\000\000\070\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l819; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l819; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_KeptEscapedChar, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "KeptEscapedChar", yy->__buf+yy->__pos)); + return 1; + l819:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "KeptEscapedChar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_EscapedChar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "EscapedChar")); if (!yymatchChar(yy, '\\')) goto l821; + { int yypos822= yy->__pos, yythunkpos822= yy->__thunkpos; if (!yy_Newline(yy)) goto l822; goto l821; + l822:; yy->__pos= yypos822; yy->__thunkpos= yythunkpos822; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l821; +#undef yytext +#undef yyleng + } if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\032\157\000\120\000\000\000\270\001\000\000\070\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l821; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l821; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_EscapedChar, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "EscapedChar", yy->__buf+yy->__pos)); + return 1; + l821:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "EscapedChar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Entity(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Entity")); + { int yypos824= yy->__pos, yythunkpos824= yy->__thunkpos; if (!yy_HexEntity(yy)) goto l825; goto l824; + l825:; yy->__pos= yypos824; yy->__thunkpos= yythunkpos824; if (!yy_DecEntity(yy)) goto l826; goto l824; + l826:; yy->__pos= yypos824; yy->__thunkpos= yythunkpos824; if (!yy_CharEntity(yy)) goto l823; + } + l824:; yyDo(yy, yy_1_Entity, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Entity", yy->__buf+yy->__pos)); + return 1; + l823:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Entity", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RawHtml(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RawHtml")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l827; +#undef yytext +#undef yyleng + } + { int yypos828= yy->__pos, yythunkpos828= yy->__thunkpos; if (!yy_HtmlComment(yy)) goto l829; goto l828; + l829:; yy->__pos= yypos828; yy->__thunkpos= yythunkpos828; if (!yy_HtmlBlockScript(yy)) goto l830; goto l828; + l830:; yy->__pos= yypos828; yy->__thunkpos= yythunkpos828; if (!yy_HtmlTag(yy)) goto l827; + } + l828:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l827; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_RawHtml, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "RawHtml", yy->__buf+yy->__pos)); + return 1; + l827:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RawHtml", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Code(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Code")); + { int yypos832= yy->__pos, yythunkpos832= yy->__thunkpos; if (!yy_Ticks1(yy)) goto l833; if (!yy_Sp(yy)) goto l833; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l833; +#undef yytext +#undef yyleng + } + { int yypos836= yy->__pos, yythunkpos836= yy->__thunkpos; + { int yypos840= yy->__pos, yythunkpos840= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l840; goto l837; + l840:; yy->__pos= yypos840; yy->__thunkpos= yythunkpos840; + } if (!yy_Nonspacechar(yy)) goto l837; + l838:; + { int yypos839= yy->__pos, yythunkpos839= yy->__thunkpos; + { int yypos841= yy->__pos, yythunkpos841= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l841; goto l839; + l841:; yy->__pos= yypos841; yy->__thunkpos= yythunkpos841; + } if (!yy_Nonspacechar(yy)) goto l839; goto l838; + l839:; yy->__pos= yypos839; yy->__thunkpos= yythunkpos839; + } goto l836; + l837:; yy->__pos= yypos836; yy->__thunkpos= yythunkpos836; + { int yypos843= yy->__pos, yythunkpos843= yy->__thunkpos; if (!yy_Ticks1(yy)) goto l843; goto l842; + l843:; yy->__pos= yypos843; yy->__thunkpos= yythunkpos843; + } if (!yymatchChar(yy, '`')) goto l842; + l844:; + { int yypos845= yy->__pos, yythunkpos845= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l845; goto l844; + l845:; yy->__pos= yypos845; yy->__thunkpos= yythunkpos845; + } goto l836; + l842:; yy->__pos= yypos836; yy->__thunkpos= yythunkpos836; + { int yypos846= yy->__pos, yythunkpos846= yy->__thunkpos; if (!yy_Sp(yy)) goto l846; if (!yy_Ticks1(yy)) goto l846; goto l833; + l846:; yy->__pos= yypos846; yy->__thunkpos= yythunkpos846; + } + { int yypos847= yy->__pos, yythunkpos847= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l848; goto l847; + l848:; yy->__pos= yypos847; yy->__thunkpos= yythunkpos847; if (!yy_Newline(yy)) goto l833; + { int yypos849= yy->__pos, yythunkpos849= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l849; goto l833; + l849:; yy->__pos= yypos849; yy->__thunkpos= yythunkpos849; + } + } + l847:; + } + l836:; + l834:; + { int yypos835= yy->__pos, yythunkpos835= yy->__thunkpos; + { int yypos850= yy->__pos, yythunkpos850= yy->__thunkpos; + { int yypos854= yy->__pos, yythunkpos854= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l854; goto l851; + l854:; yy->__pos= yypos854; yy->__thunkpos= yythunkpos854; + } if (!yy_Nonspacechar(yy)) goto l851; + l852:; + { int yypos853= yy->__pos, yythunkpos853= yy->__thunkpos; + { int yypos855= yy->__pos, yythunkpos855= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l855; goto l853; + l855:; yy->__pos= yypos855; yy->__thunkpos= yythunkpos855; + } if (!yy_Nonspacechar(yy)) goto l853; goto l852; + l853:; yy->__pos= yypos853; yy->__thunkpos= yythunkpos853; + } goto l850; + l851:; yy->__pos= yypos850; yy->__thunkpos= yythunkpos850; + { int yypos857= yy->__pos, yythunkpos857= yy->__thunkpos; if (!yy_Ticks1(yy)) goto l857; goto l856; + l857:; yy->__pos= yypos857; yy->__thunkpos= yythunkpos857; + } if (!yymatchChar(yy, '`')) goto l856; + l858:; + { int yypos859= yy->__pos, yythunkpos859= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l859; goto l858; + l859:; yy->__pos= yypos859; yy->__thunkpos= yythunkpos859; + } goto l850; + l856:; yy->__pos= yypos850; yy->__thunkpos= yythunkpos850; + { int yypos860= yy->__pos, yythunkpos860= yy->__thunkpos; if (!yy_Sp(yy)) goto l860; if (!yy_Ticks1(yy)) goto l860; goto l835; + l860:; yy->__pos= yypos860; yy->__thunkpos= yythunkpos860; + } + { int yypos861= yy->__pos, yythunkpos861= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l862; goto l861; + l862:; yy->__pos= yypos861; yy->__thunkpos= yythunkpos861; if (!yy_Newline(yy)) goto l835; + { int yypos863= yy->__pos, yythunkpos863= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l863; goto l835; + l863:; yy->__pos= yypos863; yy->__thunkpos= yythunkpos863; + } + } + l861:; + } + l850:; goto l834; + l835:; yy->__pos= yypos835; yy->__thunkpos= yythunkpos835; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l833; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l833; if (!yy_Ticks1(yy)) goto l833; goto l832; + l833:; yy->__pos= yypos832; yy->__thunkpos= yythunkpos832; if (!yy_Ticks2(yy)) goto l864; if (!yy_Sp(yy)) goto l864; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l864; +#undef yytext +#undef yyleng + } + { int yypos867= yy->__pos, yythunkpos867= yy->__thunkpos; + { int yypos871= yy->__pos, yythunkpos871= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l871; goto l868; + l871:; yy->__pos= yypos871; yy->__thunkpos= yythunkpos871; + } if (!yy_Nonspacechar(yy)) goto l868; + l869:; + { int yypos870= yy->__pos, yythunkpos870= yy->__thunkpos; + { int yypos872= yy->__pos, yythunkpos872= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l872; goto l870; + l872:; yy->__pos= yypos872; yy->__thunkpos= yythunkpos872; + } if (!yy_Nonspacechar(yy)) goto l870; goto l869; + l870:; yy->__pos= yypos870; yy->__thunkpos= yythunkpos870; + } goto l867; + l868:; yy->__pos= yypos867; yy->__thunkpos= yythunkpos867; + { int yypos874= yy->__pos, yythunkpos874= yy->__thunkpos; if (!yy_Ticks2(yy)) goto l874; goto l873; + l874:; yy->__pos= yypos874; yy->__thunkpos= yythunkpos874; + } if (!yymatchChar(yy, '`')) goto l873; + l875:; + { int yypos876= yy->__pos, yythunkpos876= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l876; goto l875; + l876:; yy->__pos= yypos876; yy->__thunkpos= yythunkpos876; + } goto l867; + l873:; yy->__pos= yypos867; yy->__thunkpos= yythunkpos867; + { int yypos877= yy->__pos, yythunkpos877= yy->__thunkpos; if (!yy_Sp(yy)) goto l877; if (!yy_Ticks2(yy)) goto l877; goto l864; + l877:; yy->__pos= yypos877; yy->__thunkpos= yythunkpos877; + } + { int yypos878= yy->__pos, yythunkpos878= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l879; goto l878; + l879:; yy->__pos= yypos878; yy->__thunkpos= yythunkpos878; if (!yy_Newline(yy)) goto l864; + { int yypos880= yy->__pos, yythunkpos880= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l880; goto l864; + l880:; yy->__pos= yypos880; yy->__thunkpos= yythunkpos880; + } + } + l878:; + } + l867:; + l865:; + { int yypos866= yy->__pos, yythunkpos866= yy->__thunkpos; + { int yypos881= yy->__pos, yythunkpos881= yy->__thunkpos; + { int yypos885= yy->__pos, yythunkpos885= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l885; goto l882; + l885:; yy->__pos= yypos885; yy->__thunkpos= yythunkpos885; + } if (!yy_Nonspacechar(yy)) goto l882; + l883:; + { int yypos884= yy->__pos, yythunkpos884= yy->__thunkpos; + { int yypos886= yy->__pos, yythunkpos886= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l886; goto l884; + l886:; yy->__pos= yypos886; yy->__thunkpos= yythunkpos886; + } if (!yy_Nonspacechar(yy)) goto l884; goto l883; + l884:; yy->__pos= yypos884; yy->__thunkpos= yythunkpos884; + } goto l881; + l882:; yy->__pos= yypos881; yy->__thunkpos= yythunkpos881; + { int yypos888= yy->__pos, yythunkpos888= yy->__thunkpos; if (!yy_Ticks2(yy)) goto l888; goto l887; + l888:; yy->__pos= yypos888; yy->__thunkpos= yythunkpos888; + } if (!yymatchChar(yy, '`')) goto l887; + l889:; + { int yypos890= yy->__pos, yythunkpos890= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l890; goto l889; + l890:; yy->__pos= yypos890; yy->__thunkpos= yythunkpos890; + } goto l881; + l887:; yy->__pos= yypos881; yy->__thunkpos= yythunkpos881; + { int yypos891= yy->__pos, yythunkpos891= yy->__thunkpos; if (!yy_Sp(yy)) goto l891; if (!yy_Ticks2(yy)) goto l891; goto l866; + l891:; yy->__pos= yypos891; yy->__thunkpos= yythunkpos891; + } + { int yypos892= yy->__pos, yythunkpos892= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l893; goto l892; + l893:; yy->__pos= yypos892; yy->__thunkpos= yythunkpos892; if (!yy_Newline(yy)) goto l866; + { int yypos894= yy->__pos, yythunkpos894= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l894; goto l866; + l894:; yy->__pos= yypos894; yy->__thunkpos= yythunkpos894; + } + } + l892:; + } + l881:; goto l865; + l866:; yy->__pos= yypos866; yy->__thunkpos= yythunkpos866; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l864; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l864; if (!yy_Ticks2(yy)) goto l864; goto l832; + l864:; yy->__pos= yypos832; yy->__thunkpos= yythunkpos832; if (!yy_Ticks3(yy)) goto l895; if (!yy_Sp(yy)) goto l895; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l895; +#undef yytext +#undef yyleng + } + { int yypos898= yy->__pos, yythunkpos898= yy->__thunkpos; + { int yypos902= yy->__pos, yythunkpos902= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l902; goto l899; + l902:; yy->__pos= yypos902; yy->__thunkpos= yythunkpos902; + } if (!yy_Nonspacechar(yy)) goto l899; + l900:; + { int yypos901= yy->__pos, yythunkpos901= yy->__thunkpos; + { int yypos903= yy->__pos, yythunkpos903= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l903; goto l901; + l903:; yy->__pos= yypos903; yy->__thunkpos= yythunkpos903; + } if (!yy_Nonspacechar(yy)) goto l901; goto l900; + l901:; yy->__pos= yypos901; yy->__thunkpos= yythunkpos901; + } goto l898; + l899:; yy->__pos= yypos898; yy->__thunkpos= yythunkpos898; + { int yypos905= yy->__pos, yythunkpos905= yy->__thunkpos; if (!yy_Ticks3(yy)) goto l905; goto l904; + l905:; yy->__pos= yypos905; yy->__thunkpos= yythunkpos905; + } if (!yymatchChar(yy, '`')) goto l904; + l906:; + { int yypos907= yy->__pos, yythunkpos907= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l907; goto l906; + l907:; yy->__pos= yypos907; yy->__thunkpos= yythunkpos907; + } goto l898; + l904:; yy->__pos= yypos898; yy->__thunkpos= yythunkpos898; + { int yypos908= yy->__pos, yythunkpos908= yy->__thunkpos; if (!yy_Sp(yy)) goto l908; if (!yy_Ticks3(yy)) goto l908; goto l895; + l908:; yy->__pos= yypos908; yy->__thunkpos= yythunkpos908; + } + { int yypos909= yy->__pos, yythunkpos909= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l910; goto l909; + l910:; yy->__pos= yypos909; yy->__thunkpos= yythunkpos909; if (!yy_Newline(yy)) goto l895; + { int yypos911= yy->__pos, yythunkpos911= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l911; goto l895; + l911:; yy->__pos= yypos911; yy->__thunkpos= yythunkpos911; + } + } + l909:; + } + l898:; + l896:; + { int yypos897= yy->__pos, yythunkpos897= yy->__thunkpos; + { int yypos912= yy->__pos, yythunkpos912= yy->__thunkpos; + { int yypos916= yy->__pos, yythunkpos916= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l916; goto l913; + l916:; yy->__pos= yypos916; yy->__thunkpos= yythunkpos916; + } if (!yy_Nonspacechar(yy)) goto l913; + l914:; + { int yypos915= yy->__pos, yythunkpos915= yy->__thunkpos; + { int yypos917= yy->__pos, yythunkpos917= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l917; goto l915; + l917:; yy->__pos= yypos917; yy->__thunkpos= yythunkpos917; + } if (!yy_Nonspacechar(yy)) goto l915; goto l914; + l915:; yy->__pos= yypos915; yy->__thunkpos= yythunkpos915; + } goto l912; + l913:; yy->__pos= yypos912; yy->__thunkpos= yythunkpos912; + { int yypos919= yy->__pos, yythunkpos919= yy->__thunkpos; if (!yy_Ticks3(yy)) goto l919; goto l918; + l919:; yy->__pos= yypos919; yy->__thunkpos= yythunkpos919; + } if (!yymatchChar(yy, '`')) goto l918; + l920:; + { int yypos921= yy->__pos, yythunkpos921= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l921; goto l920; + l921:; yy->__pos= yypos921; yy->__thunkpos= yythunkpos921; + } goto l912; + l918:; yy->__pos= yypos912; yy->__thunkpos= yythunkpos912; + { int yypos922= yy->__pos, yythunkpos922= yy->__thunkpos; if (!yy_Sp(yy)) goto l922; if (!yy_Ticks3(yy)) goto l922; goto l897; + l922:; yy->__pos= yypos922; yy->__thunkpos= yythunkpos922; + } + { int yypos923= yy->__pos, yythunkpos923= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l924; goto l923; + l924:; yy->__pos= yypos923; yy->__thunkpos= yythunkpos923; if (!yy_Newline(yy)) goto l897; + { int yypos925= yy->__pos, yythunkpos925= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l925; goto l897; + l925:; yy->__pos= yypos925; yy->__thunkpos= yythunkpos925; + } + } + l923:; + } + l912:; goto l896; + l897:; yy->__pos= yypos897; yy->__thunkpos= yythunkpos897; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l895; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l895; if (!yy_Ticks3(yy)) goto l895; goto l832; + l895:; yy->__pos= yypos832; yy->__thunkpos= yythunkpos832; if (!yy_Ticks4(yy)) goto l926; if (!yy_Sp(yy)) goto l926; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l926; +#undef yytext +#undef yyleng + } + { int yypos929= yy->__pos, yythunkpos929= yy->__thunkpos; + { int yypos933= yy->__pos, yythunkpos933= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l933; goto l930; + l933:; yy->__pos= yypos933; yy->__thunkpos= yythunkpos933; + } if (!yy_Nonspacechar(yy)) goto l930; + l931:; + { int yypos932= yy->__pos, yythunkpos932= yy->__thunkpos; + { int yypos934= yy->__pos, yythunkpos934= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l934; goto l932; + l934:; yy->__pos= yypos934; yy->__thunkpos= yythunkpos934; + } if (!yy_Nonspacechar(yy)) goto l932; goto l931; + l932:; yy->__pos= yypos932; yy->__thunkpos= yythunkpos932; + } goto l929; + l930:; yy->__pos= yypos929; yy->__thunkpos= yythunkpos929; + { int yypos936= yy->__pos, yythunkpos936= yy->__thunkpos; if (!yy_Ticks4(yy)) goto l936; goto l935; + l936:; yy->__pos= yypos936; yy->__thunkpos= yythunkpos936; + } if (!yymatchChar(yy, '`')) goto l935; + l937:; + { int yypos938= yy->__pos, yythunkpos938= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l938; goto l937; + l938:; yy->__pos= yypos938; yy->__thunkpos= yythunkpos938; + } goto l929; + l935:; yy->__pos= yypos929; yy->__thunkpos= yythunkpos929; + { int yypos939= yy->__pos, yythunkpos939= yy->__thunkpos; if (!yy_Sp(yy)) goto l939; if (!yy_Ticks4(yy)) goto l939; goto l926; + l939:; yy->__pos= yypos939; yy->__thunkpos= yythunkpos939; + } + { int yypos940= yy->__pos, yythunkpos940= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l941; goto l940; + l941:; yy->__pos= yypos940; yy->__thunkpos= yythunkpos940; if (!yy_Newline(yy)) goto l926; + { int yypos942= yy->__pos, yythunkpos942= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l942; goto l926; + l942:; yy->__pos= yypos942; yy->__thunkpos= yythunkpos942; + } + } + l940:; + } + l929:; + l927:; + { int yypos928= yy->__pos, yythunkpos928= yy->__thunkpos; + { int yypos943= yy->__pos, yythunkpos943= yy->__thunkpos; + { int yypos947= yy->__pos, yythunkpos947= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l947; goto l944; + l947:; yy->__pos= yypos947; yy->__thunkpos= yythunkpos947; + } if (!yy_Nonspacechar(yy)) goto l944; + l945:; + { int yypos946= yy->__pos, yythunkpos946= yy->__thunkpos; + { int yypos948= yy->__pos, yythunkpos948= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l948; goto l946; + l948:; yy->__pos= yypos948; yy->__thunkpos= yythunkpos948; + } if (!yy_Nonspacechar(yy)) goto l946; goto l945; + l946:; yy->__pos= yypos946; yy->__thunkpos= yythunkpos946; + } goto l943; + l944:; yy->__pos= yypos943; yy->__thunkpos= yythunkpos943; + { int yypos950= yy->__pos, yythunkpos950= yy->__thunkpos; if (!yy_Ticks4(yy)) goto l950; goto l949; + l950:; yy->__pos= yypos950; yy->__thunkpos= yythunkpos950; + } if (!yymatchChar(yy, '`')) goto l949; + l951:; + { int yypos952= yy->__pos, yythunkpos952= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l952; goto l951; + l952:; yy->__pos= yypos952; yy->__thunkpos= yythunkpos952; + } goto l943; + l949:; yy->__pos= yypos943; yy->__thunkpos= yythunkpos943; + { int yypos953= yy->__pos, yythunkpos953= yy->__thunkpos; if (!yy_Sp(yy)) goto l953; if (!yy_Ticks4(yy)) goto l953; goto l928; + l953:; yy->__pos= yypos953; yy->__thunkpos= yythunkpos953; + } + { int yypos954= yy->__pos, yythunkpos954= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l955; goto l954; + l955:; yy->__pos= yypos954; yy->__thunkpos= yythunkpos954; if (!yy_Newline(yy)) goto l928; + { int yypos956= yy->__pos, yythunkpos956= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l956; goto l928; + l956:; yy->__pos= yypos956; yy->__thunkpos= yythunkpos956; + } + } + l954:; + } + l943:; goto l927; + l928:; yy->__pos= yypos928; yy->__thunkpos= yythunkpos928; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l926; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l926; if (!yy_Ticks4(yy)) goto l926; goto l832; + l926:; yy->__pos= yypos832; yy->__thunkpos= yythunkpos832; if (!yy_Ticks5(yy)) goto l831; if (!yy_Sp(yy)) goto l831; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l831; +#undef yytext +#undef yyleng + } + { int yypos959= yy->__pos, yythunkpos959= yy->__thunkpos; + { int yypos963= yy->__pos, yythunkpos963= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l963; goto l960; + l963:; yy->__pos= yypos963; yy->__thunkpos= yythunkpos963; + } if (!yy_Nonspacechar(yy)) goto l960; + l961:; + { int yypos962= yy->__pos, yythunkpos962= yy->__thunkpos; + { int yypos964= yy->__pos, yythunkpos964= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l964; goto l962; + l964:; yy->__pos= yypos964; yy->__thunkpos= yythunkpos964; + } if (!yy_Nonspacechar(yy)) goto l962; goto l961; + l962:; yy->__pos= yypos962; yy->__thunkpos= yythunkpos962; + } goto l959; + l960:; yy->__pos= yypos959; yy->__thunkpos= yythunkpos959; + { int yypos966= yy->__pos, yythunkpos966= yy->__thunkpos; if (!yy_Ticks5(yy)) goto l966; goto l965; + l966:; yy->__pos= yypos966; yy->__thunkpos= yythunkpos966; + } if (!yymatchChar(yy, '`')) goto l965; + l967:; + { int yypos968= yy->__pos, yythunkpos968= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l968; goto l967; + l968:; yy->__pos= yypos968; yy->__thunkpos= yythunkpos968; + } goto l959; + l965:; yy->__pos= yypos959; yy->__thunkpos= yythunkpos959; + { int yypos969= yy->__pos, yythunkpos969= yy->__thunkpos; if (!yy_Sp(yy)) goto l969; if (!yy_Ticks5(yy)) goto l969; goto l831; + l969:; yy->__pos= yypos969; yy->__thunkpos= yythunkpos969; + } + { int yypos970= yy->__pos, yythunkpos970= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l971; goto l970; + l971:; yy->__pos= yypos970; yy->__thunkpos= yythunkpos970; if (!yy_Newline(yy)) goto l831; + { int yypos972= yy->__pos, yythunkpos972= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l972; goto l831; + l972:; yy->__pos= yypos972; yy->__thunkpos= yythunkpos972; + } + } + l970:; + } + l959:; + l957:; + { int yypos958= yy->__pos, yythunkpos958= yy->__thunkpos; + { int yypos973= yy->__pos, yythunkpos973= yy->__thunkpos; + { int yypos977= yy->__pos, yythunkpos977= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l977; goto l974; + l977:; yy->__pos= yypos977; yy->__thunkpos= yythunkpos977; + } if (!yy_Nonspacechar(yy)) goto l974; + l975:; + { int yypos976= yy->__pos, yythunkpos976= yy->__thunkpos; + { int yypos978= yy->__pos, yythunkpos978= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l978; goto l976; + l978:; yy->__pos= yypos978; yy->__thunkpos= yythunkpos978; + } if (!yy_Nonspacechar(yy)) goto l976; goto l975; + l976:; yy->__pos= yypos976; yy->__thunkpos= yythunkpos976; + } goto l973; + l974:; yy->__pos= yypos973; yy->__thunkpos= yythunkpos973; + { int yypos980= yy->__pos, yythunkpos980= yy->__thunkpos; if (!yy_Ticks5(yy)) goto l980; goto l979; + l980:; yy->__pos= yypos980; yy->__thunkpos= yythunkpos980; + } if (!yymatchChar(yy, '`')) goto l979; + l981:; + { int yypos982= yy->__pos, yythunkpos982= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l982; goto l981; + l982:; yy->__pos= yypos982; yy->__thunkpos= yythunkpos982; + } goto l973; + l979:; yy->__pos= yypos973; yy->__thunkpos= yythunkpos973; + { int yypos983= yy->__pos, yythunkpos983= yy->__thunkpos; if (!yy_Sp(yy)) goto l983; if (!yy_Ticks5(yy)) goto l983; goto l958; + l983:; yy->__pos= yypos983; yy->__thunkpos= yythunkpos983; + } + { int yypos984= yy->__pos, yythunkpos984= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l985; goto l984; + l985:; yy->__pos= yypos984; yy->__thunkpos= yythunkpos984; if (!yy_Newline(yy)) goto l958; + { int yypos986= yy->__pos, yythunkpos986= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l986; goto l958; + l986:; yy->__pos= yypos986; yy->__thunkpos= yythunkpos986; + } + } + l984:; + } + l973:; goto l957; + l958:; yy->__pos= yypos958; yy->__thunkpos= yythunkpos958; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l831; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l831; if (!yy_Ticks5(yy)) goto l831; + } + l832:; yyDo(yy, yy_1_Code, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Code", yy->__buf+yy->__pos)); + return 1; + l831:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Code", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Comment(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Comment")); if (!yymatchString(yy, "")) goto l991; goto l987; + l991:; yy->__pos= yypos991; yy->__thunkpos= yythunkpos991; + } if (!yy_Inline(yy)) goto l987; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Comment, yy->__begin, yy->__end); + l989:; + { int yypos990= yy->__pos, yythunkpos990= yy->__thunkpos; + { int yypos992= yy->__pos, yythunkpos992= yy->__thunkpos; if (!yymatchString(yy, "-->")) goto l992; goto l990; + l992:; yy->__pos= yypos992; yy->__thunkpos= yythunkpos992; + } if (!yy_Inline(yy)) goto l990; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Comment, yy->__begin, yy->__end); goto l989; + l990:; yy->__pos= yypos990; yy->__thunkpos= yythunkpos990; + } if (!yymatchString(yy, "-->")) goto l987; yyDo(yy, yy_2_Comment, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Comment", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l987:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Comment", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NoteReference(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "NoteReference")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l993; +#undef yytext +#undef yyleng + } if (!yy_RawNoteReference(yy)) goto l993; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_NoteReference, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "NoteReference", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l993:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NoteReference", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Link(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Link")); + { int yypos995= yy->__pos, yythunkpos995= yy->__thunkpos; if (!yy_ExplicitLink(yy)) goto l996; goto l995; + l996:; yy->__pos= yypos995; yy->__thunkpos= yythunkpos995; if (!yy_ReferenceLink(yy)) goto l997; goto l995; + l997:; yy->__pos= yypos995; yy->__thunkpos= yythunkpos995; if (!yy_AutoLink(yy)) goto l994; + } + l995:; + yyprintf((stderr, " ok %s @ %s\n", "Link", yy->__buf+yy->__pos)); + return 1; + l994:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Link", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Image(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Image")); if (!yymatchChar(yy, '!')) goto l998; + { int yypos999= yy->__pos, yythunkpos999= yy->__thunkpos; if (!yy_ExplicitLink(yy)) goto l1000; goto l999; + l1000:; yy->__pos= yypos999; yy->__thunkpos= yythunkpos999; if (!yy_ReferenceLink(yy)) goto l998; + } + l999:; yyDo(yy, yy_1_Image, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Image", yy->__buf+yy->__pos)); + return 1; + l998:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Image", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CitationReference(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CitationReference")); + { int yypos1002= yy->__pos, yythunkpos1002= yy->__thunkpos; if (!yy_CitationReferenceDouble(yy)) goto l1003; goto l1002; + l1003:; yy->__pos= yypos1002; yy->__thunkpos= yythunkpos1002; if (!yy_CitationReferenceSingle(yy)) goto l1001; + } + l1002:; + yyprintf((stderr, " ok %s @ %s\n", "CitationReference", yy->__buf+yy->__pos)); + return 1; + l1001:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CitationReference", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Delete(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Delete")); if (!yymatchString(yy, "~~")) goto l1004; + { int yypos1005= yy->__pos, yythunkpos1005= yy->__thunkpos; if (!yy_Whitespace(yy)) goto l1005; goto l1004; + l1005:; yy->__pos= yypos1005; yy->__thunkpos= yythunkpos1005; + } if (!yy_StartList(yy)) goto l1004; yyDo(yy, yySet, -2, 0); + { int yypos1008= yy->__pos, yythunkpos1008= yy->__thunkpos; if (!yymatchString(yy, "~~")) goto l1008; goto l1004; + l1008:; yy->__pos= yypos1008; yy->__thunkpos= yythunkpos1008; + } if (!yy_Inline(yy)) goto l1004; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Delete, yy->__begin, yy->__end); + l1006:; + { int yypos1007= yy->__pos, yythunkpos1007= yy->__thunkpos; + { int yypos1009= yy->__pos, yythunkpos1009= yy->__thunkpos; if (!yymatchString(yy, "~~")) goto l1009; goto l1007; + l1009:; yy->__pos= yypos1009; yy->__thunkpos= yythunkpos1009; + } if (!yy_Inline(yy)) goto l1007; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Delete, yy->__begin, yy->__end); goto l1006; + l1007:; yy->__pos= yypos1007; yy->__thunkpos= yythunkpos1007; + } if (!yymatchString(yy, "~~")) goto l1004; yyDo(yy, yy_2_Delete, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Delete", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1004:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Delete", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Emph(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Emph")); + { int yypos1011= yy->__pos, yythunkpos1011= yy->__thunkpos; if (!yy_EmphStar(yy)) goto l1012; goto l1011; + l1012:; yy->__pos= yypos1011; yy->__thunkpos= yythunkpos1011; if (!yy_EmphUl(yy)) goto l1010; + } + l1011:; + yyprintf((stderr, " ok %s @ %s\n", "Emph", yy->__buf+yy->__pos)); + return 1; + l1010:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Emph", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Strong(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Strong")); + { int yypos1014= yy->__pos, yythunkpos1014= yy->__thunkpos; if (!yy_StrongStar(yy)) goto l1015; goto l1014; + l1015:; yy->__pos= yypos1014; yy->__thunkpos= yythunkpos1014; if (!yy_StrongUl(yy)) goto l1013; + } + l1014:; + yyprintf((stderr, " ok %s @ %s\n", "Strong", yy->__buf+yy->__pos)); + return 1; + l1013:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Strong", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Space(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Space")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1016; +#undef yytext +#undef yyleng + } if (!yy_Spacechar(yy)) goto l1016; + l1017:; + { int yypos1018= yy->__pos, yythunkpos1018= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1018; goto l1017; + l1018:; yy->__pos= yypos1018; yy->__thunkpos= yythunkpos1018; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1016; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_Space, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Space", yy->__buf+yy->__pos)); + return 1; + l1016:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Space", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_UlOrStarLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "UlOrStarLine")); + { int yypos1020= yy->__pos, yythunkpos1020= yy->__thunkpos; if (!yy_UlLine(yy)) goto l1021; goto l1020; + l1021:; yy->__pos= yypos1020; yy->__thunkpos= yythunkpos1020; if (!yy_StarLine(yy)) goto l1019; + } + l1020:; yyDo(yy, yy_1_UlOrStarLine, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "UlOrStarLine", yy->__buf+yy->__pos)); + return 1; + l1019:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "UlOrStarLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MathSpan(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MathSpan")); + { int yypos1023= yy->__pos, yythunkpos1023= yy->__thunkpos; if (!yy_ULMathSpan(yy)) goto l1024; goto l1023; + l1024:; yy->__pos= yypos1023; yy->__thunkpos= yythunkpos1023; if (!yy_MMDMathSpan(yy)) goto l1022; + } + l1023:; + yyprintf((stderr, " ok %s @ %s\n", "MathSpan", yy->__buf+yy->__pos)); + return 1; + l1022:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MathSpan", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Str(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Str")); if (!yy_StartList(yy)) goto l1025; yyDo(yy, yySet, -1, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1025; +#undef yytext +#undef yyleng + } if (!yy_NormalChar(yy)) goto l1025; + l1026:; + { int yypos1027= yy->__pos, yythunkpos1027= yy->__thunkpos; if (!yy_NormalChar(yy)) goto l1027; goto l1026; + l1027:; yy->__pos= yypos1027; yy->__thunkpos= yythunkpos1027; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1025; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_Str, yy->__begin, yy->__end); + l1028:; + { int yypos1029= yy->__pos, yythunkpos1029= yy->__thunkpos; if (!yy_StrChunk(yy)) goto l1029; yyDo(yy, yy_2_Str, yy->__begin, yy->__end); goto l1028; + l1029:; yy->__pos= yypos1029; yy->__thunkpos= yythunkpos1029; + } yyDo(yy, yy_3_Str, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Str", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1025:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Str", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_InStyleTags(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "InStyleTags")); if (!yy_StyleOpen(yy)) goto l1030; + l1031:; + { int yypos1032= yy->__pos, yythunkpos1032= yy->__thunkpos; + { int yypos1033= yy->__pos, yythunkpos1033= yy->__thunkpos; if (!yy_StyleClose(yy)) goto l1033; goto l1032; + l1033:; yy->__pos= yypos1033; yy->__thunkpos= yythunkpos1033; + } if (!yymatchDot(yy)) goto l1032; goto l1031; + l1032:; yy->__pos= yypos1032; yy->__thunkpos= yythunkpos1032; + } if (!yy_StyleClose(yy)) goto l1030; + yyprintf((stderr, " ok %s @ %s\n", "InStyleTags", yy->__buf+yy->__pos)); + return 1; + l1030:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "InStyleTags", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StyleClose(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StyleClose")); if (!yymatchChar(yy, '<')) goto l1034; if (!yy_Spnl(yy)) goto l1034; if (!yymatchChar(yy, '/')) goto l1034; + { int yypos1035= yy->__pos, yythunkpos1035= yy->__thunkpos; if (!yymatchString(yy, "style")) goto l1036; goto l1035; + l1036:; yy->__pos= yypos1035; yy->__thunkpos= yythunkpos1035; if (!yymatchString(yy, "STYLE")) goto l1034; + } + l1035:; if (!yy_Spnl(yy)) goto l1034; if (!yymatchChar(yy, '>')) goto l1034; + yyprintf((stderr, " ok %s @ %s\n", "StyleClose", yy->__buf+yy->__pos)); + return 1; + l1034:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StyleClose", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StyleOpen(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StyleOpen")); if (!yymatchChar(yy, '<')) goto l1037; if (!yy_Spnl(yy)) goto l1037; + { int yypos1038= yy->__pos, yythunkpos1038= yy->__thunkpos; if (!yymatchString(yy, "style")) goto l1039; goto l1038; + l1039:; yy->__pos= yypos1038; yy->__thunkpos= yythunkpos1038; if (!yymatchString(yy, "STYLE")) goto l1037; + } + l1038:; if (!yy_Spnl(yy)) goto l1037; + l1040:; + { int yypos1041= yy->__pos, yythunkpos1041= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1041; goto l1040; + l1041:; yy->__pos= yypos1041; yy->__thunkpos= yythunkpos1041; + } if (!yymatchChar(yy, '>')) goto l1037; + yyprintf((stderr, " ok %s @ %s\n", "StyleOpen", yy->__buf+yy->__pos)); + return 1; + l1037:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StyleOpen", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockType(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockType")); + { int yypos1043= yy->__pos, yythunkpos1043= yy->__thunkpos; if (!yymatchString(yy, "address")) goto l1044; goto l1043; + l1044:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "blockquote")) goto l1045; goto l1043; + l1045:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "center")) goto l1046; goto l1043; + l1046:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "dir")) goto l1047; goto l1043; + l1047:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "div")) goto l1048; goto l1043; + l1048:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "dl")) goto l1049; goto l1043; + l1049:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "fieldset")) goto l1050; goto l1043; + l1050:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "form")) goto l1051; goto l1043; + l1051:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h1")) goto l1052; goto l1043; + l1052:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h2")) goto l1053; goto l1043; + l1053:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h3")) goto l1054; goto l1043; + l1054:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h4")) goto l1055; goto l1043; + l1055:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h5")) goto l1056; goto l1043; + l1056:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "h6")) goto l1057; goto l1043; + l1057:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "hr")) goto l1058; goto l1043; + l1058:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "isindex")) goto l1059; goto l1043; + l1059:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "menu")) goto l1060; goto l1043; + l1060:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "noframes")) goto l1061; goto l1043; + l1061:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "noscript")) goto l1062; goto l1043; + l1062:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "ol")) goto l1063; goto l1043; + l1063:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchChar(yy, 'p')) goto l1064; goto l1043; + l1064:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "pre")) goto l1065; goto l1043; + l1065:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "table")) goto l1066; goto l1043; + l1066:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "ul")) goto l1067; goto l1043; + l1067:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "dd")) goto l1068; goto l1043; + l1068:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "dt")) goto l1069; goto l1043; + l1069:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "frameset")) goto l1070; goto l1043; + l1070:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "li")) goto l1071; goto l1043; + l1071:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "tbody")) goto l1072; goto l1043; + l1072:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "td")) goto l1073; goto l1043; + l1073:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "tfoot")) goto l1074; goto l1043; + l1074:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "th")) goto l1075; goto l1043; + l1075:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "thead")) goto l1076; goto l1043; + l1076:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "tr")) goto l1077; goto l1043; + l1077:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "script")) goto l1078; goto l1043; + l1078:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "ADDRESS")) goto l1079; goto l1043; + l1079:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "BLOCKQUOTE")) goto l1080; goto l1043; + l1080:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "CENTER")) goto l1081; goto l1043; + l1081:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "DIR")) goto l1082; goto l1043; + l1082:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "DIV")) goto l1083; goto l1043; + l1083:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "DL")) goto l1084; goto l1043; + l1084:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "FIELDSET")) goto l1085; goto l1043; + l1085:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "FORM")) goto l1086; goto l1043; + l1086:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H1")) goto l1087; goto l1043; + l1087:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H2")) goto l1088; goto l1043; + l1088:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H3")) goto l1089; goto l1043; + l1089:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H4")) goto l1090; goto l1043; + l1090:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H5")) goto l1091; goto l1043; + l1091:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "H6")) goto l1092; goto l1043; + l1092:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "HR")) goto l1093; goto l1043; + l1093:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "ISINDEX")) goto l1094; goto l1043; + l1094:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "MENU")) goto l1095; goto l1043; + l1095:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "NOFRAMES")) goto l1096; goto l1043; + l1096:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "NOSCRIPT")) goto l1097; goto l1043; + l1097:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "OL")) goto l1098; goto l1043; + l1098:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchChar(yy, 'P')) goto l1099; goto l1043; + l1099:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "PRE")) goto l1100; goto l1043; + l1100:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TABLE")) goto l1101; goto l1043; + l1101:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "UL")) goto l1102; goto l1043; + l1102:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "DD")) goto l1103; goto l1043; + l1103:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "DT")) goto l1104; goto l1043; + l1104:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "FRAMESET")) goto l1105; goto l1043; + l1105:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "LI")) goto l1106; goto l1043; + l1106:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TBODY")) goto l1107; goto l1043; + l1107:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TD")) goto l1108; goto l1043; + l1108:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TFOOT")) goto l1109; goto l1043; + l1109:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TH")) goto l1110; goto l1043; + l1110:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "THEAD")) goto l1111; goto l1043; + l1111:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "TR")) goto l1112; goto l1043; + l1112:; yy->__pos= yypos1043; yy->__thunkpos= yythunkpos1043; if (!yymatchString(yy, "SCRIPT")) goto l1042; + } + l1043:; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockType", yy->__buf+yy->__pos)); + return 1; + l1042:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockType", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Eof(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Eof")); + { int yypos1114= yy->__pos, yythunkpos1114= yy->__thunkpos; if (!yymatchDot(yy)) goto l1114; goto l1113; + l1114:; yy->__pos= yypos1114; yy->__thunkpos= yythunkpos1114; + } + yyprintf((stderr, " ok %s @ %s\n", "Eof", yy->__buf+yy->__pos)); + return 1; + l1113:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Eof", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FencedCodeBlockIndentation(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "FencedCodeBlockIndentation")); + { int yypos1116= yy->__pos, yythunkpos1116= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1116; goto l1117; + l1116:; yy->__pos= yypos1116; yy->__thunkpos= yythunkpos1116; + } + l1117:; + { int yypos1118= yy->__pos, yythunkpos1118= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1118; goto l1119; + l1118:; yy->__pos= yypos1118; yy->__thunkpos= yythunkpos1118; + } + l1119:; + { int yypos1120= yy->__pos, yythunkpos1120= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1120; goto l1121; + l1120:; yy->__pos= yypos1120; yy->__thunkpos= yythunkpos1120; + } + l1121:; + yyprintf((stderr, " ok %s @ %s\n", "FencedCodeBlockIndentation", yy->__buf+yy->__pos)); + return 1; + l1115:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FencedCodeBlockIndentation", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FencedCodeBlockLanguage(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "FencedCodeBlockLanguage")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1122; +#undef yytext +#undef yyleng + } + l1123:; + { int yypos1124= yy->__pos, yythunkpos1124= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\377\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377")) goto l1124; goto l1123; + l1124:; yy->__pos= yypos1124; yy->__thunkpos= yythunkpos1124; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1122; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_FencedCodeBlockLanguage, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FencedCodeBlockLanguage", yy->__buf+yy->__pos)); + return 1; + l1122:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FencedCodeBlockLanguage", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FencedCodeBlockMarker(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "FencedCodeBlockMarker")); + { int yypos1126= yy->__pos, yythunkpos1126= yy->__thunkpos; if (!yymatchString(yy, "```")) goto l1127; + l1128:; + { int yypos1129= yy->__pos, yythunkpos1129= yy->__thunkpos; if (!yymatchChar(yy, '`')) goto l1129; goto l1128; + l1129:; yy->__pos= yypos1129; yy->__thunkpos= yythunkpos1129; + } goto l1126; + l1127:; yy->__pos= yypos1126; yy->__thunkpos= yythunkpos1126; if (!yymatchString(yy, "~~~")) goto l1125; + l1130:; + { int yypos1131= yy->__pos, yythunkpos1131= yy->__thunkpos; if (!yymatchChar(yy, '~')) goto l1131; goto l1130; + l1131:; yy->__pos= yypos1131; yy->__thunkpos= yythunkpos1131; + } + } + l1126:; + yyprintf((stderr, " ok %s @ %s\n", "FencedCodeBlockMarker", yy->__buf+yy->__pos)); + return 1; + l1125:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FencedCodeBlockMarker", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FencedCodeBlockPreceedingIndentation(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "FencedCodeBlockPreceedingIndentation")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1132; +#undef yytext +#undef yyleng + } if (!yy_FencedCodeBlockIndentation(yy)) goto l1132; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1132; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_FencedCodeBlockPreceedingIndentation, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FencedCodeBlockPreceedingIndentation", yy->__buf+yy->__pos)); + return 1; + l1132:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FencedCodeBlockPreceedingIndentation", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockSelfClosing(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockSelfClosing")); if (!yymatchChar(yy, '<')) goto l1133; if (!yy_Spnl(yy)) goto l1133; if (!yy_HtmlBlockType(yy)) goto l1133; if (!yy_Spnl(yy)) goto l1133; + l1134:; + { int yypos1135= yy->__pos, yythunkpos1135= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1135; goto l1134; + l1135:; yy->__pos= yypos1135; yy->__thunkpos= yythunkpos1135; + } if (!yymatchChar(yy, '/')) goto l1133; if (!yy_Spnl(yy)) goto l1133; if (!yymatchChar(yy, '>')) goto l1133; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockSelfClosing", yy->__buf+yy->__pos)); + return 1; + l1133:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockSelfClosing", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlComment(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlComment")); if (!yymatchString(yy, "")) goto l1139; goto l1138; + l1139:; yy->__pos= yypos1139; yy->__thunkpos= yythunkpos1139; + } if (!yymatchDot(yy)) goto l1138; goto l1137; + l1138:; yy->__pos= yypos1138; yy->__thunkpos= yythunkpos1138; + } if (!yymatchString(yy, "-->")) goto l1136; + yyprintf((stderr, " ok %s @ %s\n", "HtmlComment", yy->__buf+yy->__pos)); + return 1; + l1136:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlComment", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MarkdownHtmlTagOpen(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "MarkdownHtmlTagOpen")); if (!yy_StartList(yy)) goto l1140; yyDo(yy, yySet, -1, 0); if (!yymatchChar(yy, '<')) goto l1140; yyDo(yy, yy_1_MarkdownHtmlTagOpen, yy->__begin, yy->__end); if (!yy_Spnl(yy)) goto l1140; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1140; +#undef yytext +#undef yyleng + } if (!yy_HtmlBlockType(yy)) goto l1140; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1140; +#undef yytext +#undef yyleng + } yyDo(yy, yy_2_MarkdownHtmlTagOpen, yy->__begin, yy->__end); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1140; +#undef yytext +#undef yyleng + } if (!yy_Spnl(yy)) goto l1140; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1140; +#undef yytext +#undef yyleng + } yyDo(yy, yy_3_MarkdownHtmlTagOpen, yy->__begin, yy->__end); + l1141:; + { int yypos1142= yy->__pos, yythunkpos1142= yy->__thunkpos; + { int yypos1143= yy->__pos, yythunkpos1143= yy->__thunkpos; if (!yy_MarkdownHtmlAttribute(yy)) goto l1143; goto l1142; + l1143:; yy->__pos= yypos1143; yy->__thunkpos= yythunkpos1143; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1142; +#undef yytext +#undef yyleng + } if (!yy_HtmlAttribute(yy)) goto l1142; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1142; +#undef yytext +#undef yyleng + } yyDo(yy, yy_4_MarkdownHtmlTagOpen, yy->__begin, yy->__end); goto l1141; + l1142:; yy->__pos= yypos1142; yy->__thunkpos= yythunkpos1142; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1140; +#undef yytext +#undef yyleng + } if (!yy_MarkdownHtmlAttribute(yy)) goto l1140; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1140; +#undef yytext +#undef yyleng + } yyDo(yy, yy_5_MarkdownHtmlTagOpen, yy->__begin, yy->__end); + l1144:; + { int yypos1145= yy->__pos, yythunkpos1145= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1145; +#undef yytext +#undef yyleng + } if (!yy_HtmlAttribute(yy)) goto l1145; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1145; +#undef yytext +#undef yyleng + } yyDo(yy, yy_6_MarkdownHtmlTagOpen, yy->__begin, yy->__end); goto l1144; + l1145:; yy->__pos= yypos1145; yy->__thunkpos= yythunkpos1145; + } if (!yymatchChar(yy, '>')) goto l1140; yyDo(yy, yy_7_MarkdownHtmlTagOpen, yy->__begin, yy->__end); yyDo(yy, yy_8_MarkdownHtmlTagOpen, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MarkdownHtmlTagOpen", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1140:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MarkdownHtmlTagOpen", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockInTags(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockInTags")); + { int yypos1147= yy->__pos, yythunkpos1147= yy->__thunkpos; if (!yy_HtmlBlockAddress(yy)) goto l1148; goto l1147; + l1148:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockArticle(yy)) goto l1149; goto l1147; + l1149:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockAside(yy)) goto l1150; goto l1147; + l1150:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockCanvas(yy)) goto l1151; goto l1147; + l1151:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockBlockquote(yy)) goto l1152; goto l1147; + l1152:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockCenter(yy)) goto l1153; goto l1147; + l1153:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockDir(yy)) goto l1154; goto l1147; + l1154:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockDiv(yy)) goto l1155; goto l1147; + l1155:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockDl(yy)) goto l1156; goto l1147; + l1156:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockFieldset(yy)) goto l1157; goto l1147; + l1157:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockFigure(yy)) goto l1158; goto l1147; + l1158:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockFooter(yy)) goto l1159; goto l1147; + l1159:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockForm(yy)) goto l1160; goto l1147; + l1160:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockHeader(yy)) goto l1161; goto l1147; + l1161:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockHgroup(yy)) goto l1162; goto l1147; + l1162:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH1(yy)) goto l1163; goto l1147; + l1163:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH2(yy)) goto l1164; goto l1147; + l1164:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH3(yy)) goto l1165; goto l1147; + l1165:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH4(yy)) goto l1166; goto l1147; + l1166:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH5(yy)) goto l1167; goto l1147; + l1167:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockH6(yy)) goto l1168; goto l1147; + l1168:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockMenu(yy)) goto l1169; goto l1147; + l1169:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockNoframes(yy)) goto l1170; goto l1147; + l1170:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockNoscript(yy)) goto l1171; goto l1147; + l1171:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockOl(yy)) goto l1172; goto l1147; + l1172:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockP(yy)) goto l1173; goto l1147; + l1173:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockPre(yy)) goto l1174; goto l1147; + l1174:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockProgress(yy)) goto l1175; goto l1147; + l1175:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockSection(yy)) goto l1176; goto l1147; + l1176:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTable(yy)) goto l1177; goto l1147; + l1177:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockUl(yy)) goto l1178; goto l1147; + l1178:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockVideo(yy)) goto l1179; goto l1147; + l1179:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockDd(yy)) goto l1180; goto l1147; + l1180:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockDt(yy)) goto l1181; goto l1147; + l1181:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockFrameset(yy)) goto l1182; goto l1147; + l1182:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockLi(yy)) goto l1183; goto l1147; + l1183:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTbody(yy)) goto l1184; goto l1147; + l1184:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTd(yy)) goto l1185; goto l1147; + l1185:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTfoot(yy)) goto l1186; goto l1147; + l1186:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTh(yy)) goto l1187; goto l1147; + l1187:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockThead(yy)) goto l1188; goto l1147; + l1188:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockTr(yy)) goto l1189; goto l1147; + l1189:; yy->__pos= yypos1147; yy->__thunkpos= yythunkpos1147; if (!yy_HtmlBlockScript(yy)) goto l1146; + } + l1147:; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockInTags", yy->__buf+yy->__pos)); + return 1; + l1146:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockInTags", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockScript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockScript")); if (!yy_HtmlBlockOpenScript(yy)) goto l1190; + l1191:; + { int yypos1192= yy->__pos, yythunkpos1192= yy->__thunkpos; + { int yypos1193= yy->__pos, yythunkpos1193= yy->__thunkpos; if (!yy_HtmlBlockCloseScript(yy)) goto l1193; goto l1192; + l1193:; yy->__pos= yypos1193; yy->__thunkpos= yythunkpos1193; + } if (!yymatchDot(yy)) goto l1192; goto l1191; + l1192:; yy->__pos= yypos1192; yy->__thunkpos= yythunkpos1192; + } if (!yy_HtmlBlockCloseScript(yy)) goto l1190; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockScript", yy->__buf+yy->__pos)); + return 1; + l1190:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockScript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseScript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseScript")); if (!yymatchChar(yy, '<')) goto l1194; if (!yy_Spnl(yy)) goto l1194; if (!yymatchChar(yy, '/')) goto l1194; + { int yypos1195= yy->__pos, yythunkpos1195= yy->__thunkpos; if (!yymatchString(yy, "script")) goto l1196; goto l1195; + l1196:; yy->__pos= yypos1195; yy->__thunkpos= yythunkpos1195; if (!yymatchString(yy, "SCRIPT")) goto l1194; + } + l1195:; if (!yy_Spnl(yy)) goto l1194; if (!yymatchChar(yy, '>')) goto l1194; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseScript", yy->__buf+yy->__pos)); + return 1; + l1194:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseScript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenScript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenScript")); if (!yymatchChar(yy, '<')) goto l1197; if (!yy_Spnl(yy)) goto l1197; + { int yypos1198= yy->__pos, yythunkpos1198= yy->__thunkpos; if (!yymatchString(yy, "script")) goto l1199; goto l1198; + l1199:; yy->__pos= yypos1198; yy->__thunkpos= yythunkpos1198; if (!yymatchString(yy, "SCRIPT")) goto l1197; + } + l1198:; if (!yy_Spnl(yy)) goto l1197; + l1200:; + { int yypos1201= yy->__pos, yythunkpos1201= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1201; goto l1200; + l1201:; yy->__pos= yypos1201; yy->__thunkpos= yythunkpos1201; + } if (!yymatchChar(yy, '>')) goto l1197; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenScript", yy->__buf+yy->__pos)); + return 1; + l1197:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenScript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTr(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTr")); if (!yy_HtmlBlockOpenTr(yy)) goto l1202; + l1203:; + { int yypos1204= yy->__pos, yythunkpos1204= yy->__thunkpos; + { int yypos1205= yy->__pos, yythunkpos1205= yy->__thunkpos; if (!yy_HtmlBlockTr(yy)) goto l1206; goto l1205; + l1206:; yy->__pos= yypos1205; yy->__thunkpos= yythunkpos1205; + { int yypos1207= yy->__pos, yythunkpos1207= yy->__thunkpos; if (!yy_HtmlBlockCloseTr(yy)) goto l1207; goto l1204; + l1207:; yy->__pos= yypos1207; yy->__thunkpos= yythunkpos1207; + } if (!yymatchDot(yy)) goto l1204; + } + l1205:; goto l1203; + l1204:; yy->__pos= yypos1204; yy->__thunkpos= yythunkpos1204; + } if (!yy_HtmlBlockCloseTr(yy)) goto l1202; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTr", yy->__buf+yy->__pos)); + return 1; + l1202:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTr", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTr(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTr")); if (!yymatchChar(yy, '<')) goto l1208; if (!yy_Spnl(yy)) goto l1208; if (!yymatchChar(yy, '/')) goto l1208; + { int yypos1209= yy->__pos, yythunkpos1209= yy->__thunkpos; if (!yymatchString(yy, "tr")) goto l1210; goto l1209; + l1210:; yy->__pos= yypos1209; yy->__thunkpos= yythunkpos1209; if (!yymatchString(yy, "TR")) goto l1208; + } + l1209:; if (!yy_Spnl(yy)) goto l1208; if (!yymatchChar(yy, '>')) goto l1208; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTr", yy->__buf+yy->__pos)); + return 1; + l1208:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTr", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTr(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTr")); if (!yymatchChar(yy, '<')) goto l1211; if (!yy_Spnl(yy)) goto l1211; + { int yypos1212= yy->__pos, yythunkpos1212= yy->__thunkpos; if (!yymatchString(yy, "tr")) goto l1213; goto l1212; + l1213:; yy->__pos= yypos1212; yy->__thunkpos= yythunkpos1212; if (!yymatchString(yy, "TR")) goto l1211; + } + l1212:; if (!yy_Spnl(yy)) goto l1211; + l1214:; + { int yypos1215= yy->__pos, yythunkpos1215= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1215; goto l1214; + l1215:; yy->__pos= yypos1215; yy->__thunkpos= yythunkpos1215; + } if (!yymatchChar(yy, '>')) goto l1211; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTr", yy->__buf+yy->__pos)); + return 1; + l1211:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTr", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockThead(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockThead")); if (!yy_HtmlBlockOpenThead(yy)) goto l1216; + l1217:; + { int yypos1218= yy->__pos, yythunkpos1218= yy->__thunkpos; + { int yypos1219= yy->__pos, yythunkpos1219= yy->__thunkpos; if (!yy_HtmlBlockThead(yy)) goto l1220; goto l1219; + l1220:; yy->__pos= yypos1219; yy->__thunkpos= yythunkpos1219; + { int yypos1221= yy->__pos, yythunkpos1221= yy->__thunkpos; if (!yy_HtmlBlockCloseThead(yy)) goto l1221; goto l1218; + l1221:; yy->__pos= yypos1221; yy->__thunkpos= yythunkpos1221; + } if (!yymatchDot(yy)) goto l1218; + } + l1219:; goto l1217; + l1218:; yy->__pos= yypos1218; yy->__thunkpos= yythunkpos1218; + } if (!yy_HtmlBlockCloseThead(yy)) goto l1216; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockThead", yy->__buf+yy->__pos)); + return 1; + l1216:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockThead", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseThead(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseThead")); if (!yymatchChar(yy, '<')) goto l1222; if (!yy_Spnl(yy)) goto l1222; if (!yymatchChar(yy, '/')) goto l1222; + { int yypos1223= yy->__pos, yythunkpos1223= yy->__thunkpos; if (!yymatchString(yy, "thead")) goto l1224; goto l1223; + l1224:; yy->__pos= yypos1223; yy->__thunkpos= yythunkpos1223; if (!yymatchString(yy, "THEAD")) goto l1222; + } + l1223:; if (!yy_Spnl(yy)) goto l1222; if (!yymatchChar(yy, '>')) goto l1222; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseThead", yy->__buf+yy->__pos)); + return 1; + l1222:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseThead", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenThead(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenThead")); if (!yymatchChar(yy, '<')) goto l1225; if (!yy_Spnl(yy)) goto l1225; + { int yypos1226= yy->__pos, yythunkpos1226= yy->__thunkpos; if (!yymatchString(yy, "thead")) goto l1227; goto l1226; + l1227:; yy->__pos= yypos1226; yy->__thunkpos= yythunkpos1226; if (!yymatchString(yy, "THEAD")) goto l1225; + } + l1226:; if (!yy_Spnl(yy)) goto l1225; + l1228:; + { int yypos1229= yy->__pos, yythunkpos1229= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1229; goto l1228; + l1229:; yy->__pos= yypos1229; yy->__thunkpos= yythunkpos1229; + } if (!yymatchChar(yy, '>')) goto l1225; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenThead", yy->__buf+yy->__pos)); + return 1; + l1225:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenThead", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTh(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTh")); if (!yy_HtmlBlockOpenTh(yy)) goto l1230; + l1231:; + { int yypos1232= yy->__pos, yythunkpos1232= yy->__thunkpos; + { int yypos1233= yy->__pos, yythunkpos1233= yy->__thunkpos; if (!yy_HtmlBlockTh(yy)) goto l1234; goto l1233; + l1234:; yy->__pos= yypos1233; yy->__thunkpos= yythunkpos1233; + { int yypos1235= yy->__pos, yythunkpos1235= yy->__thunkpos; if (!yy_HtmlBlockCloseTh(yy)) goto l1235; goto l1232; + l1235:; yy->__pos= yypos1235; yy->__thunkpos= yythunkpos1235; + } if (!yymatchDot(yy)) goto l1232; + } + l1233:; goto l1231; + l1232:; yy->__pos= yypos1232; yy->__thunkpos= yythunkpos1232; + } if (!yy_HtmlBlockCloseTh(yy)) goto l1230; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTh", yy->__buf+yy->__pos)); + return 1; + l1230:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTh", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTh(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTh")); if (!yymatchChar(yy, '<')) goto l1236; if (!yy_Spnl(yy)) goto l1236; if (!yymatchChar(yy, '/')) goto l1236; + { int yypos1237= yy->__pos, yythunkpos1237= yy->__thunkpos; if (!yymatchString(yy, "th")) goto l1238; goto l1237; + l1238:; yy->__pos= yypos1237; yy->__thunkpos= yythunkpos1237; if (!yymatchString(yy, "TH")) goto l1236; + } + l1237:; if (!yy_Spnl(yy)) goto l1236; if (!yymatchChar(yy, '>')) goto l1236; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTh", yy->__buf+yy->__pos)); + return 1; + l1236:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTh", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTh(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTh")); if (!yymatchChar(yy, '<')) goto l1239; if (!yy_Spnl(yy)) goto l1239; + { int yypos1240= yy->__pos, yythunkpos1240= yy->__thunkpos; if (!yymatchString(yy, "th")) goto l1241; goto l1240; + l1241:; yy->__pos= yypos1240; yy->__thunkpos= yythunkpos1240; if (!yymatchString(yy, "TH")) goto l1239; + } + l1240:; if (!yy_Spnl(yy)) goto l1239; + l1242:; + { int yypos1243= yy->__pos, yythunkpos1243= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1243; goto l1242; + l1243:; yy->__pos= yypos1243; yy->__thunkpos= yythunkpos1243; + } if (!yymatchChar(yy, '>')) goto l1239; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTh", yy->__buf+yy->__pos)); + return 1; + l1239:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTh", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTfoot(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTfoot")); if (!yy_HtmlBlockOpenTfoot(yy)) goto l1244; + l1245:; + { int yypos1246= yy->__pos, yythunkpos1246= yy->__thunkpos; + { int yypos1247= yy->__pos, yythunkpos1247= yy->__thunkpos; if (!yy_HtmlBlockTfoot(yy)) goto l1248; goto l1247; + l1248:; yy->__pos= yypos1247; yy->__thunkpos= yythunkpos1247; + { int yypos1249= yy->__pos, yythunkpos1249= yy->__thunkpos; if (!yy_HtmlBlockCloseTfoot(yy)) goto l1249; goto l1246; + l1249:; yy->__pos= yypos1249; yy->__thunkpos= yythunkpos1249; + } if (!yymatchDot(yy)) goto l1246; + } + l1247:; goto l1245; + l1246:; yy->__pos= yypos1246; yy->__thunkpos= yythunkpos1246; + } if (!yy_HtmlBlockCloseTfoot(yy)) goto l1244; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTfoot", yy->__buf+yy->__pos)); + return 1; + l1244:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTfoot", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTfoot(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTfoot")); if (!yymatchChar(yy, '<')) goto l1250; if (!yy_Spnl(yy)) goto l1250; if (!yymatchChar(yy, '/')) goto l1250; + { int yypos1251= yy->__pos, yythunkpos1251= yy->__thunkpos; if (!yymatchString(yy, "tfoot")) goto l1252; goto l1251; + l1252:; yy->__pos= yypos1251; yy->__thunkpos= yythunkpos1251; if (!yymatchString(yy, "TFOOT")) goto l1250; + } + l1251:; if (!yy_Spnl(yy)) goto l1250; if (!yymatchChar(yy, '>')) goto l1250; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTfoot", yy->__buf+yy->__pos)); + return 1; + l1250:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTfoot", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTfoot(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTfoot")); if (!yymatchChar(yy, '<')) goto l1253; if (!yy_Spnl(yy)) goto l1253; + { int yypos1254= yy->__pos, yythunkpos1254= yy->__thunkpos; if (!yymatchString(yy, "tfoot")) goto l1255; goto l1254; + l1255:; yy->__pos= yypos1254; yy->__thunkpos= yythunkpos1254; if (!yymatchString(yy, "TFOOT")) goto l1253; + } + l1254:; if (!yy_Spnl(yy)) goto l1253; + l1256:; + { int yypos1257= yy->__pos, yythunkpos1257= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1257; goto l1256; + l1257:; yy->__pos= yypos1257; yy->__thunkpos= yythunkpos1257; + } if (!yymatchChar(yy, '>')) goto l1253; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTfoot", yy->__buf+yy->__pos)); + return 1; + l1253:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTfoot", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTd")); if (!yy_HtmlBlockOpenTd(yy)) goto l1258; + l1259:; + { int yypos1260= yy->__pos, yythunkpos1260= yy->__thunkpos; + { int yypos1261= yy->__pos, yythunkpos1261= yy->__thunkpos; if (!yy_HtmlBlockTd(yy)) goto l1262; goto l1261; + l1262:; yy->__pos= yypos1261; yy->__thunkpos= yythunkpos1261; + { int yypos1263= yy->__pos, yythunkpos1263= yy->__thunkpos; if (!yy_HtmlBlockCloseTd(yy)) goto l1263; goto l1260; + l1263:; yy->__pos= yypos1263; yy->__thunkpos= yythunkpos1263; + } if (!yymatchDot(yy)) goto l1260; + } + l1261:; goto l1259; + l1260:; yy->__pos= yypos1260; yy->__thunkpos= yythunkpos1260; + } if (!yy_HtmlBlockCloseTd(yy)) goto l1258; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTd", yy->__buf+yy->__pos)); + return 1; + l1258:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTd")); if (!yymatchChar(yy, '<')) goto l1264; if (!yy_Spnl(yy)) goto l1264; if (!yymatchChar(yy, '/')) goto l1264; + { int yypos1265= yy->__pos, yythunkpos1265= yy->__thunkpos; if (!yymatchString(yy, "td")) goto l1266; goto l1265; + l1266:; yy->__pos= yypos1265; yy->__thunkpos= yythunkpos1265; if (!yymatchString(yy, "TD")) goto l1264; + } + l1265:; if (!yy_Spnl(yy)) goto l1264; if (!yymatchChar(yy, '>')) goto l1264; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTd", yy->__buf+yy->__pos)); + return 1; + l1264:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTd")); if (!yymatchChar(yy, '<')) goto l1267; if (!yy_Spnl(yy)) goto l1267; + { int yypos1268= yy->__pos, yythunkpos1268= yy->__thunkpos; if (!yymatchString(yy, "td")) goto l1269; goto l1268; + l1269:; yy->__pos= yypos1268; yy->__thunkpos= yythunkpos1268; if (!yymatchString(yy, "TD")) goto l1267; + } + l1268:; if (!yy_Spnl(yy)) goto l1267; + l1270:; + { int yypos1271= yy->__pos, yythunkpos1271= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1271; goto l1270; + l1271:; yy->__pos= yypos1271; yy->__thunkpos= yythunkpos1271; + } if (!yymatchChar(yy, '>')) goto l1267; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTd", yy->__buf+yy->__pos)); + return 1; + l1267:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTbody(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTbody")); if (!yy_HtmlBlockOpenTbody(yy)) goto l1272; + l1273:; + { int yypos1274= yy->__pos, yythunkpos1274= yy->__thunkpos; + { int yypos1275= yy->__pos, yythunkpos1275= yy->__thunkpos; if (!yy_HtmlBlockTbody(yy)) goto l1276; goto l1275; + l1276:; yy->__pos= yypos1275; yy->__thunkpos= yythunkpos1275; + { int yypos1277= yy->__pos, yythunkpos1277= yy->__thunkpos; if (!yy_HtmlBlockCloseTbody(yy)) goto l1277; goto l1274; + l1277:; yy->__pos= yypos1277; yy->__thunkpos= yythunkpos1277; + } if (!yymatchDot(yy)) goto l1274; + } + l1275:; goto l1273; + l1274:; yy->__pos= yypos1274; yy->__thunkpos= yythunkpos1274; + } if (!yy_HtmlBlockCloseTbody(yy)) goto l1272; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTbody", yy->__buf+yy->__pos)); + return 1; + l1272:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTbody", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTbody(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTbody")); if (!yymatchChar(yy, '<')) goto l1278; if (!yy_Spnl(yy)) goto l1278; if (!yymatchChar(yy, '/')) goto l1278; + { int yypos1279= yy->__pos, yythunkpos1279= yy->__thunkpos; if (!yymatchString(yy, "tbody")) goto l1280; goto l1279; + l1280:; yy->__pos= yypos1279; yy->__thunkpos= yythunkpos1279; if (!yymatchString(yy, "TBODY")) goto l1278; + } + l1279:; if (!yy_Spnl(yy)) goto l1278; if (!yymatchChar(yy, '>')) goto l1278; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTbody", yy->__buf+yy->__pos)); + return 1; + l1278:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTbody", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTbody(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTbody")); if (!yymatchChar(yy, '<')) goto l1281; if (!yy_Spnl(yy)) goto l1281; + { int yypos1282= yy->__pos, yythunkpos1282= yy->__thunkpos; if (!yymatchString(yy, "tbody")) goto l1283; goto l1282; + l1283:; yy->__pos= yypos1282; yy->__thunkpos= yythunkpos1282; if (!yymatchString(yy, "TBODY")) goto l1281; + } + l1282:; if (!yy_Spnl(yy)) goto l1281; + l1284:; + { int yypos1285= yy->__pos, yythunkpos1285= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1285; goto l1284; + l1285:; yy->__pos= yypos1285; yy->__thunkpos= yythunkpos1285; + } if (!yymatchChar(yy, '>')) goto l1281; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTbody", yy->__buf+yy->__pos)); + return 1; + l1281:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTbody", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockLi(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockLi")); if (!yy_HtmlBlockOpenLi(yy)) goto l1286; + l1287:; + { int yypos1288= yy->__pos, yythunkpos1288= yy->__thunkpos; + { int yypos1289= yy->__pos, yythunkpos1289= yy->__thunkpos; if (!yy_HtmlBlockLi(yy)) goto l1290; goto l1289; + l1290:; yy->__pos= yypos1289; yy->__thunkpos= yythunkpos1289; + { int yypos1291= yy->__pos, yythunkpos1291= yy->__thunkpos; if (!yy_HtmlBlockCloseLi(yy)) goto l1291; goto l1288; + l1291:; yy->__pos= yypos1291; yy->__thunkpos= yythunkpos1291; + } if (!yymatchDot(yy)) goto l1288; + } + l1289:; goto l1287; + l1288:; yy->__pos= yypos1288; yy->__thunkpos= yythunkpos1288; + } if (!yy_HtmlBlockCloseLi(yy)) goto l1286; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockLi", yy->__buf+yy->__pos)); + return 1; + l1286:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockLi", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseLi(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseLi")); if (!yymatchChar(yy, '<')) goto l1292; if (!yy_Spnl(yy)) goto l1292; if (!yymatchChar(yy, '/')) goto l1292; + { int yypos1293= yy->__pos, yythunkpos1293= yy->__thunkpos; if (!yymatchString(yy, "li")) goto l1294; goto l1293; + l1294:; yy->__pos= yypos1293; yy->__thunkpos= yythunkpos1293; if (!yymatchString(yy, "LI")) goto l1292; + } + l1293:; if (!yy_Spnl(yy)) goto l1292; if (!yymatchChar(yy, '>')) goto l1292; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseLi", yy->__buf+yy->__pos)); + return 1; + l1292:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseLi", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenLi(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenLi")); if (!yymatchChar(yy, '<')) goto l1295; if (!yy_Spnl(yy)) goto l1295; + { int yypos1296= yy->__pos, yythunkpos1296= yy->__thunkpos; if (!yymatchString(yy, "li")) goto l1297; goto l1296; + l1297:; yy->__pos= yypos1296; yy->__thunkpos= yythunkpos1296; if (!yymatchString(yy, "LI")) goto l1295; + } + l1296:; if (!yy_Spnl(yy)) goto l1295; + l1298:; + { int yypos1299= yy->__pos, yythunkpos1299= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1299; goto l1298; + l1299:; yy->__pos= yypos1299; yy->__thunkpos= yythunkpos1299; + } if (!yymatchChar(yy, '>')) goto l1295; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenLi", yy->__buf+yy->__pos)); + return 1; + l1295:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenLi", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockFrameset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockFrameset")); if (!yy_HtmlBlockOpenFrameset(yy)) goto l1300; + l1301:; + { int yypos1302= yy->__pos, yythunkpos1302= yy->__thunkpos; + { int yypos1303= yy->__pos, yythunkpos1303= yy->__thunkpos; if (!yy_HtmlBlockFrameset(yy)) goto l1304; goto l1303; + l1304:; yy->__pos= yypos1303; yy->__thunkpos= yythunkpos1303; + { int yypos1305= yy->__pos, yythunkpos1305= yy->__thunkpos; if (!yy_HtmlBlockCloseFrameset(yy)) goto l1305; goto l1302; + l1305:; yy->__pos= yypos1305; yy->__thunkpos= yythunkpos1305; + } if (!yymatchDot(yy)) goto l1302; + } + l1303:; goto l1301; + l1302:; yy->__pos= yypos1302; yy->__thunkpos= yythunkpos1302; + } if (!yy_HtmlBlockCloseFrameset(yy)) goto l1300; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockFrameset", yy->__buf+yy->__pos)); + return 1; + l1300:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockFrameset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseFrameset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseFrameset")); if (!yymatchChar(yy, '<')) goto l1306; if (!yy_Spnl(yy)) goto l1306; if (!yymatchChar(yy, '/')) goto l1306; + { int yypos1307= yy->__pos, yythunkpos1307= yy->__thunkpos; if (!yymatchString(yy, "frameset")) goto l1308; goto l1307; + l1308:; yy->__pos= yypos1307; yy->__thunkpos= yythunkpos1307; if (!yymatchString(yy, "FRAMESET")) goto l1306; + } + l1307:; if (!yy_Spnl(yy)) goto l1306; if (!yymatchChar(yy, '>')) goto l1306; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseFrameset", yy->__buf+yy->__pos)); + return 1; + l1306:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseFrameset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenFrameset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenFrameset")); if (!yymatchChar(yy, '<')) goto l1309; if (!yy_Spnl(yy)) goto l1309; + { int yypos1310= yy->__pos, yythunkpos1310= yy->__thunkpos; if (!yymatchString(yy, "frameset")) goto l1311; goto l1310; + l1311:; yy->__pos= yypos1310; yy->__thunkpos= yythunkpos1310; if (!yymatchString(yy, "FRAMESET")) goto l1309; + } + l1310:; if (!yy_Spnl(yy)) goto l1309; + l1312:; + { int yypos1313= yy->__pos, yythunkpos1313= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1313; goto l1312; + l1313:; yy->__pos= yypos1313; yy->__thunkpos= yythunkpos1313; + } if (!yymatchChar(yy, '>')) goto l1309; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenFrameset", yy->__buf+yy->__pos)); + return 1; + l1309:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenFrameset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockDt(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockDt")); if (!yy_HtmlBlockOpenDt(yy)) goto l1314; + l1315:; + { int yypos1316= yy->__pos, yythunkpos1316= yy->__thunkpos; + { int yypos1317= yy->__pos, yythunkpos1317= yy->__thunkpos; if (!yy_HtmlBlockDt(yy)) goto l1318; goto l1317; + l1318:; yy->__pos= yypos1317; yy->__thunkpos= yythunkpos1317; + { int yypos1319= yy->__pos, yythunkpos1319= yy->__thunkpos; if (!yy_HtmlBlockCloseDt(yy)) goto l1319; goto l1316; + l1319:; yy->__pos= yypos1319; yy->__thunkpos= yythunkpos1319; + } if (!yymatchDot(yy)) goto l1316; + } + l1317:; goto l1315; + l1316:; yy->__pos= yypos1316; yy->__thunkpos= yythunkpos1316; + } if (!yy_HtmlBlockCloseDt(yy)) goto l1314; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockDt", yy->__buf+yy->__pos)); + return 1; + l1314:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockDt", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseDt(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseDt")); if (!yymatchChar(yy, '<')) goto l1320; if (!yy_Spnl(yy)) goto l1320; if (!yymatchChar(yy, '/')) goto l1320; + { int yypos1321= yy->__pos, yythunkpos1321= yy->__thunkpos; if (!yymatchString(yy, "dt")) goto l1322; goto l1321; + l1322:; yy->__pos= yypos1321; yy->__thunkpos= yythunkpos1321; if (!yymatchString(yy, "DT")) goto l1320; + } + l1321:; if (!yy_Spnl(yy)) goto l1320; if (!yymatchChar(yy, '>')) goto l1320; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseDt", yy->__buf+yy->__pos)); + return 1; + l1320:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseDt", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenDt(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenDt")); if (!yymatchChar(yy, '<')) goto l1323; if (!yy_Spnl(yy)) goto l1323; + { int yypos1324= yy->__pos, yythunkpos1324= yy->__thunkpos; if (!yymatchString(yy, "dt")) goto l1325; goto l1324; + l1325:; yy->__pos= yypos1324; yy->__thunkpos= yythunkpos1324; if (!yymatchString(yy, "DT")) goto l1323; + } + l1324:; if (!yy_Spnl(yy)) goto l1323; + l1326:; + { int yypos1327= yy->__pos, yythunkpos1327= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1327; goto l1326; + l1327:; yy->__pos= yypos1327; yy->__thunkpos= yythunkpos1327; + } if (!yymatchChar(yy, '>')) goto l1323; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenDt", yy->__buf+yy->__pos)); + return 1; + l1323:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenDt", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockDd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockDd")); if (!yy_HtmlBlockOpenDd(yy)) goto l1328; + l1329:; + { int yypos1330= yy->__pos, yythunkpos1330= yy->__thunkpos; + { int yypos1331= yy->__pos, yythunkpos1331= yy->__thunkpos; if (!yy_HtmlBlockDd(yy)) goto l1332; goto l1331; + l1332:; yy->__pos= yypos1331; yy->__thunkpos= yythunkpos1331; + { int yypos1333= yy->__pos, yythunkpos1333= yy->__thunkpos; if (!yy_HtmlBlockCloseDd(yy)) goto l1333; goto l1330; + l1333:; yy->__pos= yypos1333; yy->__thunkpos= yythunkpos1333; + } if (!yymatchDot(yy)) goto l1330; + } + l1331:; goto l1329; + l1330:; yy->__pos= yypos1330; yy->__thunkpos= yythunkpos1330; + } if (!yy_HtmlBlockCloseDd(yy)) goto l1328; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockDd", yy->__buf+yy->__pos)); + return 1; + l1328:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockDd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseDd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseDd")); if (!yymatchChar(yy, '<')) goto l1334; if (!yy_Spnl(yy)) goto l1334; if (!yymatchChar(yy, '/')) goto l1334; + { int yypos1335= yy->__pos, yythunkpos1335= yy->__thunkpos; if (!yymatchString(yy, "dd")) goto l1336; goto l1335; + l1336:; yy->__pos= yypos1335; yy->__thunkpos= yythunkpos1335; if (!yymatchString(yy, "DD")) goto l1334; + } + l1335:; if (!yy_Spnl(yy)) goto l1334; if (!yymatchChar(yy, '>')) goto l1334; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseDd", yy->__buf+yy->__pos)); + return 1; + l1334:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseDd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenDd(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenDd")); if (!yymatchChar(yy, '<')) goto l1337; if (!yy_Spnl(yy)) goto l1337; + { int yypos1338= yy->__pos, yythunkpos1338= yy->__thunkpos; if (!yymatchString(yy, "dd")) goto l1339; goto l1338; + l1339:; yy->__pos= yypos1338; yy->__thunkpos= yythunkpos1338; if (!yymatchString(yy, "DD")) goto l1337; + } + l1338:; if (!yy_Spnl(yy)) goto l1337; + l1340:; + { int yypos1341= yy->__pos, yythunkpos1341= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1341; goto l1340; + l1341:; yy->__pos= yypos1341; yy->__thunkpos= yythunkpos1341; + } if (!yymatchChar(yy, '>')) goto l1337; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenDd", yy->__buf+yy->__pos)); + return 1; + l1337:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenDd", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockVideo(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockVideo")); if (!yy_HtmlBlockOpenVideo(yy)) goto l1342; + l1343:; + { int yypos1344= yy->__pos, yythunkpos1344= yy->__thunkpos; + { int yypos1345= yy->__pos, yythunkpos1345= yy->__thunkpos; if (!yy_HtmlBlockVideo(yy)) goto l1346; goto l1345; + l1346:; yy->__pos= yypos1345; yy->__thunkpos= yythunkpos1345; + { int yypos1347= yy->__pos, yythunkpos1347= yy->__thunkpos; if (!yy_HtmlBlockCloseVideo(yy)) goto l1347; goto l1344; + l1347:; yy->__pos= yypos1347; yy->__thunkpos= yythunkpos1347; + } if (!yymatchDot(yy)) goto l1344; + } + l1345:; goto l1343; + l1344:; yy->__pos= yypos1344; yy->__thunkpos= yythunkpos1344; + } if (!yy_HtmlBlockCloseVideo(yy)) goto l1342; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockVideo", yy->__buf+yy->__pos)); + return 1; + l1342:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockVideo", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseVideo(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseVideo")); if (!yymatchChar(yy, '<')) goto l1348; if (!yy_Spnl(yy)) goto l1348; if (!yymatchChar(yy, '/')) goto l1348; + { int yypos1349= yy->__pos, yythunkpos1349= yy->__thunkpos; if (!yymatchString(yy, "video")) goto l1350; goto l1349; + l1350:; yy->__pos= yypos1349; yy->__thunkpos= yythunkpos1349; if (!yymatchString(yy, "VIDEO")) goto l1348; + } + l1349:; if (!yy_Spnl(yy)) goto l1348; if (!yymatchChar(yy, '>')) goto l1348; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseVideo", yy->__buf+yy->__pos)); + return 1; + l1348:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseVideo", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenVideo(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenVideo")); if (!yymatchChar(yy, '<')) goto l1351; if (!yy_Spnl(yy)) goto l1351; + { int yypos1352= yy->__pos, yythunkpos1352= yy->__thunkpos; if (!yymatchString(yy, "video")) goto l1353; goto l1352; + l1353:; yy->__pos= yypos1352; yy->__thunkpos= yythunkpos1352; if (!yymatchString(yy, "VIDEO")) goto l1351; + } + l1352:; if (!yy_Spnl(yy)) goto l1351; + l1354:; + { int yypos1355= yy->__pos, yythunkpos1355= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1355; goto l1354; + l1355:; yy->__pos= yypos1355; yy->__thunkpos= yythunkpos1355; + } if (!yymatchChar(yy, '>')) goto l1351; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenVideo", yy->__buf+yy->__pos)); + return 1; + l1351:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenVideo", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockUl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockUl")); if (!yy_HtmlBlockOpenUl(yy)) goto l1356; + l1357:; + { int yypos1358= yy->__pos, yythunkpos1358= yy->__thunkpos; + { int yypos1359= yy->__pos, yythunkpos1359= yy->__thunkpos; if (!yy_HtmlBlockUl(yy)) goto l1360; goto l1359; + l1360:; yy->__pos= yypos1359; yy->__thunkpos= yythunkpos1359; + { int yypos1361= yy->__pos, yythunkpos1361= yy->__thunkpos; if (!yy_HtmlBlockCloseUl(yy)) goto l1361; goto l1358; + l1361:; yy->__pos= yypos1361; yy->__thunkpos= yythunkpos1361; + } if (!yymatchDot(yy)) goto l1358; + } + l1359:; goto l1357; + l1358:; yy->__pos= yypos1358; yy->__thunkpos= yythunkpos1358; + } if (!yy_HtmlBlockCloseUl(yy)) goto l1356; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockUl", yy->__buf+yy->__pos)); + return 1; + l1356:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockUl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseUl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseUl")); if (!yymatchChar(yy, '<')) goto l1362; if (!yy_Spnl(yy)) goto l1362; if (!yymatchChar(yy, '/')) goto l1362; + { int yypos1363= yy->__pos, yythunkpos1363= yy->__thunkpos; if (!yymatchString(yy, "ul")) goto l1364; goto l1363; + l1364:; yy->__pos= yypos1363; yy->__thunkpos= yythunkpos1363; if (!yymatchString(yy, "UL")) goto l1362; + } + l1363:; if (!yy_Spnl(yy)) goto l1362; if (!yymatchChar(yy, '>')) goto l1362; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseUl", yy->__buf+yy->__pos)); + return 1; + l1362:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseUl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenUl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenUl")); if (!yymatchChar(yy, '<')) goto l1365; if (!yy_Spnl(yy)) goto l1365; + { int yypos1366= yy->__pos, yythunkpos1366= yy->__thunkpos; if (!yymatchString(yy, "ul")) goto l1367; goto l1366; + l1367:; yy->__pos= yypos1366; yy->__thunkpos= yythunkpos1366; if (!yymatchString(yy, "UL")) goto l1365; + } + l1366:; if (!yy_Spnl(yy)) goto l1365; + l1368:; + { int yypos1369= yy->__pos, yythunkpos1369= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1369; goto l1368; + l1369:; yy->__pos= yypos1369; yy->__thunkpos= yythunkpos1369; + } if (!yymatchChar(yy, '>')) goto l1365; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenUl", yy->__buf+yy->__pos)); + return 1; + l1365:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenUl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockTable(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockTable")); if (!yy_HtmlBlockOpenTable(yy)) goto l1370; + l1371:; + { int yypos1372= yy->__pos, yythunkpos1372= yy->__thunkpos; + { int yypos1373= yy->__pos, yythunkpos1373= yy->__thunkpos; if (!yy_HtmlBlockTable(yy)) goto l1374; goto l1373; + l1374:; yy->__pos= yypos1373; yy->__thunkpos= yythunkpos1373; + { int yypos1375= yy->__pos, yythunkpos1375= yy->__thunkpos; if (!yy_HtmlBlockCloseTable(yy)) goto l1375; goto l1372; + l1375:; yy->__pos= yypos1375; yy->__thunkpos= yythunkpos1375; + } if (!yymatchDot(yy)) goto l1372; + } + l1373:; goto l1371; + l1372:; yy->__pos= yypos1372; yy->__thunkpos= yythunkpos1372; + } if (!yy_HtmlBlockCloseTable(yy)) goto l1370; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockTable", yy->__buf+yy->__pos)); + return 1; + l1370:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockTable", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseTable(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseTable")); if (!yymatchChar(yy, '<')) goto l1376; if (!yy_Spnl(yy)) goto l1376; if (!yymatchChar(yy, '/')) goto l1376; + { int yypos1377= yy->__pos, yythunkpos1377= yy->__thunkpos; if (!yymatchString(yy, "table")) goto l1378; goto l1377; + l1378:; yy->__pos= yypos1377; yy->__thunkpos= yythunkpos1377; if (!yymatchString(yy, "TABLE")) goto l1376; + } + l1377:; if (!yy_Spnl(yy)) goto l1376; if (!yymatchChar(yy, '>')) goto l1376; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseTable", yy->__buf+yy->__pos)); + return 1; + l1376:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseTable", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenTable(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenTable")); if (!yymatchChar(yy, '<')) goto l1379; if (!yy_Spnl(yy)) goto l1379; + { int yypos1380= yy->__pos, yythunkpos1380= yy->__thunkpos; if (!yymatchString(yy, "table")) goto l1381; goto l1380; + l1381:; yy->__pos= yypos1380; yy->__thunkpos= yythunkpos1380; if (!yymatchString(yy, "TABLE")) goto l1379; + } + l1380:; if (!yy_Spnl(yy)) goto l1379; + l1382:; + { int yypos1383= yy->__pos, yythunkpos1383= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1383; goto l1382; + l1383:; yy->__pos= yypos1383; yy->__thunkpos= yythunkpos1383; + } if (!yymatchChar(yy, '>')) goto l1379; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenTable", yy->__buf+yy->__pos)); + return 1; + l1379:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenTable", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockSection(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockSection")); if (!yy_HtmlBlockOpenSection(yy)) goto l1384; + l1385:; + { int yypos1386= yy->__pos, yythunkpos1386= yy->__thunkpos; + { int yypos1387= yy->__pos, yythunkpos1387= yy->__thunkpos; if (!yy_HtmlBlockSection(yy)) goto l1388; goto l1387; + l1388:; yy->__pos= yypos1387; yy->__thunkpos= yythunkpos1387; + { int yypos1389= yy->__pos, yythunkpos1389= yy->__thunkpos; if (!yy_HtmlBlockCloseSection(yy)) goto l1389; goto l1386; + l1389:; yy->__pos= yypos1389; yy->__thunkpos= yythunkpos1389; + } if (!yymatchDot(yy)) goto l1386; + } + l1387:; goto l1385; + l1386:; yy->__pos= yypos1386; yy->__thunkpos= yythunkpos1386; + } if (!yy_HtmlBlockCloseSection(yy)) goto l1384; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockSection", yy->__buf+yy->__pos)); + return 1; + l1384:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockSection", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseSection(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseSection")); if (!yymatchChar(yy, '<')) goto l1390; if (!yy_Spnl(yy)) goto l1390; if (!yymatchChar(yy, '/')) goto l1390; + { int yypos1391= yy->__pos, yythunkpos1391= yy->__thunkpos; if (!yymatchString(yy, "section")) goto l1392; goto l1391; + l1392:; yy->__pos= yypos1391; yy->__thunkpos= yythunkpos1391; if (!yymatchString(yy, "SECTION")) goto l1390; + } + l1391:; if (!yy_Spnl(yy)) goto l1390; if (!yymatchChar(yy, '>')) goto l1390; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseSection", yy->__buf+yy->__pos)); + return 1; + l1390:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseSection", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenSection(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenSection")); if (!yymatchChar(yy, '<')) goto l1393; if (!yy_Spnl(yy)) goto l1393; + { int yypos1394= yy->__pos, yythunkpos1394= yy->__thunkpos; if (!yymatchString(yy, "section")) goto l1395; goto l1394; + l1395:; yy->__pos= yypos1394; yy->__thunkpos= yythunkpos1394; if (!yymatchString(yy, "SECTION")) goto l1393; + } + l1394:; if (!yy_Spnl(yy)) goto l1393; + l1396:; + { int yypos1397= yy->__pos, yythunkpos1397= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1397; goto l1396; + l1397:; yy->__pos= yypos1397; yy->__thunkpos= yythunkpos1397; + } if (!yymatchChar(yy, '>')) goto l1393; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenSection", yy->__buf+yy->__pos)); + return 1; + l1393:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenSection", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockProgress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockProgress")); if (!yy_HtmlBlockOpenProgress(yy)) goto l1398; + l1399:; + { int yypos1400= yy->__pos, yythunkpos1400= yy->__thunkpos; + { int yypos1401= yy->__pos, yythunkpos1401= yy->__thunkpos; if (!yy_HtmlBlockProgress(yy)) goto l1402; goto l1401; + l1402:; yy->__pos= yypos1401; yy->__thunkpos= yythunkpos1401; + { int yypos1403= yy->__pos, yythunkpos1403= yy->__thunkpos; if (!yy_HtmlBlockCloseProgress(yy)) goto l1403; goto l1400; + l1403:; yy->__pos= yypos1403; yy->__thunkpos= yythunkpos1403; + } if (!yymatchDot(yy)) goto l1400; + } + l1401:; goto l1399; + l1400:; yy->__pos= yypos1400; yy->__thunkpos= yythunkpos1400; + } if (!yy_HtmlBlockCloseProgress(yy)) goto l1398; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockProgress", yy->__buf+yy->__pos)); + return 1; + l1398:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockProgress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseProgress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseProgress")); if (!yymatchChar(yy, '<')) goto l1404; if (!yy_Spnl(yy)) goto l1404; if (!yymatchChar(yy, '/')) goto l1404; + { int yypos1405= yy->__pos, yythunkpos1405= yy->__thunkpos; if (!yymatchString(yy, "progress")) goto l1406; goto l1405; + l1406:; yy->__pos= yypos1405; yy->__thunkpos= yythunkpos1405; if (!yymatchString(yy, "PROGRESS")) goto l1404; + } + l1405:; if (!yy_Spnl(yy)) goto l1404; if (!yymatchChar(yy, '>')) goto l1404; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseProgress", yy->__buf+yy->__pos)); + return 1; + l1404:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseProgress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenProgress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenProgress")); if (!yymatchChar(yy, '<')) goto l1407; if (!yy_Spnl(yy)) goto l1407; + { int yypos1408= yy->__pos, yythunkpos1408= yy->__thunkpos; if (!yymatchString(yy, "progress")) goto l1409; goto l1408; + l1409:; yy->__pos= yypos1408; yy->__thunkpos= yythunkpos1408; if (!yymatchString(yy, "PROGRESS")) goto l1407; + } + l1408:; if (!yy_Spnl(yy)) goto l1407; + l1410:; + { int yypos1411= yy->__pos, yythunkpos1411= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1411; goto l1410; + l1411:; yy->__pos= yypos1411; yy->__thunkpos= yythunkpos1411; + } if (!yymatchChar(yy, '>')) goto l1407; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenProgress", yy->__buf+yy->__pos)); + return 1; + l1407:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenProgress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockPre(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockPre")); if (!yy_HtmlBlockOpenPre(yy)) goto l1412; + l1413:; + { int yypos1414= yy->__pos, yythunkpos1414= yy->__thunkpos; + { int yypos1415= yy->__pos, yythunkpos1415= yy->__thunkpos; if (!yy_HtmlBlockPre(yy)) goto l1416; goto l1415; + l1416:; yy->__pos= yypos1415; yy->__thunkpos= yythunkpos1415; + { int yypos1417= yy->__pos, yythunkpos1417= yy->__thunkpos; if (!yy_HtmlBlockClosePre(yy)) goto l1417; goto l1414; + l1417:; yy->__pos= yypos1417; yy->__thunkpos= yythunkpos1417; + } if (!yymatchDot(yy)) goto l1414; + } + l1415:; goto l1413; + l1414:; yy->__pos= yypos1414; yy->__thunkpos= yythunkpos1414; + } if (!yy_HtmlBlockClosePre(yy)) goto l1412; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockPre", yy->__buf+yy->__pos)); + return 1; + l1412:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockPre", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockClosePre(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockClosePre")); if (!yymatchChar(yy, '<')) goto l1418; if (!yy_Spnl(yy)) goto l1418; if (!yymatchChar(yy, '/')) goto l1418; + { int yypos1419= yy->__pos, yythunkpos1419= yy->__thunkpos; if (!yymatchString(yy, "pre")) goto l1420; goto l1419; + l1420:; yy->__pos= yypos1419; yy->__thunkpos= yythunkpos1419; if (!yymatchString(yy, "PRE")) goto l1418; + } + l1419:; if (!yy_Spnl(yy)) goto l1418; if (!yymatchChar(yy, '>')) goto l1418; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockClosePre", yy->__buf+yy->__pos)); + return 1; + l1418:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockClosePre", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenPre(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenPre")); if (!yymatchChar(yy, '<')) goto l1421; if (!yy_Spnl(yy)) goto l1421; + { int yypos1422= yy->__pos, yythunkpos1422= yy->__thunkpos; if (!yymatchString(yy, "pre")) goto l1423; goto l1422; + l1423:; yy->__pos= yypos1422; yy->__thunkpos= yythunkpos1422; if (!yymatchString(yy, "PRE")) goto l1421; + } + l1422:; if (!yy_Spnl(yy)) goto l1421; + l1424:; + { int yypos1425= yy->__pos, yythunkpos1425= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1425; goto l1424; + l1425:; yy->__pos= yypos1425; yy->__thunkpos= yythunkpos1425; + } if (!yymatchChar(yy, '>')) goto l1421; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenPre", yy->__buf+yy->__pos)); + return 1; + l1421:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenPre", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockP(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockP")); if (!yy_HtmlBlockOpenP(yy)) goto l1426; + l1427:; + { int yypos1428= yy->__pos, yythunkpos1428= yy->__thunkpos; + { int yypos1429= yy->__pos, yythunkpos1429= yy->__thunkpos; if (!yy_HtmlBlockP(yy)) goto l1430; goto l1429; + l1430:; yy->__pos= yypos1429; yy->__thunkpos= yythunkpos1429; + { int yypos1431= yy->__pos, yythunkpos1431= yy->__thunkpos; if (!yy_HtmlBlockCloseP(yy)) goto l1431; goto l1428; + l1431:; yy->__pos= yypos1431; yy->__thunkpos= yythunkpos1431; + } if (!yymatchDot(yy)) goto l1428; + } + l1429:; goto l1427; + l1428:; yy->__pos= yypos1428; yy->__thunkpos= yythunkpos1428; + } if (!yy_HtmlBlockCloseP(yy)) goto l1426; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockP", yy->__buf+yy->__pos)); + return 1; + l1426:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockP", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseP(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseP")); if (!yymatchChar(yy, '<')) goto l1432; if (!yy_Spnl(yy)) goto l1432; if (!yymatchChar(yy, '/')) goto l1432; + { int yypos1433= yy->__pos, yythunkpos1433= yy->__thunkpos; if (!yymatchChar(yy, 'p')) goto l1434; goto l1433; + l1434:; yy->__pos= yypos1433; yy->__thunkpos= yythunkpos1433; if (!yymatchChar(yy, 'P')) goto l1432; + } + l1433:; if (!yy_Spnl(yy)) goto l1432; if (!yymatchChar(yy, '>')) goto l1432; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseP", yy->__buf+yy->__pos)); + return 1; + l1432:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseP", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenP(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenP")); if (!yymatchChar(yy, '<')) goto l1435; if (!yy_Spnl(yy)) goto l1435; + { int yypos1436= yy->__pos, yythunkpos1436= yy->__thunkpos; if (!yymatchChar(yy, 'p')) goto l1437; goto l1436; + l1437:; yy->__pos= yypos1436; yy->__thunkpos= yythunkpos1436; if (!yymatchChar(yy, 'P')) goto l1435; + } + l1436:; if (!yy_Spnl(yy)) goto l1435; + l1438:; + { int yypos1439= yy->__pos, yythunkpos1439= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1439; goto l1438; + l1439:; yy->__pos= yypos1439; yy->__thunkpos= yythunkpos1439; + } if (!yymatchChar(yy, '>')) goto l1435; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenP", yy->__buf+yy->__pos)); + return 1; + l1435:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenP", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOl")); if (!yy_HtmlBlockOpenOl(yy)) goto l1440; + l1441:; + { int yypos1442= yy->__pos, yythunkpos1442= yy->__thunkpos; + { int yypos1443= yy->__pos, yythunkpos1443= yy->__thunkpos; if (!yy_HtmlBlockOl(yy)) goto l1444; goto l1443; + l1444:; yy->__pos= yypos1443; yy->__thunkpos= yythunkpos1443; + { int yypos1445= yy->__pos, yythunkpos1445= yy->__thunkpos; if (!yy_HtmlBlockCloseOl(yy)) goto l1445; goto l1442; + l1445:; yy->__pos= yypos1445; yy->__thunkpos= yythunkpos1445; + } if (!yymatchDot(yy)) goto l1442; + } + l1443:; goto l1441; + l1442:; yy->__pos= yypos1442; yy->__thunkpos= yythunkpos1442; + } if (!yy_HtmlBlockCloseOl(yy)) goto l1440; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOl", yy->__buf+yy->__pos)); + return 1; + l1440:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseOl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseOl")); if (!yymatchChar(yy, '<')) goto l1446; if (!yy_Spnl(yy)) goto l1446; if (!yymatchChar(yy, '/')) goto l1446; + { int yypos1447= yy->__pos, yythunkpos1447= yy->__thunkpos; if (!yymatchString(yy, "ol")) goto l1448; goto l1447; + l1448:; yy->__pos= yypos1447; yy->__thunkpos= yythunkpos1447; if (!yymatchString(yy, "OL")) goto l1446; + } + l1447:; if (!yy_Spnl(yy)) goto l1446; if (!yymatchChar(yy, '>')) goto l1446; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseOl", yy->__buf+yy->__pos)); + return 1; + l1446:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseOl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenOl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenOl")); if (!yymatchChar(yy, '<')) goto l1449; if (!yy_Spnl(yy)) goto l1449; + { int yypos1450= yy->__pos, yythunkpos1450= yy->__thunkpos; if (!yymatchString(yy, "ol")) goto l1451; goto l1450; + l1451:; yy->__pos= yypos1450; yy->__thunkpos= yythunkpos1450; if (!yymatchString(yy, "OL")) goto l1449; + } + l1450:; if (!yy_Spnl(yy)) goto l1449; + l1452:; + { int yypos1453= yy->__pos, yythunkpos1453= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1453; goto l1452; + l1453:; yy->__pos= yypos1453; yy->__thunkpos= yythunkpos1453; + } if (!yymatchChar(yy, '>')) goto l1449; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenOl", yy->__buf+yy->__pos)); + return 1; + l1449:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenOl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockNoscript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockNoscript")); if (!yy_HtmlBlockOpenNoscript(yy)) goto l1454; + l1455:; + { int yypos1456= yy->__pos, yythunkpos1456= yy->__thunkpos; + { int yypos1457= yy->__pos, yythunkpos1457= yy->__thunkpos; if (!yy_HtmlBlockNoscript(yy)) goto l1458; goto l1457; + l1458:; yy->__pos= yypos1457; yy->__thunkpos= yythunkpos1457; + { int yypos1459= yy->__pos, yythunkpos1459= yy->__thunkpos; if (!yy_HtmlBlockCloseNoscript(yy)) goto l1459; goto l1456; + l1459:; yy->__pos= yypos1459; yy->__thunkpos= yythunkpos1459; + } if (!yymatchDot(yy)) goto l1456; + } + l1457:; goto l1455; + l1456:; yy->__pos= yypos1456; yy->__thunkpos= yythunkpos1456; + } if (!yy_HtmlBlockCloseNoscript(yy)) goto l1454; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockNoscript", yy->__buf+yy->__pos)); + return 1; + l1454:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockNoscript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseNoscript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseNoscript")); if (!yymatchChar(yy, '<')) goto l1460; if (!yy_Spnl(yy)) goto l1460; if (!yymatchChar(yy, '/')) goto l1460; + { int yypos1461= yy->__pos, yythunkpos1461= yy->__thunkpos; if (!yymatchString(yy, "noscript")) goto l1462; goto l1461; + l1462:; yy->__pos= yypos1461; yy->__thunkpos= yythunkpos1461; if (!yymatchString(yy, "NOSCRIPT")) goto l1460; + } + l1461:; if (!yy_Spnl(yy)) goto l1460; if (!yymatchChar(yy, '>')) goto l1460; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseNoscript", yy->__buf+yy->__pos)); + return 1; + l1460:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseNoscript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenNoscript(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenNoscript")); if (!yymatchChar(yy, '<')) goto l1463; if (!yy_Spnl(yy)) goto l1463; + { int yypos1464= yy->__pos, yythunkpos1464= yy->__thunkpos; if (!yymatchString(yy, "noscript")) goto l1465; goto l1464; + l1465:; yy->__pos= yypos1464; yy->__thunkpos= yythunkpos1464; if (!yymatchString(yy, "NOSCRIPT")) goto l1463; + } + l1464:; if (!yy_Spnl(yy)) goto l1463; + l1466:; + { int yypos1467= yy->__pos, yythunkpos1467= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1467; goto l1466; + l1467:; yy->__pos= yypos1467; yy->__thunkpos= yythunkpos1467; + } if (!yymatchChar(yy, '>')) goto l1463; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenNoscript", yy->__buf+yy->__pos)); + return 1; + l1463:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenNoscript", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockNoframes(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockNoframes")); if (!yy_HtmlBlockOpenNoframes(yy)) goto l1468; + l1469:; + { int yypos1470= yy->__pos, yythunkpos1470= yy->__thunkpos; + { int yypos1471= yy->__pos, yythunkpos1471= yy->__thunkpos; if (!yy_HtmlBlockNoframes(yy)) goto l1472; goto l1471; + l1472:; yy->__pos= yypos1471; yy->__thunkpos= yythunkpos1471; + { int yypos1473= yy->__pos, yythunkpos1473= yy->__thunkpos; if (!yy_HtmlBlockCloseNoframes(yy)) goto l1473; goto l1470; + l1473:; yy->__pos= yypos1473; yy->__thunkpos= yythunkpos1473; + } if (!yymatchDot(yy)) goto l1470; + } + l1471:; goto l1469; + l1470:; yy->__pos= yypos1470; yy->__thunkpos= yythunkpos1470; + } if (!yy_HtmlBlockCloseNoframes(yy)) goto l1468; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockNoframes", yy->__buf+yy->__pos)); + return 1; + l1468:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockNoframes", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseNoframes(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseNoframes")); if (!yymatchChar(yy, '<')) goto l1474; if (!yy_Spnl(yy)) goto l1474; if (!yymatchChar(yy, '/')) goto l1474; + { int yypos1475= yy->__pos, yythunkpos1475= yy->__thunkpos; if (!yymatchString(yy, "noframes")) goto l1476; goto l1475; + l1476:; yy->__pos= yypos1475; yy->__thunkpos= yythunkpos1475; if (!yymatchString(yy, "NOFRAMES")) goto l1474; + } + l1475:; if (!yy_Spnl(yy)) goto l1474; if (!yymatchChar(yy, '>')) goto l1474; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseNoframes", yy->__buf+yy->__pos)); + return 1; + l1474:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseNoframes", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenNoframes(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenNoframes")); if (!yymatchChar(yy, '<')) goto l1477; if (!yy_Spnl(yy)) goto l1477; + { int yypos1478= yy->__pos, yythunkpos1478= yy->__thunkpos; if (!yymatchString(yy, "noframes")) goto l1479; goto l1478; + l1479:; yy->__pos= yypos1478; yy->__thunkpos= yythunkpos1478; if (!yymatchString(yy, "NOFRAMES")) goto l1477; + } + l1478:; if (!yy_Spnl(yy)) goto l1477; + l1480:; + { int yypos1481= yy->__pos, yythunkpos1481= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1481; goto l1480; + l1481:; yy->__pos= yypos1481; yy->__thunkpos= yythunkpos1481; + } if (!yymatchChar(yy, '>')) goto l1477; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenNoframes", yy->__buf+yy->__pos)); + return 1; + l1477:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenNoframes", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockMenu(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockMenu")); if (!yy_HtmlBlockOpenMenu(yy)) goto l1482; + l1483:; + { int yypos1484= yy->__pos, yythunkpos1484= yy->__thunkpos; + { int yypos1485= yy->__pos, yythunkpos1485= yy->__thunkpos; if (!yy_HtmlBlockMenu(yy)) goto l1486; goto l1485; + l1486:; yy->__pos= yypos1485; yy->__thunkpos= yythunkpos1485; + { int yypos1487= yy->__pos, yythunkpos1487= yy->__thunkpos; if (!yy_HtmlBlockCloseMenu(yy)) goto l1487; goto l1484; + l1487:; yy->__pos= yypos1487; yy->__thunkpos= yythunkpos1487; + } if (!yymatchDot(yy)) goto l1484; + } + l1485:; goto l1483; + l1484:; yy->__pos= yypos1484; yy->__thunkpos= yythunkpos1484; + } if (!yy_HtmlBlockCloseMenu(yy)) goto l1482; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockMenu", yy->__buf+yy->__pos)); + return 1; + l1482:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockMenu", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseMenu(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseMenu")); if (!yymatchChar(yy, '<')) goto l1488; if (!yy_Spnl(yy)) goto l1488; if (!yymatchChar(yy, '/')) goto l1488; + { int yypos1489= yy->__pos, yythunkpos1489= yy->__thunkpos; if (!yymatchString(yy, "menu")) goto l1490; goto l1489; + l1490:; yy->__pos= yypos1489; yy->__thunkpos= yythunkpos1489; if (!yymatchString(yy, "MENU")) goto l1488; + } + l1489:; if (!yy_Spnl(yy)) goto l1488; if (!yymatchChar(yy, '>')) goto l1488; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseMenu", yy->__buf+yy->__pos)); + return 1; + l1488:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseMenu", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenMenu(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenMenu")); if (!yymatchChar(yy, '<')) goto l1491; if (!yy_Spnl(yy)) goto l1491; + { int yypos1492= yy->__pos, yythunkpos1492= yy->__thunkpos; if (!yymatchString(yy, "menu")) goto l1493; goto l1492; + l1493:; yy->__pos= yypos1492; yy->__thunkpos= yythunkpos1492; if (!yymatchString(yy, "MENU")) goto l1491; + } + l1492:; if (!yy_Spnl(yy)) goto l1491; + l1494:; + { int yypos1495= yy->__pos, yythunkpos1495= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1495; goto l1494; + l1495:; yy->__pos= yypos1495; yy->__thunkpos= yythunkpos1495; + } if (!yymatchChar(yy, '>')) goto l1491; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenMenu", yy->__buf+yy->__pos)); + return 1; + l1491:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenMenu", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH6(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH6")); if (!yy_HtmlBlockOpenH6(yy)) goto l1496; + l1497:; + { int yypos1498= yy->__pos, yythunkpos1498= yy->__thunkpos; + { int yypos1499= yy->__pos, yythunkpos1499= yy->__thunkpos; if (!yy_HtmlBlockH6(yy)) goto l1500; goto l1499; + l1500:; yy->__pos= yypos1499; yy->__thunkpos= yythunkpos1499; + { int yypos1501= yy->__pos, yythunkpos1501= yy->__thunkpos; if (!yy_HtmlBlockCloseH6(yy)) goto l1501; goto l1498; + l1501:; yy->__pos= yypos1501; yy->__thunkpos= yythunkpos1501; + } if (!yymatchDot(yy)) goto l1498; + } + l1499:; goto l1497; + l1498:; yy->__pos= yypos1498; yy->__thunkpos= yythunkpos1498; + } if (!yy_HtmlBlockCloseH6(yy)) goto l1496; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH6", yy->__buf+yy->__pos)); + return 1; + l1496:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH6", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH6(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH6")); if (!yymatchChar(yy, '<')) goto l1502; if (!yy_Spnl(yy)) goto l1502; if (!yymatchChar(yy, '/')) goto l1502; + { int yypos1503= yy->__pos, yythunkpos1503= yy->__thunkpos; if (!yymatchString(yy, "h6")) goto l1504; goto l1503; + l1504:; yy->__pos= yypos1503; yy->__thunkpos= yythunkpos1503; if (!yymatchString(yy, "H6")) goto l1502; + } + l1503:; if (!yy_Spnl(yy)) goto l1502; if (!yymatchChar(yy, '>')) goto l1502; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH6", yy->__buf+yy->__pos)); + return 1; + l1502:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH6", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH6(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH6")); if (!yymatchChar(yy, '<')) goto l1505; if (!yy_Spnl(yy)) goto l1505; + { int yypos1506= yy->__pos, yythunkpos1506= yy->__thunkpos; if (!yymatchString(yy, "h6")) goto l1507; goto l1506; + l1507:; yy->__pos= yypos1506; yy->__thunkpos= yythunkpos1506; if (!yymatchString(yy, "H6")) goto l1505; + } + l1506:; if (!yy_Spnl(yy)) goto l1505; + l1508:; + { int yypos1509= yy->__pos, yythunkpos1509= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1509; goto l1508; + l1509:; yy->__pos= yypos1509; yy->__thunkpos= yythunkpos1509; + } if (!yymatchChar(yy, '>')) goto l1505; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH6", yy->__buf+yy->__pos)); + return 1; + l1505:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH6", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH5(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH5")); if (!yy_HtmlBlockOpenH5(yy)) goto l1510; + l1511:; + { int yypos1512= yy->__pos, yythunkpos1512= yy->__thunkpos; + { int yypos1513= yy->__pos, yythunkpos1513= yy->__thunkpos; if (!yy_HtmlBlockH5(yy)) goto l1514; goto l1513; + l1514:; yy->__pos= yypos1513; yy->__thunkpos= yythunkpos1513; + { int yypos1515= yy->__pos, yythunkpos1515= yy->__thunkpos; if (!yy_HtmlBlockCloseH5(yy)) goto l1515; goto l1512; + l1515:; yy->__pos= yypos1515; yy->__thunkpos= yythunkpos1515; + } if (!yymatchDot(yy)) goto l1512; + } + l1513:; goto l1511; + l1512:; yy->__pos= yypos1512; yy->__thunkpos= yythunkpos1512; + } if (!yy_HtmlBlockCloseH5(yy)) goto l1510; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH5", yy->__buf+yy->__pos)); + return 1; + l1510:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH5", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH5(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH5")); if (!yymatchChar(yy, '<')) goto l1516; if (!yy_Spnl(yy)) goto l1516; if (!yymatchChar(yy, '/')) goto l1516; + { int yypos1517= yy->__pos, yythunkpos1517= yy->__thunkpos; if (!yymatchString(yy, "h5")) goto l1518; goto l1517; + l1518:; yy->__pos= yypos1517; yy->__thunkpos= yythunkpos1517; if (!yymatchString(yy, "H5")) goto l1516; + } + l1517:; if (!yy_Spnl(yy)) goto l1516; if (!yymatchChar(yy, '>')) goto l1516; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH5", yy->__buf+yy->__pos)); + return 1; + l1516:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH5", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH5(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH5")); if (!yymatchChar(yy, '<')) goto l1519; if (!yy_Spnl(yy)) goto l1519; + { int yypos1520= yy->__pos, yythunkpos1520= yy->__thunkpos; if (!yymatchString(yy, "h5")) goto l1521; goto l1520; + l1521:; yy->__pos= yypos1520; yy->__thunkpos= yythunkpos1520; if (!yymatchString(yy, "H5")) goto l1519; + } + l1520:; if (!yy_Spnl(yy)) goto l1519; + l1522:; + { int yypos1523= yy->__pos, yythunkpos1523= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1523; goto l1522; + l1523:; yy->__pos= yypos1523; yy->__thunkpos= yythunkpos1523; + } if (!yymatchChar(yy, '>')) goto l1519; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH5", yy->__buf+yy->__pos)); + return 1; + l1519:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH5", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH4(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH4")); if (!yy_HtmlBlockOpenH4(yy)) goto l1524; + l1525:; + { int yypos1526= yy->__pos, yythunkpos1526= yy->__thunkpos; + { int yypos1527= yy->__pos, yythunkpos1527= yy->__thunkpos; if (!yy_HtmlBlockH4(yy)) goto l1528; goto l1527; + l1528:; yy->__pos= yypos1527; yy->__thunkpos= yythunkpos1527; + { int yypos1529= yy->__pos, yythunkpos1529= yy->__thunkpos; if (!yy_HtmlBlockCloseH4(yy)) goto l1529; goto l1526; + l1529:; yy->__pos= yypos1529; yy->__thunkpos= yythunkpos1529; + } if (!yymatchDot(yy)) goto l1526; + } + l1527:; goto l1525; + l1526:; yy->__pos= yypos1526; yy->__thunkpos= yythunkpos1526; + } if (!yy_HtmlBlockCloseH4(yy)) goto l1524; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH4", yy->__buf+yy->__pos)); + return 1; + l1524:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH4", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH4(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH4")); if (!yymatchChar(yy, '<')) goto l1530; if (!yy_Spnl(yy)) goto l1530; if (!yymatchChar(yy, '/')) goto l1530; + { int yypos1531= yy->__pos, yythunkpos1531= yy->__thunkpos; if (!yymatchString(yy, "h4")) goto l1532; goto l1531; + l1532:; yy->__pos= yypos1531; yy->__thunkpos= yythunkpos1531; if (!yymatchString(yy, "H4")) goto l1530; + } + l1531:; if (!yy_Spnl(yy)) goto l1530; if (!yymatchChar(yy, '>')) goto l1530; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH4", yy->__buf+yy->__pos)); + return 1; + l1530:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH4", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH4(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH4")); if (!yymatchChar(yy, '<')) goto l1533; if (!yy_Spnl(yy)) goto l1533; + { int yypos1534= yy->__pos, yythunkpos1534= yy->__thunkpos; if (!yymatchString(yy, "h4")) goto l1535; goto l1534; + l1535:; yy->__pos= yypos1534; yy->__thunkpos= yythunkpos1534; if (!yymatchString(yy, "H4")) goto l1533; + } + l1534:; if (!yy_Spnl(yy)) goto l1533; + l1536:; + { int yypos1537= yy->__pos, yythunkpos1537= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1537; goto l1536; + l1537:; yy->__pos= yypos1537; yy->__thunkpos= yythunkpos1537; + } if (!yymatchChar(yy, '>')) goto l1533; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH4", yy->__buf+yy->__pos)); + return 1; + l1533:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH4", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH3(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH3")); if (!yy_HtmlBlockOpenH3(yy)) goto l1538; + l1539:; + { int yypos1540= yy->__pos, yythunkpos1540= yy->__thunkpos; + { int yypos1541= yy->__pos, yythunkpos1541= yy->__thunkpos; if (!yy_HtmlBlockH3(yy)) goto l1542; goto l1541; + l1542:; yy->__pos= yypos1541; yy->__thunkpos= yythunkpos1541; + { int yypos1543= yy->__pos, yythunkpos1543= yy->__thunkpos; if (!yy_HtmlBlockCloseH3(yy)) goto l1543; goto l1540; + l1543:; yy->__pos= yypos1543; yy->__thunkpos= yythunkpos1543; + } if (!yymatchDot(yy)) goto l1540; + } + l1541:; goto l1539; + l1540:; yy->__pos= yypos1540; yy->__thunkpos= yythunkpos1540; + } if (!yy_HtmlBlockCloseH3(yy)) goto l1538; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH3", yy->__buf+yy->__pos)); + return 1; + l1538:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH3", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH3(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH3")); if (!yymatchChar(yy, '<')) goto l1544; if (!yy_Spnl(yy)) goto l1544; if (!yymatchChar(yy, '/')) goto l1544; + { int yypos1545= yy->__pos, yythunkpos1545= yy->__thunkpos; if (!yymatchString(yy, "h3")) goto l1546; goto l1545; + l1546:; yy->__pos= yypos1545; yy->__thunkpos= yythunkpos1545; if (!yymatchString(yy, "H3")) goto l1544; + } + l1545:; if (!yy_Spnl(yy)) goto l1544; if (!yymatchChar(yy, '>')) goto l1544; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH3", yy->__buf+yy->__pos)); + return 1; + l1544:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH3", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH3(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH3")); if (!yymatchChar(yy, '<')) goto l1547; if (!yy_Spnl(yy)) goto l1547; + { int yypos1548= yy->__pos, yythunkpos1548= yy->__thunkpos; if (!yymatchString(yy, "h3")) goto l1549; goto l1548; + l1549:; yy->__pos= yypos1548; yy->__thunkpos= yythunkpos1548; if (!yymatchString(yy, "H3")) goto l1547; + } + l1548:; if (!yy_Spnl(yy)) goto l1547; + l1550:; + { int yypos1551= yy->__pos, yythunkpos1551= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1551; goto l1550; + l1551:; yy->__pos= yypos1551; yy->__thunkpos= yythunkpos1551; + } if (!yymatchChar(yy, '>')) goto l1547; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH3", yy->__buf+yy->__pos)); + return 1; + l1547:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH3", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH2")); if (!yy_HtmlBlockOpenH2(yy)) goto l1552; + l1553:; + { int yypos1554= yy->__pos, yythunkpos1554= yy->__thunkpos; + { int yypos1555= yy->__pos, yythunkpos1555= yy->__thunkpos; if (!yy_HtmlBlockH2(yy)) goto l1556; goto l1555; + l1556:; yy->__pos= yypos1555; yy->__thunkpos= yythunkpos1555; + { int yypos1557= yy->__pos, yythunkpos1557= yy->__thunkpos; if (!yy_HtmlBlockCloseH2(yy)) goto l1557; goto l1554; + l1557:; yy->__pos= yypos1557; yy->__thunkpos= yythunkpos1557; + } if (!yymatchDot(yy)) goto l1554; + } + l1555:; goto l1553; + l1554:; yy->__pos= yypos1554; yy->__thunkpos= yythunkpos1554; + } if (!yy_HtmlBlockCloseH2(yy)) goto l1552; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH2", yy->__buf+yy->__pos)); + return 1; + l1552:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH2")); if (!yymatchChar(yy, '<')) goto l1558; if (!yy_Spnl(yy)) goto l1558; if (!yymatchChar(yy, '/')) goto l1558; + { int yypos1559= yy->__pos, yythunkpos1559= yy->__thunkpos; if (!yymatchString(yy, "h2")) goto l1560; goto l1559; + l1560:; yy->__pos= yypos1559; yy->__thunkpos= yythunkpos1559; if (!yymatchString(yy, "H2")) goto l1558; + } + l1559:; if (!yy_Spnl(yy)) goto l1558; if (!yymatchChar(yy, '>')) goto l1558; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH2", yy->__buf+yy->__pos)); + return 1; + l1558:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH2")); if (!yymatchChar(yy, '<')) goto l1561; if (!yy_Spnl(yy)) goto l1561; + { int yypos1562= yy->__pos, yythunkpos1562= yy->__thunkpos; if (!yymatchString(yy, "h2")) goto l1563; goto l1562; + l1563:; yy->__pos= yypos1562; yy->__thunkpos= yythunkpos1562; if (!yymatchString(yy, "H2")) goto l1561; + } + l1562:; if (!yy_Spnl(yy)) goto l1561; + l1564:; + { int yypos1565= yy->__pos, yythunkpos1565= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1565; goto l1564; + l1565:; yy->__pos= yypos1565; yy->__thunkpos= yythunkpos1565; + } if (!yymatchChar(yy, '>')) goto l1561; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH2", yy->__buf+yy->__pos)); + return 1; + l1561:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockH1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockH1")); if (!yy_HtmlBlockOpenH1(yy)) goto l1566; + l1567:; + { int yypos1568= yy->__pos, yythunkpos1568= yy->__thunkpos; + { int yypos1569= yy->__pos, yythunkpos1569= yy->__thunkpos; if (!yy_HtmlBlockH1(yy)) goto l1570; goto l1569; + l1570:; yy->__pos= yypos1569; yy->__thunkpos= yythunkpos1569; + { int yypos1571= yy->__pos, yythunkpos1571= yy->__thunkpos; if (!yy_HtmlBlockCloseH1(yy)) goto l1571; goto l1568; + l1571:; yy->__pos= yypos1571; yy->__thunkpos= yythunkpos1571; + } if (!yymatchDot(yy)) goto l1568; + } + l1569:; goto l1567; + l1568:; yy->__pos= yypos1568; yy->__thunkpos= yythunkpos1568; + } if (!yy_HtmlBlockCloseH1(yy)) goto l1566; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockH1", yy->__buf+yy->__pos)); + return 1; + l1566:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockH1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseH1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseH1")); if (!yymatchChar(yy, '<')) goto l1572; if (!yy_Spnl(yy)) goto l1572; if (!yymatchChar(yy, '/')) goto l1572; + { int yypos1573= yy->__pos, yythunkpos1573= yy->__thunkpos; if (!yymatchString(yy, "h1")) goto l1574; goto l1573; + l1574:; yy->__pos= yypos1573; yy->__thunkpos= yythunkpos1573; if (!yymatchString(yy, "H1")) goto l1572; + } + l1573:; if (!yy_Spnl(yy)) goto l1572; if (!yymatchChar(yy, '>')) goto l1572; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseH1", yy->__buf+yy->__pos)); + return 1; + l1572:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseH1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenH1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenH1")); if (!yymatchChar(yy, '<')) goto l1575; if (!yy_Spnl(yy)) goto l1575; + { int yypos1576= yy->__pos, yythunkpos1576= yy->__thunkpos; if (!yymatchString(yy, "h1")) goto l1577; goto l1576; + l1577:; yy->__pos= yypos1576; yy->__thunkpos= yythunkpos1576; if (!yymatchString(yy, "H1")) goto l1575; + } + l1576:; if (!yy_Spnl(yy)) goto l1575; + l1578:; + { int yypos1579= yy->__pos, yythunkpos1579= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1579; goto l1578; + l1579:; yy->__pos= yypos1579; yy->__thunkpos= yythunkpos1579; + } if (!yymatchChar(yy, '>')) goto l1575; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenH1", yy->__buf+yy->__pos)); + return 1; + l1575:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenH1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockHgroup(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockHgroup")); if (!yy_HtmlBlockOpenHgroup(yy)) goto l1580; + l1581:; + { int yypos1582= yy->__pos, yythunkpos1582= yy->__thunkpos; + { int yypos1583= yy->__pos, yythunkpos1583= yy->__thunkpos; if (!yy_HtmlBlockHgroup(yy)) goto l1584; goto l1583; + l1584:; yy->__pos= yypos1583; yy->__thunkpos= yythunkpos1583; + { int yypos1585= yy->__pos, yythunkpos1585= yy->__thunkpos; if (!yy_HtmlBlockCloseHgroup(yy)) goto l1585; goto l1582; + l1585:; yy->__pos= yypos1585; yy->__thunkpos= yythunkpos1585; + } if (!yymatchDot(yy)) goto l1582; + } + l1583:; goto l1581; + l1582:; yy->__pos= yypos1582; yy->__thunkpos= yythunkpos1582; + } if (!yy_HtmlBlockCloseHgroup(yy)) goto l1580; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockHgroup", yy->__buf+yy->__pos)); + return 1; + l1580:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockHgroup", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseHgroup(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseHgroup")); if (!yymatchChar(yy, '<')) goto l1586; if (!yy_Spnl(yy)) goto l1586; if (!yymatchChar(yy, '/')) goto l1586; + { int yypos1587= yy->__pos, yythunkpos1587= yy->__thunkpos; if (!yymatchString(yy, "hgroup")) goto l1588; goto l1587; + l1588:; yy->__pos= yypos1587; yy->__thunkpos= yythunkpos1587; if (!yymatchString(yy, "HGROUP")) goto l1586; + } + l1587:; if (!yy_Spnl(yy)) goto l1586; if (!yymatchChar(yy, '>')) goto l1586; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseHgroup", yy->__buf+yy->__pos)); + return 1; + l1586:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseHgroup", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenHgroup(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenHgroup")); if (!yymatchChar(yy, '<')) goto l1589; if (!yy_Spnl(yy)) goto l1589; + { int yypos1590= yy->__pos, yythunkpos1590= yy->__thunkpos; if (!yymatchString(yy, "hgroup")) goto l1591; goto l1590; + l1591:; yy->__pos= yypos1590; yy->__thunkpos= yythunkpos1590; if (!yymatchString(yy, "HGROUP")) goto l1589; + } + l1590:; if (!yy_Spnl(yy)) goto l1589; + l1592:; + { int yypos1593= yy->__pos, yythunkpos1593= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1593; goto l1592; + l1593:; yy->__pos= yypos1593; yy->__thunkpos= yythunkpos1593; + } if (!yymatchChar(yy, '>')) goto l1589; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenHgroup", yy->__buf+yy->__pos)); + return 1; + l1589:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenHgroup", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockHeader(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockHeader")); if (!yy_HtmlBlockOpenHeader(yy)) goto l1594; + l1595:; + { int yypos1596= yy->__pos, yythunkpos1596= yy->__thunkpos; + { int yypos1597= yy->__pos, yythunkpos1597= yy->__thunkpos; if (!yy_HtmlBlockHeader(yy)) goto l1598; goto l1597; + l1598:; yy->__pos= yypos1597; yy->__thunkpos= yythunkpos1597; + { int yypos1599= yy->__pos, yythunkpos1599= yy->__thunkpos; if (!yy_HtmlBlockCloseHeader(yy)) goto l1599; goto l1596; + l1599:; yy->__pos= yypos1599; yy->__thunkpos= yythunkpos1599; + } if (!yymatchDot(yy)) goto l1596; + } + l1597:; goto l1595; + l1596:; yy->__pos= yypos1596; yy->__thunkpos= yythunkpos1596; + } if (!yy_HtmlBlockCloseHeader(yy)) goto l1594; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockHeader", yy->__buf+yy->__pos)); + return 1; + l1594:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockHeader", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseHeader(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseHeader")); if (!yymatchChar(yy, '<')) goto l1600; if (!yy_Spnl(yy)) goto l1600; if (!yymatchChar(yy, '/')) goto l1600; + { int yypos1601= yy->__pos, yythunkpos1601= yy->__thunkpos; if (!yymatchString(yy, "header")) goto l1602; goto l1601; + l1602:; yy->__pos= yypos1601; yy->__thunkpos= yythunkpos1601; if (!yymatchString(yy, "HEADER")) goto l1600; + } + l1601:; if (!yy_Spnl(yy)) goto l1600; if (!yymatchChar(yy, '>')) goto l1600; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseHeader", yy->__buf+yy->__pos)); + return 1; + l1600:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseHeader", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenHeader(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenHeader")); if (!yymatchChar(yy, '<')) goto l1603; if (!yy_Spnl(yy)) goto l1603; + { int yypos1604= yy->__pos, yythunkpos1604= yy->__thunkpos; if (!yymatchString(yy, "header")) goto l1605; goto l1604; + l1605:; yy->__pos= yypos1604; yy->__thunkpos= yythunkpos1604; if (!yymatchString(yy, "HEADER")) goto l1603; + } + l1604:; if (!yy_Spnl(yy)) goto l1603; + l1606:; + { int yypos1607= yy->__pos, yythunkpos1607= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1607; goto l1606; + l1607:; yy->__pos= yypos1607; yy->__thunkpos= yythunkpos1607; + } if (!yymatchChar(yy, '>')) goto l1603; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenHeader", yy->__buf+yy->__pos)); + return 1; + l1603:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenHeader", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockForm(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockForm")); if (!yy_HtmlBlockOpenForm(yy)) goto l1608; + l1609:; + { int yypos1610= yy->__pos, yythunkpos1610= yy->__thunkpos; + { int yypos1611= yy->__pos, yythunkpos1611= yy->__thunkpos; if (!yy_HtmlBlockForm(yy)) goto l1612; goto l1611; + l1612:; yy->__pos= yypos1611; yy->__thunkpos= yythunkpos1611; + { int yypos1613= yy->__pos, yythunkpos1613= yy->__thunkpos; if (!yy_HtmlBlockCloseForm(yy)) goto l1613; goto l1610; + l1613:; yy->__pos= yypos1613; yy->__thunkpos= yythunkpos1613; + } if (!yymatchDot(yy)) goto l1610; + } + l1611:; goto l1609; + l1610:; yy->__pos= yypos1610; yy->__thunkpos= yythunkpos1610; + } if (!yy_HtmlBlockCloseForm(yy)) goto l1608; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockForm", yy->__buf+yy->__pos)); + return 1; + l1608:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockForm", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseForm(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseForm")); if (!yymatchChar(yy, '<')) goto l1614; if (!yy_Spnl(yy)) goto l1614; if (!yymatchChar(yy, '/')) goto l1614; + { int yypos1615= yy->__pos, yythunkpos1615= yy->__thunkpos; if (!yymatchString(yy, "form")) goto l1616; goto l1615; + l1616:; yy->__pos= yypos1615; yy->__thunkpos= yythunkpos1615; if (!yymatchString(yy, "FORM")) goto l1614; + } + l1615:; if (!yy_Spnl(yy)) goto l1614; if (!yymatchChar(yy, '>')) goto l1614; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseForm", yy->__buf+yy->__pos)); + return 1; + l1614:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseForm", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenForm(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenForm")); if (!yymatchChar(yy, '<')) goto l1617; if (!yy_Spnl(yy)) goto l1617; + { int yypos1618= yy->__pos, yythunkpos1618= yy->__thunkpos; if (!yymatchString(yy, "form")) goto l1619; goto l1618; + l1619:; yy->__pos= yypos1618; yy->__thunkpos= yythunkpos1618; if (!yymatchString(yy, "FORM")) goto l1617; + } + l1618:; if (!yy_Spnl(yy)) goto l1617; + l1620:; + { int yypos1621= yy->__pos, yythunkpos1621= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1621; goto l1620; + l1621:; yy->__pos= yypos1621; yy->__thunkpos= yythunkpos1621; + } if (!yymatchChar(yy, '>')) goto l1617; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenForm", yy->__buf+yy->__pos)); + return 1; + l1617:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenForm", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockFooter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockFooter")); if (!yy_HtmlBlockOpenFooter(yy)) goto l1622; + l1623:; + { int yypos1624= yy->__pos, yythunkpos1624= yy->__thunkpos; + { int yypos1625= yy->__pos, yythunkpos1625= yy->__thunkpos; if (!yy_HtmlBlockFooter(yy)) goto l1626; goto l1625; + l1626:; yy->__pos= yypos1625; yy->__thunkpos= yythunkpos1625; + { int yypos1627= yy->__pos, yythunkpos1627= yy->__thunkpos; if (!yy_HtmlBlockCloseFooter(yy)) goto l1627; goto l1624; + l1627:; yy->__pos= yypos1627; yy->__thunkpos= yythunkpos1627; + } if (!yymatchDot(yy)) goto l1624; + } + l1625:; goto l1623; + l1624:; yy->__pos= yypos1624; yy->__thunkpos= yythunkpos1624; + } if (!yy_HtmlBlockCloseFooter(yy)) goto l1622; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockFooter", yy->__buf+yy->__pos)); + return 1; + l1622:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockFooter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseFooter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseFooter")); if (!yymatchChar(yy, '<')) goto l1628; if (!yy_Spnl(yy)) goto l1628; if (!yymatchChar(yy, '/')) goto l1628; + { int yypos1629= yy->__pos, yythunkpos1629= yy->__thunkpos; if (!yymatchString(yy, "footer")) goto l1630; goto l1629; + l1630:; yy->__pos= yypos1629; yy->__thunkpos= yythunkpos1629; if (!yymatchString(yy, "FOOTER")) goto l1628; + } + l1629:; if (!yy_Spnl(yy)) goto l1628; if (!yymatchChar(yy, '>')) goto l1628; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseFooter", yy->__buf+yy->__pos)); + return 1; + l1628:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseFooter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenFooter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenFooter")); if (!yymatchChar(yy, '<')) goto l1631; if (!yy_Spnl(yy)) goto l1631; + { int yypos1632= yy->__pos, yythunkpos1632= yy->__thunkpos; if (!yymatchString(yy, "footer")) goto l1633; goto l1632; + l1633:; yy->__pos= yypos1632; yy->__thunkpos= yythunkpos1632; if (!yymatchString(yy, "FOOTER")) goto l1631; + } + l1632:; if (!yy_Spnl(yy)) goto l1631; + l1634:; + { int yypos1635= yy->__pos, yythunkpos1635= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1635; goto l1634; + l1635:; yy->__pos= yypos1635; yy->__thunkpos= yythunkpos1635; + } if (!yymatchChar(yy, '>')) goto l1631; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenFooter", yy->__buf+yy->__pos)); + return 1; + l1631:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenFooter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockFigure(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockFigure")); if (!yy_HtmlBlockOpenFigure(yy)) goto l1636; + l1637:; + { int yypos1638= yy->__pos, yythunkpos1638= yy->__thunkpos; + { int yypos1639= yy->__pos, yythunkpos1639= yy->__thunkpos; if (!yy_HtmlBlockFigure(yy)) goto l1640; goto l1639; + l1640:; yy->__pos= yypos1639; yy->__thunkpos= yythunkpos1639; + { int yypos1641= yy->__pos, yythunkpos1641= yy->__thunkpos; if (!yy_HtmlBlockCloseFigure(yy)) goto l1641; goto l1638; + l1641:; yy->__pos= yypos1641; yy->__thunkpos= yythunkpos1641; + } if (!yymatchDot(yy)) goto l1638; + } + l1639:; goto l1637; + l1638:; yy->__pos= yypos1638; yy->__thunkpos= yythunkpos1638; + } if (!yy_HtmlBlockCloseFigure(yy)) goto l1636; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockFigure", yy->__buf+yy->__pos)); + return 1; + l1636:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockFigure", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseFigure(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseFigure")); if (!yymatchChar(yy, '<')) goto l1642; if (!yy_Spnl(yy)) goto l1642; if (!yymatchChar(yy, '/')) goto l1642; + { int yypos1643= yy->__pos, yythunkpos1643= yy->__thunkpos; if (!yymatchString(yy, "figure")) goto l1644; goto l1643; + l1644:; yy->__pos= yypos1643; yy->__thunkpos= yythunkpos1643; if (!yymatchString(yy, "FIGURE")) goto l1642; + } + l1643:; if (!yy_Spnl(yy)) goto l1642; if (!yymatchChar(yy, '>')) goto l1642; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseFigure", yy->__buf+yy->__pos)); + return 1; + l1642:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseFigure", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenFigure(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenFigure")); if (!yymatchChar(yy, '<')) goto l1645; if (!yy_Spnl(yy)) goto l1645; + { int yypos1646= yy->__pos, yythunkpos1646= yy->__thunkpos; if (!yymatchString(yy, "figure")) goto l1647; goto l1646; + l1647:; yy->__pos= yypos1646; yy->__thunkpos= yythunkpos1646; if (!yymatchString(yy, "FIGURE")) goto l1645; + } + l1646:; if (!yy_Spnl(yy)) goto l1645; + l1648:; + { int yypos1649= yy->__pos, yythunkpos1649= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1649; goto l1648; + l1649:; yy->__pos= yypos1649; yy->__thunkpos= yythunkpos1649; + } if (!yymatchChar(yy, '>')) goto l1645; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenFigure", yy->__buf+yy->__pos)); + return 1; + l1645:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenFigure", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockFieldset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockFieldset")); if (!yy_HtmlBlockOpenFieldset(yy)) goto l1650; + l1651:; + { int yypos1652= yy->__pos, yythunkpos1652= yy->__thunkpos; + { int yypos1653= yy->__pos, yythunkpos1653= yy->__thunkpos; if (!yy_HtmlBlockFieldset(yy)) goto l1654; goto l1653; + l1654:; yy->__pos= yypos1653; yy->__thunkpos= yythunkpos1653; + { int yypos1655= yy->__pos, yythunkpos1655= yy->__thunkpos; if (!yy_HtmlBlockCloseFieldset(yy)) goto l1655; goto l1652; + l1655:; yy->__pos= yypos1655; yy->__thunkpos= yythunkpos1655; + } if (!yymatchDot(yy)) goto l1652; + } + l1653:; goto l1651; + l1652:; yy->__pos= yypos1652; yy->__thunkpos= yythunkpos1652; + } if (!yy_HtmlBlockCloseFieldset(yy)) goto l1650; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockFieldset", yy->__buf+yy->__pos)); + return 1; + l1650:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockFieldset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseFieldset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseFieldset")); if (!yymatchChar(yy, '<')) goto l1656; if (!yy_Spnl(yy)) goto l1656; if (!yymatchChar(yy, '/')) goto l1656; + { int yypos1657= yy->__pos, yythunkpos1657= yy->__thunkpos; if (!yymatchString(yy, "fieldset")) goto l1658; goto l1657; + l1658:; yy->__pos= yypos1657; yy->__thunkpos= yythunkpos1657; if (!yymatchString(yy, "FIELDSET")) goto l1656; + } + l1657:; if (!yy_Spnl(yy)) goto l1656; if (!yymatchChar(yy, '>')) goto l1656; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseFieldset", yy->__buf+yy->__pos)); + return 1; + l1656:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseFieldset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenFieldset(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenFieldset")); if (!yymatchChar(yy, '<')) goto l1659; if (!yy_Spnl(yy)) goto l1659; + { int yypos1660= yy->__pos, yythunkpos1660= yy->__thunkpos; if (!yymatchString(yy, "fieldset")) goto l1661; goto l1660; + l1661:; yy->__pos= yypos1660; yy->__thunkpos= yythunkpos1660; if (!yymatchString(yy, "FIELDSET")) goto l1659; + } + l1660:; if (!yy_Spnl(yy)) goto l1659; + l1662:; + { int yypos1663= yy->__pos, yythunkpos1663= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1663; goto l1662; + l1663:; yy->__pos= yypos1663; yy->__thunkpos= yythunkpos1663; + } if (!yymatchChar(yy, '>')) goto l1659; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenFieldset", yy->__buf+yy->__pos)); + return 1; + l1659:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenFieldset", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockDl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockDl")); if (!yy_HtmlBlockOpenDl(yy)) goto l1664; + l1665:; + { int yypos1666= yy->__pos, yythunkpos1666= yy->__thunkpos; + { int yypos1667= yy->__pos, yythunkpos1667= yy->__thunkpos; if (!yy_HtmlBlockDl(yy)) goto l1668; goto l1667; + l1668:; yy->__pos= yypos1667; yy->__thunkpos= yythunkpos1667; + { int yypos1669= yy->__pos, yythunkpos1669= yy->__thunkpos; if (!yy_HtmlBlockCloseDl(yy)) goto l1669; goto l1666; + l1669:; yy->__pos= yypos1669; yy->__thunkpos= yythunkpos1669; + } if (!yymatchDot(yy)) goto l1666; + } + l1667:; goto l1665; + l1666:; yy->__pos= yypos1666; yy->__thunkpos= yythunkpos1666; + } if (!yy_HtmlBlockCloseDl(yy)) goto l1664; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockDl", yy->__buf+yy->__pos)); + return 1; + l1664:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockDl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseDl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseDl")); if (!yymatchChar(yy, '<')) goto l1670; if (!yy_Spnl(yy)) goto l1670; if (!yymatchChar(yy, '/')) goto l1670; + { int yypos1671= yy->__pos, yythunkpos1671= yy->__thunkpos; if (!yymatchString(yy, "dl")) goto l1672; goto l1671; + l1672:; yy->__pos= yypos1671; yy->__thunkpos= yythunkpos1671; if (!yymatchString(yy, "DL")) goto l1670; + } + l1671:; if (!yy_Spnl(yy)) goto l1670; if (!yymatchChar(yy, '>')) goto l1670; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseDl", yy->__buf+yy->__pos)); + return 1; + l1670:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseDl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenDl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenDl")); if (!yymatchChar(yy, '<')) goto l1673; if (!yy_Spnl(yy)) goto l1673; + { int yypos1674= yy->__pos, yythunkpos1674= yy->__thunkpos; if (!yymatchString(yy, "dl")) goto l1675; goto l1674; + l1675:; yy->__pos= yypos1674; yy->__thunkpos= yythunkpos1674; if (!yymatchString(yy, "DL")) goto l1673; + } + l1674:; if (!yy_Spnl(yy)) goto l1673; + l1676:; + { int yypos1677= yy->__pos, yythunkpos1677= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1677; goto l1676; + l1677:; yy->__pos= yypos1677; yy->__thunkpos= yythunkpos1677; + } if (!yymatchChar(yy, '>')) goto l1673; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenDl", yy->__buf+yy->__pos)); + return 1; + l1673:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenDl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockDiv(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockDiv")); if (!yy_HtmlBlockOpenDiv(yy)) goto l1678; + l1679:; + { int yypos1680= yy->__pos, yythunkpos1680= yy->__thunkpos; + { int yypos1681= yy->__pos, yythunkpos1681= yy->__thunkpos; if (!yy_HtmlBlockDiv(yy)) goto l1682; goto l1681; + l1682:; yy->__pos= yypos1681; yy->__thunkpos= yythunkpos1681; + { int yypos1683= yy->__pos, yythunkpos1683= yy->__thunkpos; if (!yy_HtmlBlockCloseDiv(yy)) goto l1683; goto l1680; + l1683:; yy->__pos= yypos1683; yy->__thunkpos= yythunkpos1683; + } if (!yymatchDot(yy)) goto l1680; + } + l1681:; goto l1679; + l1680:; yy->__pos= yypos1680; yy->__thunkpos= yythunkpos1680; + } if (!yy_HtmlBlockCloseDiv(yy)) goto l1678; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockDiv", yy->__buf+yy->__pos)); + return 1; + l1678:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockDiv", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseDiv(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseDiv")); if (!yymatchChar(yy, '<')) goto l1684; if (!yy_Spnl(yy)) goto l1684; if (!yymatchChar(yy, '/')) goto l1684; + { int yypos1685= yy->__pos, yythunkpos1685= yy->__thunkpos; if (!yymatchString(yy, "div")) goto l1686; goto l1685; + l1686:; yy->__pos= yypos1685; yy->__thunkpos= yythunkpos1685; if (!yymatchString(yy, "DIV")) goto l1684; + } + l1685:; if (!yy_Spnl(yy)) goto l1684; if (!yymatchChar(yy, '>')) goto l1684; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseDiv", yy->__buf+yy->__pos)); + return 1; + l1684:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseDiv", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockDir(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockDir")); if (!yy_HtmlBlockOpenDir(yy)) goto l1687; + l1688:; + { int yypos1689= yy->__pos, yythunkpos1689= yy->__thunkpos; + { int yypos1690= yy->__pos, yythunkpos1690= yy->__thunkpos; if (!yy_HtmlBlockDir(yy)) goto l1691; goto l1690; + l1691:; yy->__pos= yypos1690; yy->__thunkpos= yythunkpos1690; + { int yypos1692= yy->__pos, yythunkpos1692= yy->__thunkpos; if (!yy_HtmlBlockCloseDir(yy)) goto l1692; goto l1689; + l1692:; yy->__pos= yypos1692; yy->__thunkpos= yythunkpos1692; + } if (!yymatchDot(yy)) goto l1689; + } + l1690:; goto l1688; + l1689:; yy->__pos= yypos1689; yy->__thunkpos= yythunkpos1689; + } if (!yy_HtmlBlockCloseDir(yy)) goto l1687; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockDir", yy->__buf+yy->__pos)); + return 1; + l1687:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockDir", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseDir(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseDir")); if (!yymatchChar(yy, '<')) goto l1693; if (!yy_Spnl(yy)) goto l1693; if (!yymatchChar(yy, '/')) goto l1693; + { int yypos1694= yy->__pos, yythunkpos1694= yy->__thunkpos; if (!yymatchString(yy, "dir")) goto l1695; goto l1694; + l1695:; yy->__pos= yypos1694; yy->__thunkpos= yythunkpos1694; if (!yymatchString(yy, "DIR")) goto l1693; + } + l1694:; if (!yy_Spnl(yy)) goto l1693; if (!yymatchChar(yy, '>')) goto l1693; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseDir", yy->__buf+yy->__pos)); + return 1; + l1693:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseDir", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenDir(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenDir")); if (!yymatchChar(yy, '<')) goto l1696; if (!yy_Spnl(yy)) goto l1696; + { int yypos1697= yy->__pos, yythunkpos1697= yy->__thunkpos; if (!yymatchString(yy, "dir")) goto l1698; goto l1697; + l1698:; yy->__pos= yypos1697; yy->__thunkpos= yythunkpos1697; if (!yymatchString(yy, "DIR")) goto l1696; + } + l1697:; if (!yy_Spnl(yy)) goto l1696; + l1699:; + { int yypos1700= yy->__pos, yythunkpos1700= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1700; goto l1699; + l1700:; yy->__pos= yypos1700; yy->__thunkpos= yythunkpos1700; + } if (!yymatchChar(yy, '>')) goto l1696; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenDir", yy->__buf+yy->__pos)); + return 1; + l1696:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenDir", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCenter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCenter")); if (!yy_HtmlBlockOpenCenter(yy)) goto l1701; + l1702:; + { int yypos1703= yy->__pos, yythunkpos1703= yy->__thunkpos; + { int yypos1704= yy->__pos, yythunkpos1704= yy->__thunkpos; if (!yy_HtmlBlockCenter(yy)) goto l1705; goto l1704; + l1705:; yy->__pos= yypos1704; yy->__thunkpos= yythunkpos1704; + { int yypos1706= yy->__pos, yythunkpos1706= yy->__thunkpos; if (!yy_HtmlBlockCloseCenter(yy)) goto l1706; goto l1703; + l1706:; yy->__pos= yypos1706; yy->__thunkpos= yythunkpos1706; + } if (!yymatchDot(yy)) goto l1703; + } + l1704:; goto l1702; + l1703:; yy->__pos= yypos1703; yy->__thunkpos= yythunkpos1703; + } if (!yy_HtmlBlockCloseCenter(yy)) goto l1701; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCenter", yy->__buf+yy->__pos)); + return 1; + l1701:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCenter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseCenter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseCenter")); if (!yymatchChar(yy, '<')) goto l1707; if (!yy_Spnl(yy)) goto l1707; if (!yymatchChar(yy, '/')) goto l1707; + { int yypos1708= yy->__pos, yythunkpos1708= yy->__thunkpos; if (!yymatchString(yy, "center")) goto l1709; goto l1708; + l1709:; yy->__pos= yypos1708; yy->__thunkpos= yythunkpos1708; if (!yymatchString(yy, "CENTER")) goto l1707; + } + l1708:; if (!yy_Spnl(yy)) goto l1707; if (!yymatchChar(yy, '>')) goto l1707; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseCenter", yy->__buf+yy->__pos)); + return 1; + l1707:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseCenter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenCenter(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenCenter")); if (!yymatchChar(yy, '<')) goto l1710; if (!yy_Spnl(yy)) goto l1710; + { int yypos1711= yy->__pos, yythunkpos1711= yy->__thunkpos; if (!yymatchString(yy, "center")) goto l1712; goto l1711; + l1712:; yy->__pos= yypos1711; yy->__thunkpos= yythunkpos1711; if (!yymatchString(yy, "CENTER")) goto l1710; + } + l1711:; if (!yy_Spnl(yy)) goto l1710; + l1713:; + { int yypos1714= yy->__pos, yythunkpos1714= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1714; goto l1713; + l1714:; yy->__pos= yypos1714; yy->__thunkpos= yythunkpos1714; + } if (!yymatchChar(yy, '>')) goto l1710; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenCenter", yy->__buf+yy->__pos)); + return 1; + l1710:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenCenter", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCanvas(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCanvas")); if (!yy_HtmlBlockOpenCanvas(yy)) goto l1715; + l1716:; + { int yypos1717= yy->__pos, yythunkpos1717= yy->__thunkpos; + { int yypos1718= yy->__pos, yythunkpos1718= yy->__thunkpos; if (!yy_HtmlBlockCanvas(yy)) goto l1719; goto l1718; + l1719:; yy->__pos= yypos1718; yy->__thunkpos= yythunkpos1718; + { int yypos1720= yy->__pos, yythunkpos1720= yy->__thunkpos; if (!yy_HtmlBlockCloseCanvas(yy)) goto l1720; goto l1717; + l1720:; yy->__pos= yypos1720; yy->__thunkpos= yythunkpos1720; + } if (!yymatchDot(yy)) goto l1717; + } + l1718:; goto l1716; + l1717:; yy->__pos= yypos1717; yy->__thunkpos= yythunkpos1717; + } if (!yy_HtmlBlockCloseCanvas(yy)) goto l1715; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCanvas", yy->__buf+yy->__pos)); + return 1; + l1715:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCanvas", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseCanvas(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseCanvas")); if (!yymatchChar(yy, '<')) goto l1721; if (!yy_Spnl(yy)) goto l1721; if (!yymatchChar(yy, '/')) goto l1721; + { int yypos1722= yy->__pos, yythunkpos1722= yy->__thunkpos; if (!yymatchString(yy, "canvas")) goto l1723; goto l1722; + l1723:; yy->__pos= yypos1722; yy->__thunkpos= yythunkpos1722; if (!yymatchString(yy, "CANVAS")) goto l1721; + } + l1722:; if (!yy_Spnl(yy)) goto l1721; if (!yymatchChar(yy, '>')) goto l1721; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseCanvas", yy->__buf+yy->__pos)); + return 1; + l1721:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseCanvas", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenCanvas(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenCanvas")); if (!yymatchChar(yy, '<')) goto l1724; if (!yy_Spnl(yy)) goto l1724; + { int yypos1725= yy->__pos, yythunkpos1725= yy->__thunkpos; if (!yymatchString(yy, "canvas")) goto l1726; goto l1725; + l1726:; yy->__pos= yypos1725; yy->__thunkpos= yythunkpos1725; if (!yymatchString(yy, "CANVAS")) goto l1724; + } + l1725:; if (!yy_Spnl(yy)) goto l1724; + l1727:; + { int yypos1728= yy->__pos, yythunkpos1728= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1728; goto l1727; + l1728:; yy->__pos= yypos1728; yy->__thunkpos= yythunkpos1728; + } if (!yymatchChar(yy, '>')) goto l1724; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenCanvas", yy->__buf+yy->__pos)); + return 1; + l1724:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenCanvas", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockBlockquote(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockBlockquote")); if (!yy_HtmlBlockOpenBlockquote(yy)) goto l1729; + l1730:; + { int yypos1731= yy->__pos, yythunkpos1731= yy->__thunkpos; + { int yypos1732= yy->__pos, yythunkpos1732= yy->__thunkpos; if (!yy_HtmlBlockBlockquote(yy)) goto l1733; goto l1732; + l1733:; yy->__pos= yypos1732; yy->__thunkpos= yythunkpos1732; + { int yypos1734= yy->__pos, yythunkpos1734= yy->__thunkpos; if (!yy_HtmlBlockCloseBlockquote(yy)) goto l1734; goto l1731; + l1734:; yy->__pos= yypos1734; yy->__thunkpos= yythunkpos1734; + } if (!yymatchDot(yy)) goto l1731; + } + l1732:; goto l1730; + l1731:; yy->__pos= yypos1731; yy->__thunkpos= yythunkpos1731; + } if (!yy_HtmlBlockCloseBlockquote(yy)) goto l1729; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockBlockquote", yy->__buf+yy->__pos)); + return 1; + l1729:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockBlockquote", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseBlockquote(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseBlockquote")); if (!yymatchChar(yy, '<')) goto l1735; if (!yy_Spnl(yy)) goto l1735; if (!yymatchChar(yy, '/')) goto l1735; + { int yypos1736= yy->__pos, yythunkpos1736= yy->__thunkpos; if (!yymatchString(yy, "blockquote")) goto l1737; goto l1736; + l1737:; yy->__pos= yypos1736; yy->__thunkpos= yythunkpos1736; if (!yymatchString(yy, "BLOCKQUOTE")) goto l1735; + } + l1736:; if (!yy_Spnl(yy)) goto l1735; if (!yymatchChar(yy, '>')) goto l1735; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseBlockquote", yy->__buf+yy->__pos)); + return 1; + l1735:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseBlockquote", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenBlockquote(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenBlockquote")); if (!yymatchChar(yy, '<')) goto l1738; if (!yy_Spnl(yy)) goto l1738; + { int yypos1739= yy->__pos, yythunkpos1739= yy->__thunkpos; if (!yymatchString(yy, "blockquote")) goto l1740; goto l1739; + l1740:; yy->__pos= yypos1739; yy->__thunkpos= yythunkpos1739; if (!yymatchString(yy, "BLOCKQUOTE")) goto l1738; + } + l1739:; if (!yy_Spnl(yy)) goto l1738; + l1741:; + { int yypos1742= yy->__pos, yythunkpos1742= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1742; goto l1741; + l1742:; yy->__pos= yypos1742; yy->__thunkpos= yythunkpos1742; + } if (!yymatchChar(yy, '>')) goto l1738; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenBlockquote", yy->__buf+yy->__pos)); + return 1; + l1738:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenBlockquote", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockAside(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockAside")); if (!yy_HtmlBlockOpenAside(yy)) goto l1743; + l1744:; + { int yypos1745= yy->__pos, yythunkpos1745= yy->__thunkpos; + { int yypos1746= yy->__pos, yythunkpos1746= yy->__thunkpos; if (!yy_HtmlBlockAside(yy)) goto l1747; goto l1746; + l1747:; yy->__pos= yypos1746; yy->__thunkpos= yythunkpos1746; + { int yypos1748= yy->__pos, yythunkpos1748= yy->__thunkpos; if (!yy_HtmlBlockCloseAside(yy)) goto l1748; goto l1745; + l1748:; yy->__pos= yypos1748; yy->__thunkpos= yythunkpos1748; + } if (!yymatchDot(yy)) goto l1745; + } + l1746:; goto l1744; + l1745:; yy->__pos= yypos1745; yy->__thunkpos= yythunkpos1745; + } if (!yy_HtmlBlockCloseAside(yy)) goto l1743; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockAside", yy->__buf+yy->__pos)); + return 1; + l1743:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockAside", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseAside(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseAside")); if (!yymatchChar(yy, '<')) goto l1749; if (!yy_Spnl(yy)) goto l1749; if (!yymatchChar(yy, '/')) goto l1749; + { int yypos1750= yy->__pos, yythunkpos1750= yy->__thunkpos; if (!yymatchString(yy, "aside")) goto l1751; goto l1750; + l1751:; yy->__pos= yypos1750; yy->__thunkpos= yythunkpos1750; if (!yymatchString(yy, "ASIDE")) goto l1749; + } + l1750:; if (!yy_Spnl(yy)) goto l1749; if (!yymatchChar(yy, '>')) goto l1749; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseAside", yy->__buf+yy->__pos)); + return 1; + l1749:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseAside", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenAside(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenAside")); if (!yymatchChar(yy, '<')) goto l1752; if (!yy_Spnl(yy)) goto l1752; + { int yypos1753= yy->__pos, yythunkpos1753= yy->__thunkpos; if (!yymatchString(yy, "aside")) goto l1754; goto l1753; + l1754:; yy->__pos= yypos1753; yy->__thunkpos= yythunkpos1753; if (!yymatchString(yy, "ASIDE")) goto l1752; + } + l1753:; if (!yy_Spnl(yy)) goto l1752; + l1755:; + { int yypos1756= yy->__pos, yythunkpos1756= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1756; goto l1755; + l1756:; yy->__pos= yypos1756; yy->__thunkpos= yythunkpos1756; + } if (!yymatchChar(yy, '>')) goto l1752; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenAside", yy->__buf+yy->__pos)); + return 1; + l1752:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenAside", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockArticle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockArticle")); if (!yy_HtmlBlockOpenArticle(yy)) goto l1757; + l1758:; + { int yypos1759= yy->__pos, yythunkpos1759= yy->__thunkpos; + { int yypos1760= yy->__pos, yythunkpos1760= yy->__thunkpos; if (!yy_HtmlBlockArticle(yy)) goto l1761; goto l1760; + l1761:; yy->__pos= yypos1760; yy->__thunkpos= yythunkpos1760; + { int yypos1762= yy->__pos, yythunkpos1762= yy->__thunkpos; if (!yy_HtmlBlockCloseArticle(yy)) goto l1762; goto l1759; + l1762:; yy->__pos= yypos1762; yy->__thunkpos= yythunkpos1762; + } if (!yymatchDot(yy)) goto l1759; + } + l1760:; goto l1758; + l1759:; yy->__pos= yypos1759; yy->__thunkpos= yythunkpos1759; + } if (!yy_HtmlBlockCloseArticle(yy)) goto l1757; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockArticle", yy->__buf+yy->__pos)); + return 1; + l1757:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockArticle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseArticle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseArticle")); if (!yymatchChar(yy, '<')) goto l1763; if (!yy_Spnl(yy)) goto l1763; if (!yymatchChar(yy, '/')) goto l1763; + { int yypos1764= yy->__pos, yythunkpos1764= yy->__thunkpos; if (!yymatchString(yy, "article")) goto l1765; goto l1764; + l1765:; yy->__pos= yypos1764; yy->__thunkpos= yythunkpos1764; if (!yymatchString(yy, "ARTICLE")) goto l1763; + } + l1764:; if (!yy_Spnl(yy)) goto l1763; if (!yymatchChar(yy, '>')) goto l1763; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseArticle", yy->__buf+yy->__pos)); + return 1; + l1763:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseArticle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenArticle(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenArticle")); if (!yymatchChar(yy, '<')) goto l1766; if (!yy_Spnl(yy)) goto l1766; + { int yypos1767= yy->__pos, yythunkpos1767= yy->__thunkpos; if (!yymatchString(yy, "article")) goto l1768; goto l1767; + l1768:; yy->__pos= yypos1767; yy->__thunkpos= yythunkpos1767; if (!yymatchString(yy, "ARTICLE")) goto l1766; + } + l1767:; if (!yy_Spnl(yy)) goto l1766; + l1769:; + { int yypos1770= yy->__pos, yythunkpos1770= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1770; goto l1769; + l1770:; yy->__pos= yypos1770; yy->__thunkpos= yythunkpos1770; + } if (!yymatchChar(yy, '>')) goto l1766; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenArticle", yy->__buf+yy->__pos)); + return 1; + l1766:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenArticle", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockAddress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockAddress")); if (!yy_HtmlBlockOpenAddress(yy)) goto l1771; + l1772:; + { int yypos1773= yy->__pos, yythunkpos1773= yy->__thunkpos; + { int yypos1774= yy->__pos, yythunkpos1774= yy->__thunkpos; if (!yy_HtmlBlockAddress(yy)) goto l1775; goto l1774; + l1775:; yy->__pos= yypos1774; yy->__thunkpos= yythunkpos1774; + { int yypos1776= yy->__pos, yythunkpos1776= yy->__thunkpos; if (!yy_HtmlBlockCloseAddress(yy)) goto l1776; goto l1773; + l1776:; yy->__pos= yypos1776; yy->__thunkpos= yythunkpos1776; + } if (!yymatchDot(yy)) goto l1773; + } + l1774:; goto l1772; + l1773:; yy->__pos= yypos1773; yy->__thunkpos= yythunkpos1773; + } if (!yy_HtmlBlockCloseAddress(yy)) goto l1771; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockAddress", yy->__buf+yy->__pos)); + return 1; + l1771:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockAddress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockCloseAddress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockCloseAddress")); if (!yymatchChar(yy, '<')) goto l1777; if (!yy_Spnl(yy)) goto l1777; if (!yymatchChar(yy, '/')) goto l1777; + { int yypos1778= yy->__pos, yythunkpos1778= yy->__thunkpos; if (!yymatchString(yy, "address")) goto l1779; goto l1778; + l1779:; yy->__pos= yypos1778; yy->__thunkpos= yythunkpos1778; if (!yymatchString(yy, "ADDRESS")) goto l1777; + } + l1778:; if (!yy_Spnl(yy)) goto l1777; if (!yymatchChar(yy, '>')) goto l1777; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockCloseAddress", yy->__buf+yy->__pos)); + return 1; + l1777:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockCloseAddress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlAttribute(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlAttribute")); + { int yypos1783= yy->__pos, yythunkpos1783= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l1784; goto l1783; + l1784:; yy->__pos= yypos1783; yy->__thunkpos= yythunkpos1783; if (!yymatchChar(yy, '-')) goto l1780; + } + l1783:; + l1781:; + { int yypos1782= yy->__pos, yythunkpos1782= yy->__thunkpos; + { int yypos1785= yy->__pos, yythunkpos1785= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l1786; goto l1785; + l1786:; yy->__pos= yypos1785; yy->__thunkpos= yythunkpos1785; if (!yymatchChar(yy, '-')) goto l1782; + } + l1785:; goto l1781; + l1782:; yy->__pos= yypos1782; yy->__thunkpos= yythunkpos1782; + } if (!yy_Spnl(yy)) goto l1780; + { int yypos1787= yy->__pos, yythunkpos1787= yy->__thunkpos; if (!yymatchChar(yy, '=')) goto l1787; if (!yy_Spnl(yy)) goto l1787; + { int yypos1789= yy->__pos, yythunkpos1789= yy->__thunkpos; if (!yy_Quoted(yy)) goto l1790; goto l1789; + l1790:; yy->__pos= yypos1789; yy->__thunkpos= yythunkpos1789; + { int yypos1793= yy->__pos, yythunkpos1793= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l1793; goto l1787; + l1793:; yy->__pos= yypos1793; yy->__thunkpos= yythunkpos1793; + } if (!yy_Nonspacechar(yy)) goto l1787; + l1791:; + { int yypos1792= yy->__pos, yythunkpos1792= yy->__thunkpos; + { int yypos1794= yy->__pos, yythunkpos1794= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l1794; goto l1792; + l1794:; yy->__pos= yypos1794; yy->__thunkpos= yythunkpos1794; + } if (!yy_Nonspacechar(yy)) goto l1792; goto l1791; + l1792:; yy->__pos= yypos1792; yy->__thunkpos= yythunkpos1792; + } + } + l1789:; goto l1788; + l1787:; yy->__pos= yypos1787; yy->__thunkpos= yythunkpos1787; + } + l1788:; if (!yy_Spnl(yy)) goto l1780; + yyprintf((stderr, " ok %s @ %s\n", "HtmlAttribute", yy->__buf+yy->__pos)); + return 1; + l1780:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlAttribute", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Spnl(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Spnl")); if (!yy_Sp(yy)) goto l1795; + { int yypos1796= yy->__pos, yythunkpos1796= yy->__thunkpos; if (!yy_Newline(yy)) goto l1796; if (!yy_Sp(yy)) goto l1796; goto l1797; + l1796:; yy->__pos= yypos1796; yy->__thunkpos= yythunkpos1796; + } + l1797:; + yyprintf((stderr, " ok %s @ %s\n", "Spnl", yy->__buf+yy->__pos)); + return 1; + l1795:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Spnl", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenAddress(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenAddress")); if (!yymatchChar(yy, '<')) goto l1798; if (!yy_Spnl(yy)) goto l1798; + { int yypos1799= yy->__pos, yythunkpos1799= yy->__thunkpos; if (!yymatchString(yy, "address")) goto l1800; goto l1799; + l1800:; yy->__pos= yypos1799; yy->__thunkpos= yythunkpos1799; if (!yymatchString(yy, "ADDRESS")) goto l1798; + } + l1799:; if (!yy_Spnl(yy)) goto l1798; + l1801:; + { int yypos1802= yy->__pos, yythunkpos1802= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l1802; goto l1801; + l1802:; yy->__pos= yypos1802; yy->__thunkpos= yythunkpos1802; + } if (!yymatchChar(yy, '>')) goto l1798; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenAddress", yy->__buf+yy->__pos)); + return 1; + l1798:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenAddress", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OptionallyIndentedLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OptionallyIndentedLine")); + { int yypos1804= yy->__pos, yythunkpos1804= yy->__thunkpos; if (!yy_Indent(yy)) goto l1804; goto l1805; + l1804:; yy->__pos= yypos1804; yy->__thunkpos= yythunkpos1804; + } + l1805:; if (!yy_Line(yy)) goto l1803; + yyprintf((stderr, " ok %s @ %s\n", "OptionallyIndentedLine", yy->__buf+yy->__pos)); + return 1; + l1803:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OptionallyIndentedLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Indent(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Indent")); + { int yypos1807= yy->__pos, yythunkpos1807= yy->__thunkpos; if (!yymatchChar(yy, '\t')) goto l1808; goto l1807; + l1808:; yy->__pos= yypos1807; yy->__thunkpos= yythunkpos1807; if (!yymatchString(yy, " ")) goto l1806; + } + l1807:; + yyprintf((stderr, " ok %s @ %s\n", "Indent", yy->__buf+yy->__pos)); + return 1; + l1806:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Indent", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListBlockLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ListBlockLine")); + { int yypos1810= yy->__pos, yythunkpos1810= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l1810; goto l1809; + l1810:; yy->__pos= yypos1810; yy->__thunkpos= yythunkpos1810; + } + { int yypos1811= yy->__pos, yythunkpos1811= yy->__thunkpos; + { int yypos1812= yy->__pos, yythunkpos1812= yy->__thunkpos; if (!yy_Indent(yy)) goto l1812; goto l1813; + l1812:; yy->__pos= yypos1812; yy->__thunkpos= yythunkpos1812; + } + l1813:; + { int yypos1814= yy->__pos, yythunkpos1814= yy->__thunkpos; if (!yy_Bullet(yy)) goto l1815; goto l1814; + l1815:; yy->__pos= yypos1814; yy->__thunkpos= yythunkpos1814; if (!yy_Enumerator(yy)) goto l1811; + } + l1814:; goto l1809; + l1811:; yy->__pos= yypos1811; yy->__thunkpos= yythunkpos1811; + } + { int yypos1816= yy->__pos, yythunkpos1816= yy->__thunkpos; if (!yy_HorizontalRule(yy)) goto l1816; goto l1809; + l1816:; yy->__pos= yypos1816; yy->__thunkpos= yythunkpos1816; + } if (!yy_OptionallyIndentedLine(yy)) goto l1809; + yyprintf((stderr, " ok %s @ %s\n", "ListBlockLine", yy->__buf+yy->__pos)); + return 1; + l1809:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListBlockLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListContinuationBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "ListContinuationBlock")); if (!yy_StartList(yy)) goto l1817; yyDo(yy, yySet, -1, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1817; +#undef yytext +#undef yyleng + } + l1818:; + { int yypos1819= yy->__pos, yythunkpos1819= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l1819; goto l1818; + l1819:; yy->__pos= yypos1819; yy->__thunkpos= yythunkpos1819; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1817; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_ListContinuationBlock, yy->__begin, yy->__end); if (!yy_Indent(yy)) goto l1817; if (!yy_ListBlock(yy)) goto l1817; yyDo(yy, yy_2_ListContinuationBlock, yy->__begin, yy->__end); + l1820:; + { int yypos1821= yy->__pos, yythunkpos1821= yy->__thunkpos; if (!yy_Indent(yy)) goto l1821; if (!yy_ListBlock(yy)) goto l1821; yyDo(yy, yy_2_ListContinuationBlock, yy->__begin, yy->__end); goto l1820; + l1821:; yy->__pos= yypos1821; yy->__thunkpos= yythunkpos1821; + } yyDo(yy, yy_3_ListContinuationBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListContinuationBlock", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1817:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListContinuationBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "ListBlock")); if (!yy_StartList(yy)) goto l1822; yyDo(yy, yySet, -1, 0); + { int yypos1823= yy->__pos, yythunkpos1823= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l1823; goto l1822; + l1823:; yy->__pos= yypos1823; yy->__thunkpos= yythunkpos1823; + } if (!yy_Line(yy)) goto l1822; yyDo(yy, yy_1_ListBlock, yy->__begin, yy->__end); + l1824:; + { int yypos1825= yy->__pos, yythunkpos1825= yy->__thunkpos; if (!yy_ListBlockLine(yy)) goto l1825; yyDo(yy, yy_2_ListBlock, yy->__begin, yy->__end); goto l1824; + l1825:; yy->__pos= yypos1825; yy->__thunkpos= yythunkpos1825; + } yyDo(yy, yy_3_ListBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListBlock", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1822:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListItem(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "ListItem")); if (!yy_BulletOrEnum(yy)) goto l1826; yyDo(yy, yySet, -2, 0); if (!yy_StartList(yy)) goto l1826; yyDo(yy, yySet, -1, 0); if (!yy_ListBlock(yy)) goto l1826; yyDo(yy, yy_1_ListItem, yy->__begin, yy->__end); + l1827:; + { int yypos1828= yy->__pos, yythunkpos1828= yy->__thunkpos; if (!yy_ListContinuationBlock(yy)) goto l1828; yyDo(yy, yy_2_ListItem, yy->__begin, yy->__end); goto l1827; + l1828:; yy->__pos= yypos1828; yy->__thunkpos= yythunkpos1828; + } yyDo(yy, yy_3_ListItem, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListItem", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1826:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListItem", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListItemTight(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "ListItemTight")); if (!yy_BulletOrEnum(yy)) goto l1829; yyDo(yy, yySet, -2, 0); if (!yy_StartList(yy)) goto l1829; yyDo(yy, yySet, -1, 0); if (!yy_ListBlock(yy)) goto l1829; yyDo(yy, yy_1_ListItemTight, yy->__begin, yy->__end); + l1830:; + { int yypos1831= yy->__pos, yythunkpos1831= yy->__thunkpos; + { int yypos1832= yy->__pos, yythunkpos1832= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l1832; goto l1831; + l1832:; yy->__pos= yypos1832; yy->__thunkpos= yythunkpos1832; + } if (!yy_ListContinuationBlock(yy)) goto l1831; yyDo(yy, yy_2_ListItemTight, yy->__begin, yy->__end); goto l1830; + l1831:; yy->__pos= yypos1831; yy->__thunkpos= yythunkpos1831; + } + { int yypos1833= yy->__pos, yythunkpos1833= yy->__thunkpos; if (!yy_ListContinuationBlock(yy)) goto l1833; goto l1829; + l1833:; yy->__pos= yypos1833; yy->__thunkpos= yythunkpos1833; + } yyDo(yy, yy_3_ListItemTight, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListItemTight", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1829:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListItemTight", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Enumerator(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Enumerator")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1834; +#undef yytext +#undef yyleng + } if (!yy_NonindentSpace(yy)) goto l1834; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l1834; + l1835:; + { int yypos1836= yy->__pos, yythunkpos1836= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l1836; goto l1835; + l1836:; yy->__pos= yypos1836; yy->__thunkpos= yythunkpos1836; + } if (!yymatchChar(yy, '.')) goto l1834; if (!yy_Spacechar(yy)) goto l1834; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1834; +#undef yytext +#undef yyleng + } + { int yypos1837= yy->__pos, yythunkpos1837= yy->__thunkpos; + l1838:; + { int yypos1839= yy->__pos, yythunkpos1839= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1839; goto l1838; + l1839:; yy->__pos= yypos1839; yy->__thunkpos= yythunkpos1839; + } yy->__pos= yypos1837; yy->__thunkpos= yythunkpos1837; + } yyDo(yy, yy_1_Enumerator, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Enumerator", yy->__buf+yy->__pos)); + return 1; + l1834:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Enumerator", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BulletOrEnum(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "BulletOrEnum")); + { int yypos1841= yy->__pos, yythunkpos1841= yy->__thunkpos; if (!yy_Bullet(yy)) goto l1842; goto l1841; + l1842:; yy->__pos= yypos1841; yy->__thunkpos= yythunkpos1841; if (!yy_Enumerator(yy)) goto l1840; + } + l1841:; + yyprintf((stderr, " ok %s @ %s\n", "BulletOrEnum", yy->__buf+yy->__pos)); + return 1; + l1840:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BulletOrEnum", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListLoose(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "ListLoose")); if (!yy_StartList(yy)) goto l1843; yyDo(yy, yySet, -2, 0); if (!yy_ListItem(yy)) goto l1843; yyDo(yy, yySet, -1, 0); + l1846:; + { int yypos1847= yy->__pos, yythunkpos1847= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1847; goto l1846; + l1847:; yy->__pos= yypos1847; yy->__thunkpos= yythunkpos1847; + } yyDo(yy, yy_1_ListLoose, yy->__begin, yy->__end); + l1844:; + { int yypos1845= yy->__pos, yythunkpos1845= yy->__thunkpos; if (!yy_ListItem(yy)) goto l1845; yyDo(yy, yySet, -1, 0); + l1848:; + { int yypos1849= yy->__pos, yythunkpos1849= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1849; goto l1848; + l1849:; yy->__pos= yypos1849; yy->__thunkpos= yythunkpos1849; + } yyDo(yy, yy_1_ListLoose, yy->__begin, yy->__end); goto l1844; + l1845:; yy->__pos= yypos1845; yy->__thunkpos= yythunkpos1845; + } yyDo(yy, yy_2_ListLoose, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListLoose", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1843:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListLoose", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ListTight(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "ListTight")); if (!yy_StartList(yy)) goto l1850; yyDo(yy, yySet, -1, 0); if (!yy_ListItemTight(yy)) goto l1850; yyDo(yy, yy_1_ListTight, yy->__begin, yy->__end); + l1851:; + { int yypos1852= yy->__pos, yythunkpos1852= yy->__thunkpos; if (!yy_ListItemTight(yy)) goto l1852; yyDo(yy, yy_1_ListTight, yy->__begin, yy->__end); goto l1851; + l1852:; yy->__pos= yypos1852; yy->__thunkpos= yythunkpos1852; + } + l1853:; + { int yypos1854= yy->__pos, yythunkpos1854= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1854; goto l1853; + l1854:; yy->__pos= yypos1854; yy->__thunkpos= yythunkpos1854; + } + { int yypos1855= yy->__pos, yythunkpos1855= yy->__thunkpos; + { int yypos1856= yy->__pos, yythunkpos1856= yy->__thunkpos; if (!yy_Bullet(yy)) goto l1857; goto l1856; + l1857:; yy->__pos= yypos1856; yy->__thunkpos= yythunkpos1856; if (!yy_Enumerator(yy)) goto l1855; + } + l1856:; goto l1850; + l1855:; yy->__pos= yypos1855; yy->__thunkpos= yythunkpos1855; + } yyDo(yy, yy_2_ListTight, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ListTight", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1850:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ListTight", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Spacechar(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Spacechar")); + { int yypos1859= yy->__pos, yythunkpos1859= yy->__thunkpos; if (!yymatchChar(yy, ' ')) goto l1860; goto l1859; + l1860:; yy->__pos= yypos1859; yy->__thunkpos= yythunkpos1859; if (!yymatchChar(yy, '\t')) goto l1858; + } + l1859:; + yyprintf((stderr, " ok %s @ %s\n", "Spacechar", yy->__buf+yy->__pos)); + return 1; + l1858:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Spacechar", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Bullet(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Bullet")); + { int yypos1862= yy->__pos, yythunkpos1862= yy->__thunkpos; if (!yy_HorizontalRule(yy)) goto l1862; goto l1861; + l1862:; yy->__pos= yypos1862; yy->__thunkpos= yythunkpos1862; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1861; +#undef yytext +#undef yyleng + } if (!yy_NonindentSpace(yy)) goto l1861; + { int yypos1863= yy->__pos, yythunkpos1863= yy->__thunkpos; if (!yymatchChar(yy, '+')) goto l1864; goto l1863; + l1864:; yy->__pos= yypos1863; yy->__thunkpos= yythunkpos1863; if (!yymatchChar(yy, '*')) goto l1865; goto l1863; + l1865:; yy->__pos= yypos1863; yy->__thunkpos= yythunkpos1863; if (!yymatchChar(yy, '-')) goto l1861; + } + l1863:; if (!yy_Spacechar(yy)) goto l1861; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1861; +#undef yytext +#undef yyleng + } + { int yypos1866= yy->__pos, yythunkpos1866= yy->__thunkpos; + l1867:; + { int yypos1868= yy->__pos, yythunkpos1868= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l1868; goto l1867; + l1868:; yy->__pos= yypos1868; yy->__thunkpos= yythunkpos1868; + } yy->__pos= yypos1866; yy->__thunkpos= yythunkpos1866; + } yyDo(yy, yy_1_Bullet, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Bullet", yy->__buf+yy->__pos)); + return 1; + l1861:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Bullet", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NonindentSpace(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NonindentSpace")); + { int yypos1870= yy->__pos, yythunkpos1870= yy->__thunkpos; if (!yymatchString(yy, " ")) goto l1871; goto l1870; + l1871:; yy->__pos= yypos1870; yy->__thunkpos= yythunkpos1870; if (!yymatchString(yy, " ")) goto l1872; goto l1870; + l1872:; yy->__pos= yypos1870; yy->__thunkpos= yythunkpos1870; if (!yymatchChar(yy, ' ')) goto l1873; goto l1870; + l1873:; yy->__pos= yypos1870; yy->__thunkpos= yythunkpos1870; if (!yymatchString(yy, "")) goto l1869; + } + l1870:; + yyprintf((stderr, " ok %s @ %s\n", "NonindentSpace", yy->__buf+yy->__pos)); + return 1; + l1869:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NonindentSpace", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MagicBlankLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MagicBlankLine")); + { int yypos1875= yy->__pos, yythunkpos1875= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES) )) goto l1875; +#undef yytext +#undef yyleng + } if (!yymatchString(yy, "\356")) goto l1875; if (!yymatchString(yy, "\273")) goto l1875; if (!yymatchString(yy, "\256")) goto l1875; goto l1876; + l1875:; yy->__pos= yypos1875; yy->__thunkpos= yythunkpos1875; + } + l1876:; if (!yy_Sp(yy)) goto l1874; if (!yy_Newline(yy)) goto l1874; + yyprintf((stderr, " ok %s @ %s\n", "MagicBlankLine", yy->__buf+yy->__pos)); + return 1; + l1874:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MagicBlankLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FollowingVerbatimChunk(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "FollowingVerbatimChunk")); if (!yy_StartList(yy)) goto l1877; yyDo(yy, yySet, -1, 0); + l1878:; + { int yypos1879= yy->__pos, yythunkpos1879= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l1879; yyDo(yy, yy_1_FollowingVerbatimChunk, yy->__begin, yy->__end); goto l1878; + l1879:; yy->__pos= yypos1879; yy->__thunkpos= yythunkpos1879; + } if (!yy_NonblankIndentedLine(yy)) goto l1877; yyDo(yy, yy_2_FollowingVerbatimChunk, yy->__begin, yy->__end); + l1880:; + { int yypos1881= yy->__pos, yythunkpos1881= yy->__thunkpos; if (!yy_NonblankIndentedLine(yy)) goto l1881; yyDo(yy, yy_2_FollowingVerbatimChunk, yy->__begin, yy->__end); goto l1880; + l1881:; yy->__pos= yypos1881; yy->__thunkpos= yythunkpos1881; + } yyDo(yy, yy_3_FollowingVerbatimChunk, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FollowingVerbatimChunk", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1877:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FollowingVerbatimChunk", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FirstVerbatimChunk(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "FirstVerbatimChunk")); if (!yy_StartList(yy)) goto l1882; yyDo(yy, yySet, -1, 0); if (!yy_NonblankIndentedLine(yy)) goto l1882; yyDo(yy, yy_1_FirstVerbatimChunk, yy->__begin, yy->__end); + l1883:; + { int yypos1884= yy->__pos, yythunkpos1884= yy->__thunkpos; if (!yy_NonblankIndentedLine(yy)) goto l1884; yyDo(yy, yy_1_FirstVerbatimChunk, yy->__begin, yy->__end); goto l1883; + l1884:; yy->__pos= yypos1884; yy->__thunkpos= yythunkpos1884; + } yyDo(yy, yy_2_FirstVerbatimChunk, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FirstVerbatimChunk", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1882:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FirstVerbatimChunk", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_IndentedLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "IndentedLine")); if (!yy_Indent(yy)) goto l1885; if (!yy_Line(yy)) goto l1885; + yyprintf((stderr, " ok %s @ %s\n", "IndentedLine", yy->__buf+yy->__pos)); + return 1; + l1885:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "IndentedLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_NonblankIndentedLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "NonblankIndentedLine")); + { int yypos1887= yy->__pos, yythunkpos1887= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1887; goto l1886; + l1887:; yy->__pos= yypos1887; yy->__thunkpos= yythunkpos1887; + } if (!yy_IndentedLine(yy)) goto l1886; + yyprintf((stderr, " ok %s @ %s\n", "NonblankIndentedLine", yy->__buf+yy->__pos)); + return 1; + l1886:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "NonblankIndentedLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlockCommentLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "BlockCommentLine")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1888; +#undef yytext +#undef yyleng + } + { int yypos1891= yy->__pos, yythunkpos1891= yy->__thunkpos; if (!yymatchString(yy, "-->")) goto l1891; goto l1888; + l1891:; yy->__pos= yypos1891; yy->__thunkpos= yythunkpos1891; + } if (!yymatchDot(yy)) goto l1888; + l1889:; + { int yypos1890= yy->__pos, yythunkpos1890= yy->__thunkpos; + { int yypos1892= yy->__pos, yythunkpos1892= yy->__thunkpos; if (!yymatchString(yy, "-->")) goto l1892; goto l1890; + l1892:; yy->__pos= yypos1892; yy->__thunkpos= yythunkpos1892; + } if (!yymatchDot(yy)) goto l1890; goto l1889; + l1890:; yy->__pos= yypos1890; yy->__thunkpos= yythunkpos1890; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1888; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_BlockCommentLine, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BlockCommentLine", yy->__buf+yy->__pos)); + return 1; + l1888:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlockCommentLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlockCommentRaw(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "BlockCommentRaw")); if (!yy_StartList(yy)) goto l1893; yyDo(yy, yySet, -1, 0); if (!yymatchString(yy, "")) goto l1898; goto l1897; + l1898:; yy->__pos= yypos1898; yy->__thunkpos= yythunkpos1898; + } if (!yy_BlockCommentLine(yy)) goto l1897; yyDo(yy, yy_1_BlockCommentRaw, yy->__begin, yy->__end); goto l1896; + l1897:; yy->__pos= yypos1897; yy->__thunkpos= yythunkpos1897; + } if (!yymatchString(yy, "-->")) goto l1893; + l1894:; + { int yypos1895= yy->__pos, yythunkpos1895= yy->__thunkpos; if (!yymatchString(yy, "")) goto l1901; goto l1900; + l1901:; yy->__pos= yypos1901; yy->__thunkpos= yythunkpos1901; + } if (!yy_BlockCommentLine(yy)) goto l1900; yyDo(yy, yy_1_BlockCommentRaw, yy->__begin, yy->__end); goto l1899; + l1900:; yy->__pos= yypos1900; yy->__thunkpos= yythunkpos1900; + } if (!yymatchString(yy, "-->")) goto l1895; goto l1894; + l1895:; yy->__pos= yypos1895; yy->__thunkpos= yythunkpos1895; + } yyDo(yy, yy_2_BlockCommentRaw, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BlockCommentRaw", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1893:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlockCommentRaw", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Line(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Line")); if (!yy_RawLine(yy)) goto l1902; yyDo(yy, yy_1_Line, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Line", yy->__buf+yy->__pos)); + return 1; + l1902:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Line", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlockQuoteRaw(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "BlockQuoteRaw")); if (!yy_StartList(yy)) goto l1903; yyDo(yy, yySet, -1, 0); if (!yymatchChar(yy, '>')) goto l1903; + { int yypos1906= yy->__pos, yythunkpos1906= yy->__thunkpos; if (!yymatchChar(yy, ' ')) goto l1906; goto l1907; + l1906:; yy->__pos= yypos1906; yy->__thunkpos= yythunkpos1906; + } + l1907:; if (!yy_Line(yy)) goto l1903; yyDo(yy, yy_1_BlockQuoteRaw, yy->__begin, yy->__end); + l1908:; + { int yypos1909= yy->__pos, yythunkpos1909= yy->__thunkpos; + { int yypos1910= yy->__pos, yythunkpos1910= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l1910; goto l1909; + l1910:; yy->__pos= yypos1910; yy->__thunkpos= yythunkpos1910; + } + { int yypos1911= yy->__pos, yythunkpos1911= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1911; goto l1909; + l1911:; yy->__pos= yypos1911; yy->__thunkpos= yythunkpos1911; + } if (!yy_Line(yy)) goto l1909; yyDo(yy, yy_2_BlockQuoteRaw, yy->__begin, yy->__end); goto l1908; + l1909:; yy->__pos= yypos1909; yy->__thunkpos= yythunkpos1909; + } + l1912:; + { int yypos1913= yy->__pos, yythunkpos1913= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1913; yyDo(yy, yy_3_BlockQuoteRaw, yy->__begin, yy->__end); goto l1912; + l1913:; yy->__pos= yypos1913; yy->__thunkpos= yythunkpos1913; + } + l1904:; + { int yypos1905= yy->__pos, yythunkpos1905= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l1905; + { int yypos1914= yy->__pos, yythunkpos1914= yy->__thunkpos; if (!yymatchChar(yy, ' ')) goto l1914; goto l1915; + l1914:; yy->__pos= yypos1914; yy->__thunkpos= yythunkpos1914; + } + l1915:; if (!yy_Line(yy)) goto l1905; yyDo(yy, yy_1_BlockQuoteRaw, yy->__begin, yy->__end); + l1916:; + { int yypos1917= yy->__pos, yythunkpos1917= yy->__thunkpos; + { int yypos1918= yy->__pos, yythunkpos1918= yy->__thunkpos; if (!yymatchChar(yy, '>')) goto l1918; goto l1917; + l1918:; yy->__pos= yypos1918; yy->__thunkpos= yythunkpos1918; + } + { int yypos1919= yy->__pos, yythunkpos1919= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1919; goto l1917; + l1919:; yy->__pos= yypos1919; yy->__thunkpos= yythunkpos1919; + } if (!yy_Line(yy)) goto l1917; yyDo(yy, yy_2_BlockQuoteRaw, yy->__begin, yy->__end); goto l1916; + l1917:; yy->__pos= yypos1917; yy->__thunkpos= yythunkpos1917; + } + l1920:; + { int yypos1921= yy->__pos, yythunkpos1921= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l1921; yyDo(yy, yy_3_BlockQuoteRaw, yy->__begin, yy->__end); goto l1920; + l1921:; yy->__pos= yypos1921; yy->__thunkpos= yythunkpos1921; + } goto l1904; + l1905:; yy->__pos= yypos1905; yy->__thunkpos= yythunkpos1905; + } yyDo(yy, yy_4_BlockQuoteRaw, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BlockQuoteRaw", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l1903:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlockQuoteRaw", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Endline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Endline")); + { int yypos1923= yy->__pos, yythunkpos1923= yy->__thunkpos; if (!yy_LineBreak(yy)) goto l1924; goto l1923; + l1924:; yy->__pos= yypos1923; yy->__thunkpos= yythunkpos1923; if (!yy_TerminalEndline(yy)) goto l1925; goto l1923; + l1925:; yy->__pos= yypos1923; yy->__thunkpos= yythunkpos1923; if (!yy_NormalEndline(yy)) goto l1922; + } + l1923:; + yyprintf((stderr, " ok %s @ %s\n", "Endline", yy->__buf+yy->__pos)); + return 1; + l1922:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Endline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SetextBottom2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SetextBottom2")); if (!yymatchChar(yy, '-')) goto l1926; + l1927:; + { int yypos1928= yy->__pos, yythunkpos1928= yy->__thunkpos; if (!yymatchChar(yy, '-')) goto l1928; goto l1927; + l1928:; yy->__pos= yypos1928; yy->__thunkpos= yythunkpos1928; + } if (!yy_Newline(yy)) goto l1926; + yyprintf((stderr, " ok %s @ %s\n", "SetextBottom2", yy->__buf+yy->__pos)); + return 1; + l1926:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SetextBottom2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SetextBottom1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SetextBottom1")); if (!yymatchChar(yy, '=')) goto l1929; + l1930:; + { int yypos1931= yy->__pos, yythunkpos1931= yy->__thunkpos; if (!yymatchChar(yy, '=')) goto l1931; goto l1930; + l1931:; yy->__pos= yypos1931; yy->__thunkpos= yythunkpos1931; + } if (!yy_Newline(yy)) goto l1929; + yyprintf((stderr, " ok %s @ %s\n", "SetextBottom1", yy->__buf+yy->__pos)); + return 1; + l1929:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SetextBottom1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SetextHeading2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "SetextHeading2")); + { int yypos1933= yy->__pos, yythunkpos1933= yy->__thunkpos; if (!yy_RawLine(yy)) goto l1932; if (!yy_SetextBottom2(yy)) goto l1932; yy->__pos= yypos1933; yy->__thunkpos= yythunkpos1933; + } if (!yy_StartList(yy)) goto l1932; yyDo(yy, yySet, -2, 0); + { int yypos1936= yy->__pos, yythunkpos1936= yy->__thunkpos; if (!yy_Endline(yy)) goto l1936; goto l1932; + l1936:; yy->__pos= yypos1936; yy->__thunkpos= yythunkpos1936; + } + { int yypos1937= yy->__pos, yythunkpos1937= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) )) goto l1937; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l1937; if (!yy_AutoLabel(yy)) goto l1937; goto l1932; + l1937:; yy->__pos= yypos1937; yy->__thunkpos= yythunkpos1937; + } if (!yy_Inline(yy)) goto l1932; yyDo(yy, yy_1_SetextHeading2, yy->__begin, yy->__end); + l1934:; + { int yypos1935= yy->__pos, yythunkpos1935= yy->__thunkpos; + { int yypos1938= yy->__pos, yythunkpos1938= yy->__thunkpos; if (!yy_Endline(yy)) goto l1938; goto l1935; + l1938:; yy->__pos= yypos1938; yy->__thunkpos= yythunkpos1938; + } + { int yypos1939= yy->__pos, yythunkpos1939= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) )) goto l1939; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l1939; if (!yy_AutoLabel(yy)) goto l1939; goto l1935; + l1939:; yy->__pos= yypos1939; yy->__thunkpos= yythunkpos1939; + } if (!yy_Inline(yy)) goto l1935; yyDo(yy, yy_1_SetextHeading2, yy->__begin, yy->__end); goto l1934; + l1935:; yy->__pos= yypos1935; yy->__thunkpos= yythunkpos1935; + } + { int yypos1940= yy->__pos, yythunkpos1940= yy->__thunkpos; if (!yy_Sp(yy)) goto l1940; if (!yy_AutoLabel(yy)) goto l1940; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_SetextHeading2, yy->__begin, yy->__end); + { int yypos1942= yy->__pos, yythunkpos1942= yy->__thunkpos; if (!yy_Sp(yy)) goto l1942; goto l1943; + l1942:; yy->__pos= yypos1942; yy->__thunkpos= yythunkpos1942; + } + l1943:; goto l1941; + l1940:; yy->__pos= yypos1940; yy->__thunkpos= yythunkpos1940; + } + l1941:; + { int yypos1944= yy->__pos, yythunkpos1944= yy->__thunkpos; if (!yy_Sp(yy)) goto l1944; goto l1945; + l1944:; yy->__pos= yypos1944; yy->__thunkpos= yythunkpos1944; + } + l1945:; if (!yy_Newline(yy)) goto l1932; if (!yy_SetextBottom2(yy)) goto l1932; yyDo(yy, yy_3_SetextHeading2, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "SetextHeading2", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1932:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SetextHeading2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SetextHeading1(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "SetextHeading1")); + { int yypos1947= yy->__pos, yythunkpos1947= yy->__thunkpos; if (!yy_RawLine(yy)) goto l1946; if (!yy_SetextBottom1(yy)) goto l1946; yy->__pos= yypos1947; yy->__thunkpos= yythunkpos1947; + } if (!yy_StartList(yy)) goto l1946; yyDo(yy, yySet, -2, 0); + { int yypos1950= yy->__pos, yythunkpos1950= yy->__thunkpos; if (!yy_Endline(yy)) goto l1950; goto l1946; + l1950:; yy->__pos= yypos1950; yy->__thunkpos= yythunkpos1950; + } + { int yypos1951= yy->__pos, yythunkpos1951= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) )) goto l1951; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l1951; if (!yy_AutoLabel(yy)) goto l1951; goto l1946; + l1951:; yy->__pos= yypos1951; yy->__thunkpos= yythunkpos1951; + } if (!yy_Inline(yy)) goto l1946; yyDo(yy, yy_1_SetextHeading1, yy->__begin, yy->__end); + l1948:; + { int yypos1949= yy->__pos, yythunkpos1949= yy->__thunkpos; + { int yypos1952= yy->__pos, yythunkpos1952= yy->__thunkpos; if (!yy_Endline(yy)) goto l1952; goto l1949; + l1952:; yy->__pos= yypos1952; yy->__thunkpos= yythunkpos1952; + } + { int yypos1953= yy->__pos, yythunkpos1953= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) )) goto l1953; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l1953; if (!yy_AutoLabel(yy)) goto l1953; goto l1949; + l1953:; yy->__pos= yypos1953; yy->__thunkpos= yythunkpos1953; + } if (!yy_Inline(yy)) goto l1949; yyDo(yy, yy_1_SetextHeading1, yy->__begin, yy->__end); goto l1948; + l1949:; yy->__pos= yypos1949; yy->__thunkpos= yythunkpos1949; + } + { int yypos1954= yy->__pos, yythunkpos1954= yy->__thunkpos; if (!yy_Sp(yy)) goto l1954; if (!yy_AutoLabel(yy)) goto l1954; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_2_SetextHeading1, yy->__begin, yy->__end); + { int yypos1956= yy->__pos, yythunkpos1956= yy->__thunkpos; if (!yy_Sp(yy)) goto l1956; goto l1957; + l1956:; yy->__pos= yypos1956; yy->__thunkpos= yythunkpos1956; + } + l1957:; goto l1955; + l1954:; yy->__pos= yypos1954; yy->__thunkpos= yythunkpos1954; + } + l1955:; + { int yypos1958= yy->__pos, yythunkpos1958= yy->__thunkpos; if (!yy_Sp(yy)) goto l1958; goto l1959; + l1958:; yy->__pos= yypos1958; yy->__thunkpos= yythunkpos1958; + } + l1959:; if (!yy_Newline(yy)) goto l1946; if (!yy_SetextBottom1(yy)) goto l1946; yyDo(yy, yy_3_SetextHeading1, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "SetextHeading1", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l1946:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SetextHeading1", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SetextHeading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SetextHeading")); + { int yypos1961= yy->__pos, yythunkpos1961= yy->__thunkpos; if (!yy_SetextHeading1(yy)) goto l1962; goto l1961; + l1962:; yy->__pos= yypos1961; yy->__thunkpos= yythunkpos1961; if (!yy_SetextHeading2(yy)) goto l1960; + } + l1961:; + yyprintf((stderr, " ok %s @ %s\n", "SetextHeading", yy->__buf+yy->__pos)); + return 1; + l1960:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SetextHeading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_LineBreak(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "LineBreak")); if (!yymatchString(yy, " ")) goto l1963; if (!yy_NormalEndline(yy)) goto l1963; yyDo(yy, yy_1_LineBreak, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "LineBreak", yy->__buf+yy->__pos)); + return 1; + l1963:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "LineBreak", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AtxHeading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 4, 0); + yyprintf((stderr, "%s\n", "AtxHeading")); if (!yy_AtxStart(yy)) goto l1964; yyDo(yy, yySet, -4, 0); + { int yypos1965= yy->__pos, yythunkpos1965= yy->__thunkpos; if (!yy_Sp(yy)) goto l1965; goto l1966; + l1965:; yy->__pos= yypos1965; yy->__thunkpos= yythunkpos1965; + } + l1966:; if (!yy_StartList(yy)) goto l1964; yyDo(yy, yySet, -3, 0); if (!yy_AtxInline(yy)) goto l1964; yyDo(yy, yy_1_AtxHeading, yy->__begin, yy->__end); + { int yypos1969= yy->__pos, yythunkpos1969= yy->__thunkpos; if (!yy_LineBreak(yy)) goto l1969; yyDo(yy, yySet, -2, 0); yyDo(yy, yy_2_AtxHeading, yy->__begin, yy->__end); goto l1970; + l1969:; yy->__pos= yypos1969; yy->__thunkpos= yythunkpos1969; + } + l1970:; + l1967:; + { int yypos1968= yy->__pos, yythunkpos1968= yy->__thunkpos; if (!yy_AtxInline(yy)) goto l1968; yyDo(yy, yy_1_AtxHeading, yy->__begin, yy->__end); + { int yypos1971= yy->__pos, yythunkpos1971= yy->__thunkpos; if (!yy_LineBreak(yy)) goto l1971; yyDo(yy, yySet, -2, 0); yyDo(yy, yy_2_AtxHeading, yy->__begin, yy->__end); goto l1972; + l1971:; yy->__pos= yypos1971; yy->__thunkpos= yythunkpos1971; + } + l1972:; goto l1967; + l1968:; yy->__pos= yypos1968; yy->__thunkpos= yythunkpos1968; + } + { int yypos1973= yy->__pos, yythunkpos1973= yy->__thunkpos; + { int yypos1975= yy->__pos, yythunkpos1975= yy->__thunkpos; if (!yy_Sp(yy)) goto l1975; goto l1976; + l1975:; yy->__pos= yypos1975; yy->__thunkpos= yythunkpos1975; + } + l1976:; if (!yy_AutoLabel(yy)) goto l1973; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_3_AtxHeading, yy->__begin, yy->__end); goto l1974; + l1973:; yy->__pos= yypos1973; yy->__thunkpos= yythunkpos1973; + } + l1974:; + { int yypos1977= yy->__pos, yythunkpos1977= yy->__thunkpos; + { int yypos1979= yy->__pos, yythunkpos1979= yy->__thunkpos; if (!yy_Sp(yy)) goto l1979; goto l1980; + l1979:; yy->__pos= yypos1979; yy->__thunkpos= yythunkpos1979; + } + l1980:; + l1981:; + { int yypos1982= yy->__pos, yythunkpos1982= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l1982; goto l1981; + l1982:; yy->__pos= yypos1982; yy->__thunkpos= yythunkpos1982; + } if (!yy_Sp(yy)) goto l1977; goto l1978; + l1977:; yy->__pos= yypos1977; yy->__thunkpos= yythunkpos1977; + } + l1978:; if (!yy_Newline(yy)) goto l1964; yyDo(yy, yy_4_AtxHeading, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AtxHeading", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 4, 0); + return 1; + l1964:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AtxHeading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AtxStart(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AtxStart")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l1983; +#undef yytext +#undef yyleng + } + { int yypos1984= yy->__pos, yythunkpos1984= yy->__thunkpos; if (!yymatchString(yy, "######")) goto l1985; goto l1984; + l1985:; yy->__pos= yypos1984; yy->__thunkpos= yythunkpos1984; if (!yymatchString(yy, "#####")) goto l1986; goto l1984; + l1986:; yy->__pos= yypos1984; yy->__thunkpos= yythunkpos1984; if (!yymatchString(yy, "####")) goto l1987; goto l1984; + l1987:; yy->__pos= yypos1984; yy->__thunkpos= yythunkpos1984; if (!yymatchString(yy, "###")) goto l1988; goto l1984; + l1988:; yy->__pos= yypos1984; yy->__thunkpos= yythunkpos1984; if (!yymatchString(yy, "##")) goto l1989; goto l1984; + l1989:; yy->__pos= yypos1984; yy->__thunkpos= yythunkpos1984; if (!yymatchChar(yy, '#')) goto l1983; + } + l1984:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l1983; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_AtxStart, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AtxStart", yy->__buf+yy->__pos)); + return 1; + l1983:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AtxStart", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Inline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Inline")); + { int yypos1991= yy->__pos, yythunkpos1991= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( check_timeout(yy->state) )) goto l1992; +#undef yytext +#undef yyleng + } if (!yy_Str(yy)) goto l1992; goto l1991; + l1992:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_MATH) )) goto l1993; +#undef yytext +#undef yyleng + } if (!yy_MathSpan(yy)) goto l1993; goto l1991; + l1993:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Endline(yy)) goto l1994; goto l1991; + l1994:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_UlOrStarLine(yy)) goto l1995; goto l1991; + l1995:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Space(yy)) goto l1996; goto l1991; + l1996:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Strong(yy)) goto l1997; goto l1991; + l1997:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Emph(yy)) goto l1998; goto l1991; + l1998:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_DELETE) )) goto l1999; +#undef yytext +#undef yyleng + } if (!yy_Delete(yy)) goto l1999; goto l1991; + l1999:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2000; +#undef yytext +#undef yyleng + } if (!yy_CitationReference(yy)) goto l2000; goto l1991; + l2000:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Image(yy)) goto l2001; goto l1991; + l2001:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Link(yy)) goto l2002; goto l1991; + l2002:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_NoteReference(yy)) goto l2003; goto l1991; + l2003:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_INLINE_COMMENT) )) goto l2004; +#undef yytext +#undef yyleng + } if (!yy_Comment(yy)) goto l2004; goto l1991; + l2004:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Code(yy)) goto l2005; goto l1991; + l2005:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_MarkdownHtmlTagOpen(yy)) goto l2006; goto l1991; + l2006:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_RawHtml(yy)) goto l2007; goto l1991; + l2007:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Entity(yy)) goto l2008; goto l1991; + l2008:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_KEEP_ESCAPES) )) goto l2009; +#undef yytext +#undef yyleng + } if (!yy_EscapedChar(yy)) goto l2009; goto l1991; + l2009:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_KEEP_ESCAPES) )) goto l2010; +#undef yytext +#undef yyleng + } if (!yy_KeptEscapedChar(yy)) goto l2010; goto l1991; + l2010:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Smart(yy)) goto l2011; goto l1991; + l2011:; yy->__pos= yypos1991; yy->__thunkpos= yythunkpos1991; if (!yy_Symbol(yy)) goto l1990; + } + l1991:; + yyprintf((stderr, " ok %s @ %s\n", "Inline", yy->__buf+yy->__pos)); + return 1; + l1990:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Inline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AutoLabel(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AutoLabel")); if (!yymatchChar(yy, '[')) goto l2012; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2012; +#undef yytext +#undef yyleng + } + { int yypos2013= yy->__pos, yythunkpos2013= yy->__thunkpos; if (!yy_Newline(yy)) goto l2013; goto l2012; + l2013:; yy->__pos= yypos2013; yy->__thunkpos= yythunkpos2013; + } + { int yypos2014= yy->__pos, yythunkpos2014= yy->__thunkpos; if (!yymatchChar(yy, '^')) goto l2014; goto l2012; + l2014:; yy->__pos= yypos2014; yy->__thunkpos= yythunkpos2014; + } + { int yypos2015= yy->__pos, yythunkpos2015= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l2015; goto l2012; + l2015:; yy->__pos= yypos2015; yy->__thunkpos= yythunkpos2015; + } if (!yymatchDot(yy)) goto l2012; + { int yypos2018= yy->__pos, yythunkpos2018= yy->__thunkpos; if (!yy_Newline(yy)) goto l2018; goto l2012; + l2018:; yy->__pos= yypos2018; yy->__thunkpos= yythunkpos2018; + } + { int yypos2019= yy->__pos, yythunkpos2019= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l2019; goto l2012; + l2019:; yy->__pos= yypos2019; yy->__thunkpos= yythunkpos2019; + } if (!yymatchDot(yy)) goto l2012; + l2016:; + { int yypos2017= yy->__pos, yythunkpos2017= yy->__thunkpos; + { int yypos2020= yy->__pos, yythunkpos2020= yy->__thunkpos; if (!yy_Newline(yy)) goto l2020; goto l2017; + l2020:; yy->__pos= yypos2020; yy->__thunkpos= yythunkpos2020; + } + { int yypos2021= yy->__pos, yythunkpos2021= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l2021; goto l2017; + l2021:; yy->__pos= yypos2021; yy->__thunkpos= yythunkpos2021; + } if (!yymatchDot(yy)) goto l2017; goto l2016; + l2017:; yy->__pos= yypos2017; yy->__thunkpos= yythunkpos2017; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2012; +#undef yytext +#undef yyleng + } if (!yymatchChar(yy, ']')) goto l2012; + { int yypos2022= yy->__pos, yythunkpos2022= yy->__thunkpos; + { int yypos2023= yy->__pos, yythunkpos2023= yy->__thunkpos; + { int yypos2024= yy->__pos, yythunkpos2024= yy->__thunkpos; if (!yy_Sp(yy)) goto l2024; goto l2025; + l2024:; yy->__pos= yypos2024; yy->__thunkpos= yythunkpos2024; + } + l2025:; + { int yypos2026= yy->__pos, yythunkpos2026= yy->__thunkpos; if (!yymatchChar(yy, '(')) goto l2027; goto l2026; + l2027:; yy->__pos= yypos2026; yy->__thunkpos= yythunkpos2026; if (!yymatchChar(yy, '[')) goto l2023; + } + l2026:; goto l2012; + l2023:; yy->__pos= yypos2023; yy->__thunkpos= yythunkpos2023; + } yy->__pos= yypos2022; yy->__thunkpos= yythunkpos2022; + } yyDo(yy, yy_1_AutoLabel, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "AutoLabel", yy->__buf+yy->__pos)); + return 1; + l2012:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AutoLabel", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AtxInline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AtxInline")); + { int yypos2029= yy->__pos, yythunkpos2029= yy->__thunkpos; if (!yy_Newline(yy)) goto l2029; goto l2028; + l2029:; yy->__pos= yypos2029; yy->__thunkpos= yythunkpos2029; + } + { int yypos2030= yy->__pos, yythunkpos2030= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) )) goto l2030; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l2030; if (!yy_AutoLabel(yy)) goto l2030; + { int yypos2031= yy->__pos, yythunkpos2031= yy->__thunkpos; if (!yy_Sp(yy)) goto l2031; goto l2032; + l2031:; yy->__pos= yypos2031; yy->__thunkpos= yythunkpos2031; + } + l2032:; + l2033:; + { int yypos2034= yy->__pos, yythunkpos2034= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l2034; goto l2033; + l2034:; yy->__pos= yypos2034; yy->__thunkpos= yythunkpos2034; + } if (!yy_Sp(yy)) goto l2030; if (!yy_Newline(yy)) goto l2030; goto l2028; + l2030:; yy->__pos= yypos2030; yy->__thunkpos= yythunkpos2030; + } + { int yypos2035= yy->__pos, yythunkpos2035= yy->__thunkpos; + { int yypos2036= yy->__pos, yythunkpos2036= yy->__thunkpos; if (!yy_Sp(yy)) goto l2036; goto l2037; + l2036:; yy->__pos= yypos2036; yy->__thunkpos= yythunkpos2036; + } + l2037:; + l2038:; + { int yypos2039= yy->__pos, yythunkpos2039= yy->__thunkpos; if (!yymatchChar(yy, '#')) goto l2039; goto l2038; + l2039:; yy->__pos= yypos2039; yy->__thunkpos= yythunkpos2039; + } if (!yy_Sp(yy)) goto l2035; if (!yy_Newline(yy)) goto l2035; goto l2028; + l2035:; yy->__pos= yypos2035; yy->__thunkpos= yythunkpos2035; + } if (!yy_Inline(yy)) goto l2028; + yyprintf((stderr, " ok %s @ %s\n", "AtxInline", yy->__buf+yy->__pos)); + return 1; + l2028:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AtxInline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Inlines(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Inlines")); if (!yy_StartList(yy)) goto l2040; yyDo(yy, yySet, -2, 0); + { int yypos2043= yy->__pos, yythunkpos2043= yy->__thunkpos; + { int yypos2045= yy->__pos, yythunkpos2045= yy->__thunkpos; if (!yy_Endline(yy)) goto l2045; goto l2044; + l2045:; yy->__pos= yypos2045; yy->__thunkpos= yythunkpos2045; + } if (!yy_Inline(yy)) goto l2044; yyDo(yy, yy_1_Inlines, yy->__begin, yy->__end); goto l2043; + l2044:; yy->__pos= yypos2043; yy->__thunkpos= yythunkpos2043; if (!yy_Endline(yy)) goto l2040; yyDo(yy, yySet, -1, 0); + { int yypos2046= yy->__pos, yythunkpos2046= yy->__thunkpos; if (!yy_Inline(yy)) goto l2040; yy->__pos= yypos2046; yy->__thunkpos= yythunkpos2046; + } yyDo(yy, yy_2_Inlines, yy->__begin, yy->__end); + } + l2043:; + l2041:; + { int yypos2042= yy->__pos, yythunkpos2042= yy->__thunkpos; + { int yypos2047= yy->__pos, yythunkpos2047= yy->__thunkpos; + { int yypos2049= yy->__pos, yythunkpos2049= yy->__thunkpos; if (!yy_Endline(yy)) goto l2049; goto l2048; + l2049:; yy->__pos= yypos2049; yy->__thunkpos= yythunkpos2049; + } if (!yy_Inline(yy)) goto l2048; yyDo(yy, yy_1_Inlines, yy->__begin, yy->__end); goto l2047; + l2048:; yy->__pos= yypos2047; yy->__thunkpos= yythunkpos2047; if (!yy_Endline(yy)) goto l2042; yyDo(yy, yySet, -1, 0); + { int yypos2050= yy->__pos, yythunkpos2050= yy->__thunkpos; if (!yy_Inline(yy)) goto l2042; yy->__pos= yypos2050; yy->__thunkpos= yythunkpos2050; + } yyDo(yy, yy_2_Inlines, yy->__begin, yy->__end); + } + l2047:; goto l2041; + l2042:; yy->__pos= yypos2042; yy->__thunkpos= yythunkpos2042; + } + { int yypos2051= yy->__pos, yythunkpos2051= yy->__thunkpos; if (!yy_Endline(yy)) goto l2051; goto l2052; + l2051:; yy->__pos= yypos2051; yy->__thunkpos= yythunkpos2051; + } + l2052:; yyDo(yy, yy_3_Inlines, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Inlines", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2040:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Inlines", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_CapturingNonindentSpace(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "CapturingNonindentSpace")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2053; +#undef yytext +#undef yyleng + } if (!yy_NonindentSpace(yy)) goto l2053; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2053; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_CapturingNonindentSpace, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "CapturingNonindentSpace", yy->__buf+yy->__pos)); + return 1; + l2053:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "CapturingNonindentSpace", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Heading(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Heading")); + { int yypos2055= yy->__pos, yythunkpos2055= yy->__thunkpos; if (!yy_SetextHeading(yy)) goto l2056; goto l2055; + l2056:; yy->__pos= yypos2055; yy->__thunkpos= yythunkpos2055; if (!yy_AtxHeading(yy)) goto l2054; + } + l2055:; + yyprintf((stderr, " ok %s @ %s\n", "Heading", yy->__buf+yy->__pos)); + return 1; + l2054:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Heading", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HeadingSectionBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HeadingSectionBlock")); + l2058:; + { int yypos2059= yy->__pos, yythunkpos2059= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2059; goto l2058; + l2059:; yy->__pos= yypos2059; yy->__thunkpos= yythunkpos2059; + } + { int yypos2060= yy->__pos, yythunkpos2060= yy->__thunkpos; if (!yy_Heading(yy)) goto l2060; goto l2057; + l2060:; yy->__pos= yypos2060; yy->__thunkpos= yythunkpos2060; + } + { int yypos2061= yy->__pos, yythunkpos2061= yy->__thunkpos; if (!yy_BlockQuote(yy)) goto l2062; goto l2061; + l2062:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_BLOCK_COMMENT) )) goto l2063; +#undef yytext +#undef yyleng + } if (!yy_BlockComment(yy)) goto l2063; goto l2061; + l2063:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_Verbatim(yy)) goto l2064; goto l2061; + l2064:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2065; +#undef yytext +#undef yyleng + } if (!yy_DefinitionList(yy)) goto l2065; goto l2061; + l2065:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2066; +#undef yytext +#undef yyleng + } if (!yy_Glossary(yy)) goto l2066; goto l2061; + l2066:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_Note(yy)) goto l2067; goto l2061; + l2067:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_Reference(yy)) goto l2068; goto l2061; + l2068:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_HorizontalRule(yy)) goto l2069; goto l2061; + l2069:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_OrderedList(yy)) goto l2070; goto l2061; + l2070:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_BulletList(yy)) goto l2071; goto l2061; + l2071:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_HtmlBlock(yy)) goto l2072; goto l2061; + l2072:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_MarkdownHtmlBlock(yy)) goto l2073; goto l2061; + l2073:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_FencedCodeBlock(yy)) goto l2074; goto l2061; + l2074:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_StyleBlock(yy)) goto l2075; goto l2061; + l2075:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_TABLES) )) goto l2076; +#undef yytext +#undef yyleng + } if (!yy_Table(yy)) goto l2076; goto l2061; + l2076:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2077; +#undef yytext +#undef yyleng + } if (!yy_ImageBlock(yy)) goto l2077; goto l2061; + l2077:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; + { int yypos2079= yy->__pos, yythunkpos2079= yy->__thunkpos; + { int yypos2080= yy->__pos, yythunkpos2080= yy->__thunkpos; if (!yy_Sp(yy)) goto l2080; goto l2081; + l2080:; yy->__pos= yypos2080; yy->__thunkpos= yythunkpos2080; + } + l2081:; if (!yy_HtmlBlockOpenDiv(yy)) goto l2079; goto l2078; + l2079:; yy->__pos= yypos2079; yy->__thunkpos= yythunkpos2079; + } if (!yy_Para(yy)) goto l2078; goto l2061; + l2078:; yy->__pos= yypos2061; yy->__thunkpos= yythunkpos2061; if (!yy_Plain(yy)) goto l2057; + } + l2061:; + yyprintf((stderr, " ok %s @ %s\n", "HeadingSectionBlock", yy->__buf+yy->__pos)); + return 1; + l2057:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HeadingSectionBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Plain(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Plain")); if (!yy_Inlines(yy)) goto l2082; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_Plain, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Plain", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2082:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Plain", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Para(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Para")); if (!yy_CapturingNonindentSpace(yy)) goto l2083; yyDo(yy, yySet, -2, 0); yyDo(yy, yy_1_Para, yy->__begin, yy->__end); if (!yy_Inlines(yy)) goto l2083; yyDo(yy, yySet, -1, 0); if (!yy_BlankLine(yy)) goto l2083; + l2084:; + { int yypos2085= yy->__pos, yythunkpos2085= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2085; goto l2084; + l2085:; yy->__pos= yypos2085; yy->__thunkpos= yythunkpos2085; + } yyDo(yy, yy_2_Para, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Para", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2083:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Para", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlockOpenDiv(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlockOpenDiv")); if (!yymatchChar(yy, '<')) goto l2086; if (!yy_Spnl(yy)) goto l2086; + { int yypos2087= yy->__pos, yythunkpos2087= yy->__thunkpos; if (!yymatchString(yy, "div")) goto l2088; goto l2087; + l2088:; yy->__pos= yypos2087; yy->__thunkpos= yythunkpos2087; if (!yymatchString(yy, "DIV")) goto l2086; + } + l2087:; if (!yy_Spnl(yy)) goto l2086; + l2089:; + { int yypos2090= yy->__pos, yythunkpos2090= yy->__thunkpos; if (!yy_HtmlAttribute(yy)) goto l2090; goto l2089; + l2090:; yy->__pos= yypos2090; yy->__thunkpos= yythunkpos2090; + } if (!yymatchChar(yy, '>')) goto l2086; + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlockOpenDiv", yy->__buf+yy->__pos)); + return 1; + l2086:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlockOpenDiv", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_ImageBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "ImageBlock")); if (!yy_Image(yy)) goto l2091; if (!yy_Sp(yy)) goto l2091; if (!yy_Newline(yy)) goto l2091; if (!yy_BlankLine(yy)) goto l2091; + l2092:; + { int yypos2093= yy->__pos, yythunkpos2093= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2093; goto l2092; + l2093:; yy->__pos= yypos2093; yy->__thunkpos= yythunkpos2093; + } yyDo(yy, yy_1_ImageBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "ImageBlock", yy->__buf+yy->__pos)); + return 1; + l2091:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "ImageBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Table(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Table")); if (!yy_StartList(yy)) goto l2094; yyDo(yy, yySet, -2, 0); if (!yy_StartList(yy)) goto l2094; yyDo(yy, yySet, -1, 0); + { int yypos2095= yy->__pos, yythunkpos2095= yy->__thunkpos; if (!yy_TableCaption(yy)) goto l2095; yyDo(yy, yy_1_Table, yy->__begin, yy->__end); goto l2096; + l2095:; yy->__pos= yypos2095; yy->__thunkpos= yythunkpos2095; + } + l2096:; if (!yy_TableBody(yy)) goto l2094; yyDo(yy, yy_2_Table, yy->__begin, yy->__end); if (!yy_SeparatorLine(yy)) goto l2094; yyDo(yy, yy_3_Table, yy->__begin, yy->__end); if (!yy_TableBody(yy)) goto l2094; yyDo(yy, yy_4_Table, yy->__begin, yy->__end); + l2097:; + { int yypos2098= yy->__pos, yythunkpos2098= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l2098; if (!yy_ULNewline(yy)) goto l2098; + { int yypos2099= yy->__pos, yythunkpos2099= yy->__thunkpos; if (!yy_TableCaption(yy)) goto l2099; goto l2098; + l2099:; yy->__pos= yypos2099; yy->__thunkpos= yythunkpos2099; + } if (!yy_TableBody(yy)) goto l2098; yyDo(yy, yy_5_Table, yy->__begin, yy->__end); + { int yypos2100= yy->__pos, yythunkpos2100= yy->__thunkpos; + { int yypos2101= yy->__pos, yythunkpos2101= yy->__thunkpos; if (!yy_TableCaption(yy)) goto l2102; goto l2101; + l2102:; yy->__pos= yypos2101; yy->__thunkpos= yythunkpos2101; if (!yy_MagicBlankLine(yy)) goto l2098; + } + l2101:; yy->__pos= yypos2100; yy->__thunkpos= yythunkpos2100; + } goto l2097; + l2098:; yy->__pos= yypos2098; yy->__thunkpos= yythunkpos2098; + } + { int yypos2103= yy->__pos, yythunkpos2103= yy->__thunkpos; if (!yy_TableCaption(yy)) goto l2104; yyDo(yy, yy_6_Table, yy->__begin, yy->__end); + { int yypos2105= yy->__pos, yythunkpos2105= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l2104; if (!yy_ULNewline(yy)) goto l2104; yy->__pos= yypos2105; yy->__thunkpos= yythunkpos2105; + } goto l2103; + l2104:; yy->__pos= yypos2103; yy->__thunkpos= yythunkpos2103; + { int yypos2106= yy->__pos, yythunkpos2106= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l2094; if (!yy_ULNewline(yy)) goto l2094; yy->__pos= yypos2106; yy->__thunkpos= yythunkpos2106; + } + } + l2103:; yyDo(yy, yy_7_Table, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Table", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2094:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Table", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StyleBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StyleBlock")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2107; +#undef yytext +#undef yyleng + } if (!yy_InStyleTags(yy)) goto l2107; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2107; +#undef yytext +#undef yyleng + } + l2108:; + { int yypos2109= yy->__pos, yythunkpos2109= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2109; goto l2108; + l2109:; yy->__pos= yypos2109; yy->__thunkpos= yythunkpos2109; + } yyDo(yy, yy_1_StyleBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "StyleBlock", yy->__buf+yy->__pos)); + return 1; + l2107:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StyleBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_FencedCodeBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "FencedCodeBlock")); if (!yy_FencedCodeBlockPreceedingIndentation(yy)) goto l2110; yyDo(yy, yySet, -2, 0); yyText(yy, yy->__begin, yy->__end); +#define yytext yy->__text +#define yyleng yy->__textlen + const char *openingDelimiterStart = current_input_position(yy->state, yy->__pos, yy->__limit); ; +#undef yytext +#undef yyleng + if (!yy_FencedCodeBlockMarker(yy)) goto l2110; yyText(yy, yy->__begin, yy->__end); +#define yytext yy->__text +#define yyleng yy->__textlen + size_t openingDelimiterLength = offset_to_current_position(openingDelimiterStart, yy->state, yy->__pos, yy->__limit); ; +#undef yytext +#undef yyleng + if (!yy_FencedCodeBlockLanguage(yy)) goto l2110; yyDo(yy, yySet, -1, 0); if (!yy_Newline(yy)) goto l2110; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2110; +#undef yytext +#undef yyleng + } + l2111:; + { int yypos2112= yy->__pos, yythunkpos2112= yy->__thunkpos; + { int yypos2113= yy->__pos, yythunkpos2113= yy->__thunkpos; + { int yypos2114= yy->__pos, yythunkpos2114= yy->__thunkpos; if (!yy_Newline(yy)) goto l2114; goto l2115; + l2114:; yy->__pos= yypos2114; yy->__thunkpos= yythunkpos2114; + } + l2115:; if (!yy_FencedCodeBlockIndentation(yy)) goto l2113; yyText(yy, yy->__begin, yy->__end); +#define yytext yy->__text +#define yyleng yy->__textlen + const char *closingDelimiterStart = current_input_position(yy->state, yy->__pos, yy->__limit); ; +#undef yytext +#undef yyleng + if (!yy_FencedCodeBlockMarker(yy)) goto l2113; yyText(yy, yy->__begin, yy->__end); +#define yytext yy->__text +#define yyleng yy->__textlen + size_t closingDelimiterLength = offset_to_current_position(closingDelimiterStart, yy->state, yy->__pos, yy->__limit); ; +#undef yytext +#undef yyleng + yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( (openingDelimiterLength == closingDelimiterLength) && !strncmp(openingDelimiterStart, closingDelimiterStart, openingDelimiterLength) )) goto l2113; +#undef yytext +#undef yyleng + } if (!yy_Sp(yy)) goto l2113; + { int yypos2116= yy->__pos, yythunkpos2116= yy->__thunkpos; if (!yy_Newline(yy)) goto l2117; goto l2116; + l2117:; yy->__pos= yypos2116; yy->__thunkpos= yythunkpos2116; if (!yy_Eof(yy)) goto l2113; + } + l2116:; goto l2112; + l2113:; yy->__pos= yypos2113; yy->__thunkpos= yythunkpos2113; + } if (!yymatchDot(yy)) goto l2112; goto l2111; + l2112:; yy->__pos= yypos2112; yy->__thunkpos= yythunkpos2112; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2110; +#undef yytext +#undef yyleng + } + { int yypos2118= yy->__pos, yythunkpos2118= yy->__thunkpos; if (!yy_Newline(yy)) goto l2118; goto l2119; + l2118:; yy->__pos= yypos2118; yy->__thunkpos= yythunkpos2118; + } + l2119:; if (!yy_FencedCodeBlockIndentation(yy)) goto l2110; if (!yy_FencedCodeBlockMarker(yy)) goto l2110; if (!yy_Sp(yy)) goto l2110; if (!yy_BlankLine(yy)) goto l2110; + l2120:; + { int yypos2121= yy->__pos, yythunkpos2121= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2121; goto l2120; + l2121:; yy->__pos= yypos2121; yy->__thunkpos= yythunkpos2121; + } yyDo(yy, yy_1_FencedCodeBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "FencedCodeBlock", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2110:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "FencedCodeBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MarkdownHtmlBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MarkdownHtmlBlock")); + { int yypos2123= yy->__pos, yythunkpos2123= yy->__thunkpos; if (!yy_MarkdownHtmlTagOpen(yy)) goto l2122; yy->__pos= yypos2123; yy->__thunkpos= yythunkpos2123; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2122; +#undef yytext +#undef yyleng + } + { int yypos2124= yy->__pos, yythunkpos2124= yy->__thunkpos; if (!yy_HtmlBlockInTags(yy)) goto l2125; goto l2124; + l2125:; yy->__pos= yypos2124; yy->__thunkpos= yythunkpos2124; if (!yy_HtmlComment(yy)) goto l2126; goto l2124; + l2126:; yy->__pos= yypos2124; yy->__thunkpos= yythunkpos2124; if (!yy_HtmlBlockSelfClosing(yy)) goto l2122; + } + l2124:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2122; +#undef yytext +#undef yyleng + } if (!yy_BlankLine(yy)) goto l2122; + l2127:; + { int yypos2128= yy->__pos, yythunkpos2128= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2128; goto l2127; + l2128:; yy->__pos= yypos2128; yy->__thunkpos= yythunkpos2128; + } yyDo(yy, yy_1_MarkdownHtmlBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MarkdownHtmlBlock", yy->__buf+yy->__pos)); + return 1; + l2122:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MarkdownHtmlBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HtmlBlock(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HtmlBlock")); + { int yypos2130= yy->__pos, yythunkpos2130= yy->__thunkpos; if (!yy_MarkdownHtmlTagOpen(yy)) goto l2130; goto l2129; + l2130:; yy->__pos= yypos2130; yy->__thunkpos= yythunkpos2130; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2129; +#undef yytext +#undef yyleng + } + { int yypos2131= yy->__pos, yythunkpos2131= yy->__thunkpos; if (!yy_HtmlBlockInTags(yy)) goto l2132; goto l2131; + l2132:; yy->__pos= yypos2131; yy->__thunkpos= yythunkpos2131; if (!yy_HtmlComment(yy)) goto l2133; goto l2131; + l2133:; yy->__pos= yypos2131; yy->__thunkpos= yythunkpos2131; if (!yy_HtmlBlockSelfClosing(yy)) goto l2129; + } + l2131:; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2129; +#undef yytext +#undef yyleng + } if (!yy_BlankLine(yy)) goto l2129; + l2134:; + { int yypos2135= yy->__pos, yythunkpos2135= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2135; goto l2134; + l2135:; yy->__pos= yypos2135; yy->__thunkpos= yythunkpos2135; + } yyDo(yy, yy_1_HtmlBlock, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "HtmlBlock", yy->__buf+yy->__pos)); + return 1; + l2129:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HtmlBlock", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BulletList(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "BulletList")); + { int yypos2137= yy->__pos, yythunkpos2137= yy->__thunkpos; if (!yy_Bullet(yy)) goto l2136; yy->__pos= yypos2137; yy->__thunkpos= yythunkpos2137; + } + { int yypos2138= yy->__pos, yythunkpos2138= yy->__thunkpos; if (!yy_ListTight(yy)) goto l2139; goto l2138; + l2139:; yy->__pos= yypos2138; yy->__thunkpos= yythunkpos2138; if (!yy_ListLoose(yy)) goto l2136; + } + l2138:; yyDo(yy, yy_1_BulletList, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BulletList", yy->__buf+yy->__pos)); + return 1; + l2136:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BulletList", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_OrderedList(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "OrderedList")); + { int yypos2141= yy->__pos, yythunkpos2141= yy->__thunkpos; if (!yy_Enumerator(yy)) goto l2140; yy->__pos= yypos2141; yy->__thunkpos= yythunkpos2141; + } + { int yypos2142= yy->__pos, yythunkpos2142= yy->__thunkpos; if (!yy_ListTight(yy)) goto l2143; goto l2142; + l2143:; yy->__pos= yypos2142; yy->__thunkpos= yythunkpos2142; if (!yy_ListLoose(yy)) goto l2140; + } + l2142:; yyDo(yy, yy_1_OrderedList, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "OrderedList", yy->__buf+yy->__pos)); + return 1; + l2140:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "OrderedList", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HeadingSection(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "HeadingSection")); if (!yy_StartList(yy)) goto l2144; yyDo(yy, yySet, -1, 0); if (!yy_Heading(yy)) goto l2144; yyDo(yy, yy_1_HeadingSection, yy->__begin, yy->__end); + l2145:; + { int yypos2146= yy->__pos, yythunkpos2146= yy->__thunkpos; if (!yy_HeadingSectionBlock(yy)) goto l2146; yyDo(yy, yy_2_HeadingSection, yy->__begin, yy->__end); goto l2145; + l2146:; yy->__pos= yypos2146; yy->__thunkpos= yythunkpos2146; + } yyDo(yy, yy_3_HeadingSection, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "HeadingSection", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2144:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HeadingSection", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_HorizontalRule(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "HorizontalRule")); if (!yy_NonindentSpace(yy)) goto l2147; + { int yypos2148= yy->__pos, yythunkpos2148= yy->__thunkpos; if (!yymatchChar(yy, '*')) goto l2149; if (!yy_Sp(yy)) goto l2149; if (!yymatchChar(yy, '*')) goto l2149; if (!yy_Sp(yy)) goto l2149; if (!yymatchChar(yy, '*')) goto l2149; + l2150:; + { int yypos2151= yy->__pos, yythunkpos2151= yy->__thunkpos; if (!yy_Sp(yy)) goto l2151; if (!yymatchChar(yy, '*')) goto l2151; goto l2150; + l2151:; yy->__pos= yypos2151; yy->__thunkpos= yythunkpos2151; + } goto l2148; + l2149:; yy->__pos= yypos2148; yy->__thunkpos= yythunkpos2148; if (!yymatchChar(yy, '-')) goto l2152; if (!yy_Sp(yy)) goto l2152; if (!yymatchChar(yy, '-')) goto l2152; if (!yy_Sp(yy)) goto l2152; if (!yymatchChar(yy, '-')) goto l2152; if (!yy_Sp(yy)) goto l2152; if (!yymatchChar(yy, '-')) goto l2152; + l2153:; + { int yypos2154= yy->__pos, yythunkpos2154= yy->__thunkpos; if (!yy_Sp(yy)) goto l2154; if (!yymatchChar(yy, '-')) goto l2154; goto l2153; + l2154:; yy->__pos= yypos2154; yy->__thunkpos= yythunkpos2154; + } goto l2148; + l2152:; yy->__pos= yypos2148; yy->__thunkpos= yythunkpos2148; if (!yymatchChar(yy, '_')) goto l2147; if (!yy_Sp(yy)) goto l2147; if (!yymatchChar(yy, '_')) goto l2147; if (!yy_Sp(yy)) goto l2147; if (!yymatchChar(yy, '_')) goto l2147; + l2155:; + { int yypos2156= yy->__pos, yythunkpos2156= yy->__thunkpos; if (!yy_Sp(yy)) goto l2156; if (!yymatchChar(yy, '_')) goto l2156; goto l2155; + l2156:; yy->__pos= yypos2156; yy->__thunkpos= yythunkpos2156; + } + } + l2148:; if (!yy_Sp(yy)) goto l2147; if (!yy_Newline(yy)) goto l2147; if (!yy_BlankLine(yy)) goto l2147; + l2157:; + { int yypos2158= yy->__pos, yythunkpos2158= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2158; goto l2157; + l2158:; yy->__pos= yypos2158; yy->__thunkpos= yythunkpos2158; + } yyDo(yy, yy_1_HorizontalRule, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "HorizontalRule", yy->__buf+yy->__pos)); + return 1; + l2147:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "HorizontalRule", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Reference(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 4, 0); + yyprintf((stderr, "%s\n", "Reference")); if (!yy_StartList(yy)) goto l2159; yyDo(yy, yySet, -4, 0); if (!yy_NonindentSpace(yy)) goto l2159; + { int yypos2160= yy->__pos, yythunkpos2160= yy->__thunkpos; if (!yymatchString(yy, "[]")) goto l2160; goto l2159; + l2160:; yy->__pos= yypos2160; yy->__thunkpos= yythunkpos2160; + } if (!yy_Label(yy)) goto l2159; yyDo(yy, yySet, -3, 0); if (!yymatchChar(yy, ':')) goto l2159; if (!yy_Spnl(yy)) goto l2159; if (!yy_RefSrc(yy)) goto l2159; yyDo(yy, yySet, -2, 0); if (!yy_RefTitle(yy)) goto l2159; yyDo(yy, yySet, -1, 0); + { int yypos2161= yy->__pos, yythunkpos2161= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) )) goto l2161; +#undef yytext +#undef yyleng + } + { int yypos2163= yy->__pos, yythunkpos2163= yy->__thunkpos; if (!yy_Attributes(yy)) goto l2163; yyDo(yy, yy_1_Reference, yy->__begin, yy->__end); goto l2164; + l2163:; yy->__pos= yypos2163; yy->__thunkpos= yythunkpos2163; + } + l2164:; goto l2162; + l2161:; yy->__pos= yypos2161; yy->__thunkpos= yythunkpos2161; + } + l2162:; if (!yy_MagicBlankLine(yy)) goto l2159; + l2165:; + { int yypos2166= yy->__pos, yythunkpos2166= yy->__thunkpos; if (!yy_MagicBlankLine(yy)) goto l2166; goto l2165; + l2166:; yy->__pos= yypos2166; yy->__thunkpos= yythunkpos2166; + } yyDo(yy, yy_2_Reference, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Reference", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 4, 0); + return 1; + l2159:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Reference", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Note(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Note")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l2167; +#undef yytext +#undef yyleng + } if (!yy_NonindentSpace(yy)) goto l2167; if (!yy_RawNoteReference(yy)) goto l2167; yyDo(yy, yySet, -2, 0); if (!yymatchChar(yy, ':')) goto l2167; if (!yy_Sp(yy)) goto l2167; if (!yy_StartList(yy)) goto l2167; yyDo(yy, yySet, -1, 0); if (!yy_RawNoteBlock(yy)) goto l2167; yyDo(yy, yy_1_Note, yy->__begin, yy->__end); + l2168:; + { int yypos2169= yy->__pos, yythunkpos2169= yy->__thunkpos; + { int yypos2170= yy->__pos, yythunkpos2170= yy->__thunkpos; if (!yy_Indent(yy)) goto l2169; yy->__pos= yypos2170; yy->__thunkpos= yythunkpos2170; + } if (!yy_RawNoteBlock(yy)) goto l2169; yyDo(yy, yy_2_Note, yy->__begin, yy->__end); goto l2168; + l2169:; yy->__pos= yypos2169; yy->__thunkpos= yythunkpos2169; + } yyDo(yy, yy_3_Note, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Note", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2167:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Note", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Glossary(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "Glossary")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_NOTES) )) goto l2171; +#undef yytext +#undef yyleng + } if (!yy_StartList(yy)) goto l2171; yyDo(yy, yySet, -2, 0); if (!yy_NonindentSpace(yy)) goto l2171; if (!yy_RawNoteReference(yy)) goto l2171; yyDo(yy, yySet, -1, 0); if (!yymatchChar(yy, ':')) goto l2171; if (!yy_Sp(yy)) goto l2171; if (!yymatchString(yy, "glossary:")) goto l2171; if (!yy_Sp(yy)) goto l2171; if (!yy_GlossaryTerm(yy)) goto l2171; yyDo(yy, yy_1_Glossary, yy->__begin, yy->__end); + { int yypos2172= yy->__pos, yythunkpos2172= yy->__thunkpos; if (!yy_GlossarySortKey(yy)) goto l2172; yyDo(yy, yy_2_Glossary, yy->__begin, yy->__end); goto l2173; + l2172:; yy->__pos= yypos2172; yy->__thunkpos= yythunkpos2172; + } + l2173:; if (!yy_Newline(yy)) goto l2171; if (!yy_RawNoteBlock(yy)) goto l2171; yyDo(yy, yy_3_Glossary, yy->__begin, yy->__end); + l2174:; + { int yypos2175= yy->__pos, yythunkpos2175= yy->__thunkpos; + { int yypos2176= yy->__pos, yythunkpos2176= yy->__thunkpos; if (!yy_Indent(yy)) goto l2175; yy->__pos= yypos2176; yy->__thunkpos= yythunkpos2176; + } if (!yy_RawNoteBlock(yy)) goto l2175; yyDo(yy, yy_4_Glossary, yy->__begin, yy->__end); goto l2174; + l2175:; yy->__pos= yypos2175; yy->__thunkpos= yythunkpos2175; + } yyDo(yy, yy_5_Glossary, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Glossary", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2171:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Glossary", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DefinitionList(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "DefinitionList")); if (!yy_StartList(yy)) goto l2177; yyDo(yy, yySet, -1, 0); + { int yypos2178= yy->__pos, yythunkpos2178= yy->__thunkpos; if (!yy_TermLine(yy)) goto l2177; + l2179:; + { int yypos2180= yy->__pos, yythunkpos2180= yy->__thunkpos; if (!yy_TermLine(yy)) goto l2180; goto l2179; + l2180:; yy->__pos= yypos2180; yy->__thunkpos= yythunkpos2180; + } + { int yypos2181= yy->__pos, yythunkpos2181= yy->__thunkpos; if (!yy_Newline(yy)) goto l2181; goto l2182; + l2181:; yy->__pos= yypos2181; yy->__thunkpos= yythunkpos2181; + } + l2182:; if (!yy_NonindentSpace(yy)) goto l2177; if (!yymatchChar(yy, ':')) goto l2177; yy->__pos= yypos2178; yy->__thunkpos= yythunkpos2178; + } if (!yy_Term(yy)) goto l2177; yyDo(yy, yy_1_DefinitionList, yy->__begin, yy->__end); + l2185:; + { int yypos2186= yy->__pos, yythunkpos2186= yy->__thunkpos; if (!yy_Term(yy)) goto l2186; yyDo(yy, yy_1_DefinitionList, yy->__begin, yy->__end); goto l2185; + l2186:; yy->__pos= yypos2186; yy->__thunkpos= yythunkpos2186; + } + { int yypos2187= yy->__pos, yythunkpos2187= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2187; goto l2188; + l2187:; yy->__pos= yypos2187; yy->__thunkpos= yythunkpos2187; + } + l2188:; if (!yy_Definition(yy)) goto l2177; yyDo(yy, yy_2_DefinitionList, yy->__begin, yy->__end); + l2189:; + { int yypos2190= yy->__pos, yythunkpos2190= yy->__thunkpos; if (!yy_Definition(yy)) goto l2190; yyDo(yy, yy_2_DefinitionList, yy->__begin, yy->__end); goto l2189; + l2190:; yy->__pos= yypos2190; yy->__thunkpos= yythunkpos2190; + } + l2191:; + { int yypos2192= yy->__pos, yythunkpos2192= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2192; goto l2191; + l2192:; yy->__pos= yypos2192; yy->__thunkpos= yythunkpos2192; + } + l2183:; + { int yypos2184= yy->__pos, yythunkpos2184= yy->__thunkpos; if (!yy_Term(yy)) goto l2184; yyDo(yy, yy_1_DefinitionList, yy->__begin, yy->__end); + l2193:; + { int yypos2194= yy->__pos, yythunkpos2194= yy->__thunkpos; if (!yy_Term(yy)) goto l2194; yyDo(yy, yy_1_DefinitionList, yy->__begin, yy->__end); goto l2193; + l2194:; yy->__pos= yypos2194; yy->__thunkpos= yythunkpos2194; + } + { int yypos2195= yy->__pos, yythunkpos2195= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2195; goto l2196; + l2195:; yy->__pos= yypos2195; yy->__thunkpos= yythunkpos2195; + } + l2196:; if (!yy_Definition(yy)) goto l2184; yyDo(yy, yy_2_DefinitionList, yy->__begin, yy->__end); + l2197:; + { int yypos2198= yy->__pos, yythunkpos2198= yy->__thunkpos; if (!yy_Definition(yy)) goto l2198; yyDo(yy, yy_2_DefinitionList, yy->__begin, yy->__end); goto l2197; + l2198:; yy->__pos= yypos2198; yy->__thunkpos= yythunkpos2198; + } + l2199:; + { int yypos2200= yy->__pos, yythunkpos2200= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2200; goto l2199; + l2200:; yy->__pos= yypos2200; yy->__thunkpos= yythunkpos2200; + } goto l2183; + l2184:; yy->__pos= yypos2184; yy->__thunkpos= yythunkpos2184; + } yyDo(yy, yy_3_DefinitionList, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "DefinitionList", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2177:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DefinitionList", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Verbatim(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Verbatim")); if (!yy_StartList(yy)) goto l2201; yyDo(yy, yySet, -1, 0); if (!yy_FirstVerbatimChunk(yy)) goto l2201; yyDo(yy, yy_1_Verbatim, yy->__begin, yy->__end); + l2202:; + { int yypos2203= yy->__pos, yythunkpos2203= yy->__thunkpos; if (!yy_FollowingVerbatimChunk(yy)) goto l2203; yyDo(yy, yy_2_Verbatim, yy->__begin, yy->__end); goto l2202; + l2203:; yy->__pos= yypos2203; yy->__thunkpos= yythunkpos2203; + } + l2204:; + { int yypos2205= yy->__pos, yythunkpos2205= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2205; goto l2204; + l2205:; yy->__pos= yypos2205; yy->__thunkpos= yythunkpos2205; + } yyDo(yy, yy_3_Verbatim, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Verbatim", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2201:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Verbatim", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlockComment(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "BlockComment")); if (!yy_BlockCommentRaw(yy)) goto l2206; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_BlockComment, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BlockComment", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2206:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlockComment", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlockQuote(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "BlockQuote")); if (!yy_BlockQuoteRaw(yy)) goto l2207; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_BlockQuote, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "BlockQuote", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2207:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlockQuote", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_RawLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "RawLine")); + { int yypos2209= yy->__pos, yythunkpos2209= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2210; +#undef yytext +#undef yyleng + } + l2211:; + { int yypos2212= yy->__pos, yythunkpos2212= yy->__thunkpos; + { int yypos2213= yy->__pos, yythunkpos2213= yy->__thunkpos; if (!yymatchChar(yy, '\r')) goto l2213; goto l2212; + l2213:; yy->__pos= yypos2213; yy->__thunkpos= yythunkpos2213; + } + { int yypos2214= yy->__pos, yythunkpos2214= yy->__thunkpos; if (!yymatchChar(yy, '\n')) goto l2214; goto l2212; + l2214:; yy->__pos= yypos2214; yy->__thunkpos= yythunkpos2214; + } if (!yymatchDot(yy)) goto l2212; goto l2211; + l2212:; yy->__pos= yypos2212; yy->__thunkpos= yythunkpos2212; + } if (!yy_Newline(yy)) goto l2210; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2210; +#undef yytext +#undef yyleng + } goto l2209; + l2210:; yy->__pos= yypos2209; yy->__thunkpos= yythunkpos2209; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2208; +#undef yytext +#undef yyleng + } if (!yymatchDot(yy)) goto l2208; + l2215:; + { int yypos2216= yy->__pos, yythunkpos2216= yy->__thunkpos; if (!yymatchDot(yy)) goto l2216; goto l2215; + l2216:; yy->__pos= yypos2216; yy->__thunkpos= yythunkpos2216; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2208; +#undef yytext +#undef yyleng + } if (!yy_Eof(yy)) goto l2208; + } + l2209:; + yyprintf((stderr, " ok %s @ %s\n", "RawLine", yy->__buf+yy->__pos)); + return 1; + l2208:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "RawLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BlankLine(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "BlankLine")); if (!yy_Sp(yy)) goto l2217; if (!yy_Newline(yy)) goto l2217; + yyprintf((stderr, " ok %s @ %s\n", "BlankLine", yy->__buf+yy->__pos)); + return 1; + l2217:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BlankLine", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_SingleLineMetaKeyValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "SingleLineMetaKeyValue")); if (!yy_MetaDataKey(yy)) goto l2218; if (!yy_Sp(yy)) goto l2218; if (!yymatchChar(yy, ':')) goto l2218; if (!yy_Sp(yy)) goto l2218; + l2219:; + { int yypos2220= yy->__pos, yythunkpos2220= yy->__thunkpos; + { int yypos2221= yy->__pos, yythunkpos2221= yy->__thunkpos; if (!yy_Newline(yy)) goto l2221; goto l2220; + l2221:; yy->__pos= yypos2221; yy->__thunkpos= yythunkpos2221; + } if (!yymatchDot(yy)) goto l2220; goto l2219; + l2220:; yy->__pos= yypos2220; yy->__thunkpos= yythunkpos2220; + } + yyprintf((stderr, " ok %s @ %s\n", "SingleLineMetaKeyValue", yy->__buf+yy->__pos)); + return 1; + l2218:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "SingleLineMetaKeyValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_AlphanumericAscii(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "AlphanumericAscii")); if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l2222; + yyprintf((stderr, " ok %s @ %s\n", "AlphanumericAscii", yy->__buf+yy->__pos)); + return 1; + l2222:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "AlphanumericAscii", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MetaDataValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "MetaDataValue")); if (!yy_StartList(yy)) goto l2223; yyDo(yy, yySet, -1, 0); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2223; +#undef yytext +#undef yyleng + } + l2224:; + { int yypos2225= yy->__pos, yythunkpos2225= yy->__thunkpos; + { int yypos2226= yy->__pos, yythunkpos2226= yy->__thunkpos; if (!yy_Newline(yy)) goto l2226; goto l2225; + l2226:; yy->__pos= yypos2226; yy->__thunkpos= yythunkpos2226; + } if (!yymatchDot(yy)) goto l2225; goto l2224; + l2225:; yy->__pos= yypos2225; yy->__thunkpos= yythunkpos2225; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2223; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_MetaDataValue, yy->__begin, yy->__end); + { int yypos2227= yy->__pos, yythunkpos2227= yy->__thunkpos; if (!yy_Newline(yy)) goto l2228; + { int yypos2229= yy->__pos, yythunkpos2229= yy->__thunkpos; + { int yypos2230= yy->__pos, yythunkpos2230= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2230; goto l2228; + l2230:; yy->__pos= yypos2230; yy->__thunkpos= yythunkpos2230; + } + { int yypos2231= yy->__pos, yythunkpos2231= yy->__thunkpos; if (!yy_SingleLineMetaKeyValue(yy)) goto l2231; goto l2228; + l2231:; yy->__pos= yypos2231; yy->__thunkpos= yythunkpos2231; + } if (!yy_Sp(yy)) goto l2228; if (!yy_RawLine(yy)) goto l2228; yy->__pos= yypos2229; yy->__thunkpos= yythunkpos2229; + } yyDo(yy, yy_2_MetaDataValue, yy->__begin, yy->__end); goto l2227; + l2228:; yy->__pos= yypos2227; yy->__thunkpos= yythunkpos2227; if (!yy_Newline(yy)) goto l2223; + } + l2227:; + l2232:; + { int yypos2233= yy->__pos, yythunkpos2233= yy->__thunkpos; + { int yypos2234= yy->__pos, yythunkpos2234= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2234; goto l2233; + l2234:; yy->__pos= yypos2234; yy->__thunkpos= yythunkpos2234; + } + { int yypos2235= yy->__pos, yythunkpos2235= yy->__thunkpos; if (!yy_SingleLineMetaKeyValue(yy)) goto l2235; goto l2233; + l2235:; yy->__pos= yypos2235; yy->__thunkpos= yythunkpos2235; + } if (!yy_Sp(yy)) goto l2233; if (!yy_RawLine(yy)) goto l2233; yyDo(yy, yy_3_MetaDataValue, yy->__begin, yy->__end); goto l2232; + l2233:; yy->__pos= yypos2233; yy->__thunkpos= yythunkpos2233; + } yyDo(yy, yy_4_MetaDataValue, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaDataValue", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2223:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaDataValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MetaDataOnly2(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "MetaDataOnly2")); + { int yypos2237= yy->__pos, yythunkpos2237= yy->__thunkpos; if (!yy_BOM(yy)) goto l2237; goto l2238; + l2237:; yy->__pos= yypos2237; yy->__thunkpos= yythunkpos2237; + } + l2238:; if (!yy_StartList(yy)) goto l2236; yyDo(yy, yySet, -1, 0); + { int yypos2239= yy->__pos, yythunkpos2239= yy->__thunkpos; if (!yy_MetaData(yy)) goto l2239; yyDo(yy, yy_1_MetaDataOnly2, yy->__begin, yy->__end); goto l2240; + l2239:; yy->__pos= yypos2239; yy->__thunkpos= yythunkpos2239; + } + l2240:; + l2241:; + { int yypos2242= yy->__pos, yythunkpos2242= yy->__thunkpos; if (!yymatchDot(yy)) goto l2242; goto l2241; + l2242:; yy->__pos= yypos2242; yy->__thunkpos= yythunkpos2242; + } yyDo(yy, yy_2_MetaDataOnly2, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaDataOnly2", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2236:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaDataOnly2", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MetaDataOnly(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "MetaDataOnly")); + { int yypos2244= yy->__pos, yythunkpos2244= yy->__thunkpos; if (!yy_BOM(yy)) goto l2244; goto l2245; + l2244:; yy->__pos= yypos2244; yy->__thunkpos= yythunkpos2244; + } + l2245:; if (!yy_StartList(yy)) goto l2243; yyDo(yy, yySet, -1, 0); + { int yypos2246= yy->__pos, yythunkpos2246= yy->__thunkpos; if (!yy_MetaData(yy)) goto l2246; yyDo(yy, yy_1_MetaDataOnly, yy->__begin, yy->__end); goto l2247; + l2246:; yy->__pos= yypos2246; yy->__thunkpos= yythunkpos2246; + } + l2247:; + l2248:; + { int yypos2249= yy->__pos, yythunkpos2249= yy->__thunkpos; if (!yymatchDot(yy)) goto l2249; goto l2248; + l2249:; yy->__pos= yypos2249; yy->__thunkpos= yythunkpos2249; + } yyDo(yy, yy_2_MetaDataOnly, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaDataOnly", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2243:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaDataOnly", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MetaDataKeyValue(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "MetaDataKeyValue")); if (!yy_MetaDataKey(yy)) goto l2250; yyDo(yy, yySet, -2, 0); if (!yy_Sp(yy)) goto l2250; if (!yymatchChar(yy, ':')) goto l2250; if (!yy_Sp(yy)) goto l2250; if (!yy_MetaDataValue(yy)) goto l2250; yyDo(yy, yySet, -1, 0); yyDo(yy, yy_1_MetaDataKeyValue, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaDataKeyValue", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2250:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaDataKeyValue", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_MetaData(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "MetaData")); if (!yy_StartList(yy)) goto l2251; yyDo(yy, yySet, -1, 0); + { int yypos2252= yy->__pos, yythunkpos2252= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l2252; + l2253:; + { int yypos2254= yy->__pos, yythunkpos2254= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l2254; goto l2253; + l2254:; yy->__pos= yypos2254; yy->__thunkpos= yythunkpos2254; + } if (!yymatchString(yy, "://")) goto l2252; goto l2251; + l2252:; yy->__pos= yypos2252; yy->__thunkpos= yythunkpos2252; + } if (!yy_MetaDataKeyValue(yy)) goto l2251; yyDo(yy, yy_1_MetaData, yy->__begin, yy->__end); + l2255:; + { int yypos2256= yy->__pos, yythunkpos2256= yy->__thunkpos; if (!yy_MetaDataKeyValue(yy)) goto l2256; yyDo(yy, yy_1_MetaData, yy->__begin, yy->__end); goto l2255; + l2256:; yy->__pos= yypos2256; yy->__thunkpos= yythunkpos2256; + } yyDo(yy, yy_2_MetaData, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaData", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2251:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaData", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Newline(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Newline")); + { int yypos2258= yy->__pos, yythunkpos2258= yy->__thunkpos; if (!yymatchChar(yy, '\n')) goto l2259; goto l2258; + l2259:; yy->__pos= yypos2258; yy->__thunkpos= yythunkpos2258; if (!yymatchChar(yy, '\r')) goto l2257; + { int yypos2260= yy->__pos, yythunkpos2260= yy->__thunkpos; if (!yymatchChar(yy, '\n')) goto l2260; goto l2261; + l2260:; yy->__pos= yypos2260; yy->__thunkpos= yythunkpos2260; + } + l2261:; + } + l2258:; + yyprintf((stderr, " ok %s @ %s\n", "Newline", yy->__buf+yy->__pos)); + return 1; + l2257:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Newline", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Sp(yycontext *yy) +{ + yyprintf((stderr, "%s\n", "Sp")); + l2263:; + { int yypos2264= yy->__pos, yythunkpos2264= yy->__thunkpos; if (!yy_Spacechar(yy)) goto l2264; goto l2263; + l2264:; yy->__pos= yypos2264; yy->__thunkpos= yythunkpos2264; + } + yyprintf((stderr, " ok %s @ %s\n", "Sp", yy->__buf+yy->__pos)); + return 1; +} +YY_RULE(int) yy_MetaDataKey(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "MetaDataKey")); yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_BEGIN)) goto l2265; +#undef yytext +#undef yyleng + } + { int yypos2266= yy->__pos, yythunkpos2266= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l2266; + l2267:; + { int yypos2268= yy->__pos, yythunkpos2268= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l2268; goto l2267; + l2268:; yy->__pos= yypos2268; yy->__thunkpos= yythunkpos2268; + } if (!yymatchString(yy, "://")) goto l2266; goto l2265; + l2266:; yy->__pos= yypos2266; yy->__thunkpos= yythunkpos2266; + } if (!yy_AlphanumericAscii(yy)) goto l2265; + l2269:; + { int yypos2270= yy->__pos, yythunkpos2270= yy->__thunkpos; if (!yy_Sp(yy)) goto l2270; + { int yypos2273= yy->__pos, yythunkpos2273= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l2274; goto l2273; + l2274:; yy->__pos= yypos2273; yy->__thunkpos= yythunkpos2273; if (!yymatchChar(yy, '_')) goto l2275; goto l2273; + l2275:; yy->__pos= yypos2273; yy->__thunkpos= yythunkpos2273; if (!yymatchChar(yy, ' ')) goto l2276; goto l2273; + l2276:; yy->__pos= yypos2273; yy->__thunkpos= yythunkpos2273; if (!yymatchChar(yy, '-')) goto l2270; + } + l2273:; + l2271:; + { int yypos2272= yy->__pos, yythunkpos2272= yy->__thunkpos; + { int yypos2277= yy->__pos, yythunkpos2277= yy->__thunkpos; if (!yy_AlphanumericAscii(yy)) goto l2278; goto l2277; + l2278:; yy->__pos= yypos2277; yy->__thunkpos= yythunkpos2277; if (!yymatchChar(yy, '_')) goto l2279; goto l2277; + l2279:; yy->__pos= yypos2277; yy->__thunkpos= yythunkpos2277; if (!yymatchChar(yy, ' ')) goto l2280; goto l2277; + l2280:; yy->__pos= yypos2277; yy->__thunkpos= yythunkpos2277; if (!yymatchChar(yy, '-')) goto l2272; + } + l2277:; goto l2271; + l2272:; yy->__pos= yypos2272; yy->__thunkpos= yythunkpos2272; + } goto l2269; + l2270:; yy->__pos= yypos2270; yy->__thunkpos= yythunkpos2270; + } yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!(YY_END)) goto l2265; +#undef yytext +#undef yyleng + } yyDo(yy, yy_1_MetaDataKey, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "MetaDataKey", yy->__buf+yy->__pos)); + return 1; + l2265:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "MetaDataKey", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_DocWithMetaData(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 2, 0); + yyprintf((stderr, "%s\n", "DocWithMetaData")); + { int yypos2282= yy->__pos, yythunkpos2282= yy->__thunkpos; if (!yy_BOM(yy)) goto l2282; goto l2283; + l2282:; yy->__pos= yypos2282; yy->__thunkpos= yythunkpos2282; + } + l2283:; if (!yy_StartList(yy)) goto l2281; yyDo(yy, yySet, -2, 0); if (!yy_StartList(yy)) goto l2281; yyDo(yy, yySet, -1, 0); + { int yypos2284= yy->__pos, yythunkpos2284= yy->__thunkpos; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2284; +#undef yytext +#undef yyleng + } + { int yypos2286= yy->__pos, yythunkpos2286= yy->__thunkpos; if (!yy_MetaDataKey(yy)) goto l2284; if (!yy_Sp(yy)) goto l2284; if (!yymatchChar(yy, ':')) goto l2284; if (!yy_Sp(yy)) goto l2284; + { int yypos2287= yy->__pos, yythunkpos2287= yy->__thunkpos; if (!yy_Newline(yy)) goto l2287; goto l2284; + l2287:; yy->__pos= yypos2287; yy->__thunkpos= yythunkpos2287; + } yy->__pos= yypos2286; yy->__thunkpos= yythunkpos2286; + } if (!yy_MetaData(yy)) goto l2284; yyDo(yy, yy_1_DocWithMetaData, yy->__begin, yy->__end); goto l2285; + l2284:; yy->__pos= yypos2284; yy->__thunkpos= yythunkpos2284; + } + l2285:; + l2288:; + { int yypos2289= yy->__pos, yythunkpos2289= yy->__thunkpos; if (!yy_Block(yy)) goto l2289; yyDo(yy, yy_2_DocWithMetaData, yy->__begin, yy->__end); goto l2288; + l2289:; yy->__pos= yypos2289; yy->__thunkpos= yythunkpos2289; + } yyDo(yy, yy_3_DocWithMetaData, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "DocWithMetaData", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 2, 0); + return 1; + l2281:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "DocWithMetaData", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Block(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "Block")); + l2291:; + { int yypos2292= yy->__pos, yythunkpos2292= yy->__thunkpos; if (!yy_BlankLine(yy)) goto l2292; goto l2291; + l2292:; yy->__pos= yypos2292; yy->__thunkpos= yythunkpos2292; + } + { int yypos2293= yy->__pos, yythunkpos2293= yy->__thunkpos; if (!yy_BlockQuote(yy)) goto l2294; goto l2293; + l2294:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_BLOCK_COMMENT) )) goto l2295; +#undef yytext +#undef yyleng + } if (!yy_BlockComment(yy)) goto l2295; goto l2293; + l2295:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_Verbatim(yy)) goto l2296; goto l2293; + l2296:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2297; +#undef yytext +#undef yyleng + } if (!yy_DefinitionList(yy)) goto l2297; goto l2293; + l2297:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2298; +#undef yytext +#undef yyleng + } if (!yy_Glossary(yy)) goto l2298; goto l2293; + l2298:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_Note(yy)) goto l2299; goto l2293; + l2299:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_Reference(yy)) goto l2300; goto l2293; + l2300:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_HorizontalRule(yy)) goto l2301; goto l2293; + l2301:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_HeadingSection(yy)) goto l2302; goto l2293; + l2302:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_OrderedList(yy)) goto l2303; goto l2293; + l2303:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_BulletList(yy)) goto l2304; goto l2293; + l2304:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_HtmlBlock(yy)) goto l2305; goto l2293; + l2305:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_MarkdownHtmlBlock(yy)) goto l2306; goto l2293; + l2306:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_FencedCodeBlock(yy)) goto l2307; goto l2293; + l2307:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_StyleBlock(yy)) goto l2308; goto l2293; + l2308:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( extension(yy->state, EXT_TABLES) )) goto l2309; +#undef yytext +#undef yyleng + } if (!yy_Table(yy)) goto l2309; goto l2293; + l2309:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; yyText(yy, yy->__begin, yy->__end); { +#define yytext yy->__text +#define yyleng yy->__textlen +if (!( !extension(yy->state, EXT_COMPATIBILITY) )) goto l2310; +#undef yytext +#undef yyleng + } if (!yy_ImageBlock(yy)) goto l2310; goto l2293; + l2310:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; + { int yypos2312= yy->__pos, yythunkpos2312= yy->__thunkpos; + { int yypos2313= yy->__pos, yythunkpos2313= yy->__thunkpos; if (!yy_Sp(yy)) goto l2313; goto l2314; + l2313:; yy->__pos= yypos2313; yy->__thunkpos= yythunkpos2313; + } + l2314:; if (!yy_HtmlBlockOpenDiv(yy)) goto l2312; goto l2311; + l2312:; yy->__pos= yypos2312; yy->__thunkpos= yythunkpos2312; + } if (!yy_Para(yy)) goto l2311; goto l2293; + l2311:; yy->__pos= yypos2293; yy->__thunkpos= yythunkpos2293; if (!yy_Plain(yy)) goto l2290; + } + l2293:; + yyprintf((stderr, " ok %s @ %s\n", "Block", yy->__buf+yy->__pos)); + return 1; + l2290:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Block", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_StartList(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "StartList")); + { int yypos2316= yy->__pos, yythunkpos2316= yy->__thunkpos; if (!yymatchDot(yy)) goto l2315; yy->__pos= yypos2316; yy->__thunkpos= yythunkpos2316; + } yyDo(yy, yy_1_StartList, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "StartList", yy->__buf+yy->__pos)); + return 1; + l2315:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "StartList", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_BOM(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; + yyprintf((stderr, "%s\n", "BOM")); if (!yymatchString(yy, "\357\273\277")) goto l2317; + yyprintf((stderr, " ok %s @ %s\n", "BOM", yy->__buf+yy->__pos)); + return 1; + l2317:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "BOM", yy->__buf+yy->__pos)); + return 0; +} +YY_RULE(int) yy_Doc(yycontext *yy) +{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyDo(yy, yyPush, 1, 0); + yyprintf((stderr, "%s\n", "Doc")); + { int yypos2319= yy->__pos, yythunkpos2319= yy->__thunkpos; if (!yy_BOM(yy)) goto l2319; goto l2320; + l2319:; yy->__pos= yypos2319; yy->__thunkpos= yythunkpos2319; + } + l2320:; if (!yy_StartList(yy)) goto l2318; yyDo(yy, yySet, -1, 0); + l2321:; + { int yypos2322= yy->__pos, yythunkpos2322= yy->__thunkpos; if (!yy_Block(yy)) goto l2322; yyDo(yy, yy_1_Doc, yy->__begin, yy->__end); goto l2321; + l2322:; yy->__pos= yypos2322; yy->__thunkpos= yythunkpos2322; + } yyDo(yy, yy_2_Doc, yy->__begin, yy->__end); + yyprintf((stderr, " ok %s @ %s\n", "Doc", yy->__buf+yy->__pos)); yyDo(yy, yyPop, 1, 0); + return 1; + l2318:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; + yyprintf((stderr, " fail %s @ %s\n", "Doc", yy->__buf+yy->__pos)); + return 0; +} + +#ifndef YY_PART + +typedef int (*yyrule)(yycontext *yy); + +YY_PARSE(int) YYPARSEFROM(YY_CTX_PARAM_ yyrule yystart) +{ + int yyok; + if (!yyctx->__buflen) + { + yyctx->__buflen= YY_BUFFER_SIZE; + yyctx->__buf= (char *)YY_MALLOC(yyctx, yyctx->__buflen); + yyctx->__textlen= YY_BUFFER_SIZE; + yyctx->__text= (char *)YY_MALLOC(yyctx, yyctx->__textlen); + yyctx->__thunkslen= YY_STACK_SIZE; + yyctx->__thunks= (yythunk *)YY_MALLOC(yyctx, sizeof(yythunk) * yyctx->__thunkslen); + yyctx->__valslen= YY_STACK_SIZE; + yyctx->__vals= (YYSTYPE *)YY_MALLOC(yyctx, sizeof(YYSTYPE) * yyctx->__valslen); + yyctx->__begin= yyctx->__end= yyctx->__pos= yyctx->__limit= yyctx->__thunkpos= 0; + } + yyctx->__begin= yyctx->__end= yyctx->__pos; + yyctx->__thunkpos= 0; + yyctx->__val= yyctx->__vals; + yyok= yystart(yyctx); + if (yyok) yyDone(yyctx); + yyCommit(yyctx); + return yyok; +} + +YY_PARSE(int) YYPARSE(YY_CTX_PARAM) +{ + return YYPARSEFROM(YY_CTX_ARG_ yy_Doc); +} + +YY_PARSE(yycontext *) YYRELEASE(yycontext *yyctx) +{ + if (yyctx->__buflen) + { + yyctx->__buflen= 0; + YY_FREE(yyctx, yyctx->__buf); + YY_FREE(yyctx, yyctx->__text); + YY_FREE(yyctx, yyctx->__thunks); + YY_FREE(yyctx, yyctx->__vals); + } + return yyctx; +} + +#endif +#line 1511 "Sources/Private/markdown_parser.leg" + + + + diff --git a/markdown_parser.leg b/Sources/Private/markdown_parser.leg similarity index 77% rename from markdown_parser.leg rename to Sources/Private/markdown_parser.leg index 3fd1903a..99265d4b 100644 --- a/markdown_parser.leg +++ b/Sources/Private/markdown_parser.leg @@ -19,9 +19,14 @@ #include #include + #include "markdown_peg.h" #include "utility_functions.h" +#include "parsing_functions.h" + +#pragma clang diagnostic ignored "-Wunreachable-code" +#define YY_CTX_MEMBERS markdown_parser_state *state; /********************************************************************** @@ -39,11 +44,11 @@ # define YY_DEBUG 1 #endif -#define YY_INPUT(buf, result, max_size) \ +#define YY_INPUT(yy, buf, result, max_size) \ { \ - int yyc; \ - if (charbuf && *charbuf != '\0') { \ - yyc= *charbuf++; \ + int yyc = *(yy->state->charbuf); \ + if (yy->state->charbuf && *(yy->state->charbuf) != '\0') { \ + yy->state->charbuf ++;\ } else { \ yyc= EOF; \ } \ @@ -64,15 +69,15 @@ %} Doc = BOM? a:StartList ( Block { a = cons($$, a); } )* - { parse_result = reverse(a); } + { yy->state->parse_result = reverse(a); } DocWithMetaData = BOM? a:StartList b:StartList - ( &{ !extension(EXT_COMPATIBILITY) } + ( &{ !extension(yy->state, EXT_COMPATIBILITY) } &( MetaDataKey Sp ':' Sp (!Newline)) MetaData { a = cons($$, a); b = mk_element(FOOTER);})? ( Block { a = cons($$, a); } )* { if (b != NULL) a = cons(b, a); - parse_result = reverse(a); + yy->state->parse_result = reverse(a); } MetaData = a:StartList !([A-Za-z]+ "://") @@ -85,13 +90,13 @@ MetaDataOnly = BOM? a:StartList ( MetaData { a = cons($$, a); } )? # SkipBlock* .* - { parse_result = reverse(a); } + { yy->state->parse_result = reverse(a); } MetaDataOnly2 = BOM? a:StartList ( MetaData { a = cons($$, a); } )? # SkipBlock* .* - { parse_result = mk_list(LIST,a); } + { yy->state->parse_result = mk_list(LIST,a); } MetaDataKeyValue = a:MetaDataKey Sp ':' Sp b:MetaDataValue @@ -122,9 +127,10 @@ MetaDataValue = a:StartList Block = BlankLine* ( BlockQuote + | &{ extension(yy->state, EXT_BLOCK_COMMENT) } BlockComment | Verbatim - | &{ !extension(EXT_COMPATIBILITY) } DefinitionList - | &{ !extension(EXT_COMPATIBILITY) } Glossary + | &{ !extension(yy->state, EXT_COMPATIBILITY) } DefinitionList + | &{ !extension(yy->state, EXT_COMPATIBILITY) } Glossary | Note | Reference | HorizontalRule @@ -133,9 +139,10 @@ Block = BlankLine* | BulletList | HtmlBlock | MarkdownHtmlBlock - | StyleBlock - | &{ !extension(EXT_COMPATIBILITY) } Table - | &{ !extension(EXT_COMPATIBILITY) } ImageBlock + | FencedCodeBlock + | StyleBlock + | &{ extension(yy->state, EXT_TABLES) } Table + | &{ !extension(yy->state, EXT_COMPATIBILITY) } ImageBlock | !(Sp? HtmlBlockOpenDiv) Para | Plain ) @@ -143,9 +150,10 @@ HeadingSectionBlock = BlankLine* !Heading ( BlockQuote + | &{ extension(yy->state, EXT_BLOCK_COMMENT) } BlockComment | Verbatim - | &{ !extension(EXT_COMPATIBILITY) } DefinitionList - | &{ !extension(EXT_COMPATIBILITY) } Glossary + | &{ !extension(yy->state, EXT_COMPATIBILITY) } DefinitionList + | &{ !extension(yy->state, EXT_COMPATIBILITY) } Glossary | Note | Reference | HorizontalRule @@ -153,24 +161,33 @@ HeadingSectionBlock = | BulletList | HtmlBlock | MarkdownHtmlBlock + | FencedCodeBlock | StyleBlock - | &{ !extension(EXT_COMPATIBILITY) } Table - | &{ !extension(EXT_COMPATIBILITY) } ImageBlock + | &{ extension(yy->state, EXT_TABLES) } Table + | &{ !extension(yy->state, EXT_COMPATIBILITY) } ImageBlock | !(Sp? HtmlBlockOpenDiv) Para | Plain ) -Para = NonindentSpace a:Inlines BlankLine+ - { $$ = a; $$->key = PARA; } +Para = s:CapturingNonindentSpace { } + a:Inlines + BlankLine+ + { + if (s) + a->children = cons(s, a->children); + + $$ = a; + $$->key = PARA; + } Plain = a:Inlines { $$ = a; $$->key = PLAIN; } -AtxInline = !Newline !( &{ !extension(EXT_COMPATIBILITY) } Sp AutoLabel Sp? '#'* Sp Newline) !(Sp? '#'* Sp Newline) Inline +AtxInline = !Newline !( &{ extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) } Sp AutoLabel Sp? '#'* Sp Newline) !(Sp? '#'* Sp Newline) Inline AtxStart = < ( "######" | "#####" | "####" | "###" | "##" | "#" ) > - { $$ = mk_element(H1 + (strlen(yytext) - 1)); } + { $$ = mk_element(H1 + (int)(strlen(yytext) - 1)); } -AtxHeading = s:AtxStart Sp? a:StartList ( AtxInline { a = cons($$, a); } )+ ( Sp? b:AutoLabel { append_list(b,a);})? (Sp? '#'* Sp)? Newline +AtxHeading = s:AtxStart Sp? a:StartList ( AtxInline { a = cons($$, a); } (l:LineBreak { a = cons(l, a); })? )+ ( Sp? b:AutoLabel { append_list(b,a);})? (Sp? '#'* Sp)? Newline { $$ = mk_list(s->key,a); free(s); } @@ -181,11 +198,11 @@ SetextBottom1 = '='+ Newline SetextBottom2 = '-'+ Newline SetextHeading1 = &(RawLine SetextBottom1) - a:StartList ( !Endline !( &{ !extension(EXT_COMPATIBILITY) } Sp AutoLabel ) Inline { a = cons($$, a); } )+ ( Sp b:AutoLabel { append_list(b,a);} Sp? )? Sp? Newline + a:StartList ( !Endline !( &{ extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) } Sp AutoLabel ) Inline { a = cons($$, a); } )+ ( Sp b:AutoLabel { append_list(b,a);} Sp? )? Sp? Newline SetextBottom1 { $$ = mk_list(H1, a); } SetextHeading2 = &(RawLine SetextBottom2) -a:StartList ( !Endline !( &{ !extension(EXT_COMPATIBILITY) } Sp AutoLabel ) Inline { a = cons($$, a); } )+ ( Sp b:AutoLabel { append_list(b,a)} Sp? )? Sp? Newline +a:StartList ( !Endline !( &{ extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY) } Sp AutoLabel ) Inline { a = cons($$, a); } )+ ( Sp b:AutoLabel { append_list(b,a)} Sp? )? Sp? Newline SetextBottom2 { $$ = mk_list(H2, a); } Heading = SetextHeading | AtxHeading @@ -208,29 +225,56 @@ BlockQuoteRaw = a:StartList $$->key = RAW; } +BlockComment = a:BlockCommentRaw + { $$ = mk_element(COMMENTBLOCK); + $$->children = a; + } + +BlockCommentRaw = a:StartList + ('' BlockCommentLine { a = cons($$, a); } )* + '-->')+ + { $$ = mk_str_from_list(a, true); + $$->key = RAW; + } + +BlockCommentLine = ( < (!'-->' .)+ > ) + { $$ = mk_str(yytext); } + NonblankIndentedLine = !BlankLine IndentedLine -VerbatimChunk = a:StartList - ( BlankLine { a = cons(mk_str("\n"), a); } )* +FirstVerbatimChunk = a:StartList ( NonblankIndentedLine { a = cons($$, a); } )+ { $$ = mk_str_from_list(a, false); } -Verbatim = a:StartList ( VerbatimChunk { a = cons($$, a); } )+ BlankLine* +FollowingVerbatimChunk = a:StartList + ( MagicBlankLine { a = cons(mk_str("\n"), a); } )* + ( NonblankIndentedLine { a = cons($$, a); } )+ + { $$ = mk_str_from_list(a, false); } + + +Verbatim = a:StartList + FirstVerbatimChunk { a = cons($$, a); } + ( FollowingVerbatimChunk { a = cons($$, a); } )* + BlankLine* { $$ = mk_str_from_list(a, false); $$->key = VERBATIM; } HorizontalRule = NonindentSpace ( '*' Sp '*' Sp '*' (Sp '*')* - | '-' Sp '-' Sp '-' (Sp '-')* + | '-' Sp '-' Sp '-' Sp '-' (Sp '-')* | '_' Sp '_' Sp '_' (Sp '_')*) Sp Newline BlankLine+ { $$ = mk_element(HRULE); } -Bullet = !HorizontalRule NonindentSpace ('+' | '*' | '-') Spacechar+ +Bullet = !HorizontalRule < NonindentSpace ('+' | '*' | '-') Spacechar > &(Spacechar*) + {{ $$ = mk_str(yytext); }} BulletList = &Bullet (ListTight | ListLoose) { $$->key = BULLETLIST; } +BulletOrEnum = ( Bullet | Enumerator ) + ListTight = a:StartList ( ListItemTight { a = cons($$, a); } )+ BlankLine* !(Bullet | Enumerator) @@ -246,22 +290,27 @@ ListLoose = a:StartList } )+ { $$ = mk_list(LIST, a); } -ListItem = ( Bullet | Enumerator ) +ListItem = m:BulletOrEnum a:StartList ListBlock { a = cons($$, a); } ( ListContinuationBlock { a = cons($$, a); } )* - { element *raw; + { + element *raw; raw = mk_str_from_list(a, false); - raw->key = RAW; + + raw->key = RAW; $$ = mk_element(LISTITEM); $$->children = raw; + + $$->contents.str = string_from_element_list(m, true); } + ListItemTight = - ( Bullet | Enumerator ) + m:BulletOrEnum a:StartList ListBlock { a = cons($$, a); } - ( !BlankLine + ( !MagicBlankLine ListContinuationBlock { a = cons($$, a); } )* !ListContinuationBlock { element *raw; @@ -269,28 +318,34 @@ ListItemTight = raw->key = RAW; $$ = mk_element(LISTITEM); $$->children = raw; + $$->contents.str = string_from_element_list(m, true); } ListBlock = a:StartList - !BlankLine Line { a = cons($$, a); } + !MagicBlankLine Line { a = cons($$, a); } ( ListBlockLine { a = cons($$, a); } )* { $$ = mk_str_from_list(a, false); } ListContinuationBlock = a:StartList - ( < BlankLine* > - { if (strlen(yytext) == 0) + ( < MagicBlankLine* > + { if (strlen(yytext) == 0) { + if (extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES)) + a = cons(mk_str(yytext), a); + a = cons(mk_str("\001"), a); /* block separator */ + } else a = cons(mk_str(yytext), a); } ) ( Indent ListBlock { a = cons($$, a); } )+ { $$ = mk_str_from_list(a, false); } -Enumerator = NonindentSpace [0-9]+ '.' Spacechar+ +Enumerator = < NonindentSpace [0-9]+ '.' Spacechar > &(Spacechar*) + {{ $$ = mk_str(yytext); }} OrderedList = &Enumerator (ListTight | ListLoose) { $$->key = ORDEREDLIST; } -ListBlockLine = !BlankLine +ListBlockLine = !MagicBlankLine !( Indent? (Bullet | Enumerator) ) !HorizontalRule OptionallyIndentedLine @@ -515,13 +570,13 @@ HtmlBlockInTags = HtmlBlockAddress | HtmlBlockTr | HtmlBlockScript -HtmlBlock = !MarkdownHtmlTagOpen < ( HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing ) > +HtmlBlock = !MarkdownHtmlTagOpen < ( HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing ) > BlankLine+ - { if (extension(EXT_FILTER_HTML)) { + { if (extension(yy->state, EXT_FILTER_HTML)) { $$ = mk_list(LIST, NULL); } else { $$ = mk_str(yytext); - if ( extension(EXT_PROCESS_HTML)) $$->key = RAW; + if ( extension(yy->state, EXT_PROCESS_HTML)) $$->key = RAW; else $$->key = HTMLBLOCK; } } @@ -532,6 +587,38 @@ MarkdownHtmlBlock = &MarkdownHtmlTagOpen < ( HtmlBlockInTags | HtmlComment | Htm $$->key = RAW; } +FencedCodeBlock = indentation: FencedCodeBlockPreceedingIndentation + + @{ const char *openingDelimiterStart = current_input_position(yy->state, yy->__pos, yy->__limit); } + FencedCodeBlockMarker + @{ size_t openingDelimiterLength = offset_to_current_position(openingDelimiterStart, yy->state, yy->__pos, yy->__limit); } + + language:FencedCodeBlockLanguage Newline + + <( + !( Newline? + FencedCodeBlockIndentation + @{ const char *closingDelimiterStart = current_input_position(yy->state, yy->__pos, yy->__limit); } + FencedCodeBlockMarker + @{ size_t closingDelimiterLength = offset_to_current_position(closingDelimiterStart, yy->state, yy->__pos, yy->__limit); } + + &{ (openingDelimiterLength == closingDelimiterLength) && !strncmp(openingDelimiterStart, closingDelimiterStart, openingDelimiterLength) } + Sp (Newline | Eof) + ) + .)*> + + Newline? FencedCodeBlockIndentation FencedCodeBlockMarker Sp + BlankLine+ + { + $$ = mk_codeblock(yytext, language->contents.str, strlen(indentation->contents.str)); + } + +FencedCodeBlockPreceedingIndentation = { $$ = mk_str(yytext); } +FencedCodeBlockIndentation = Spacechar? Spacechar? Spacechar? +FencedCodeBlockMarker = (("```" "`"*) | ("~~~" "~"*)) + +FencedCodeBlockLanguage = < ([^\n])* > { $$ = mk_str(yytext); } + HtmlBlockSelfClosing = '<' Spnl HtmlBlockType Spnl HtmlAttribute* '/' Spnl '>' HtmlBlockType = "address" | "blockquote" | "center" | "dir" | "div" | "dl" | "fieldset" | "form" | "h1" | "h2" | "h3" | @@ -546,7 +633,7 @@ StyleClose = '<' Spnl '/' ("style" | "STYLE") Spnl '>' InStyleTags = StyleOpen (!StyleClose .)* StyleClose StyleBlock = < InStyleTags > BlankLine* - { if (extension(EXT_FILTER_STYLES)) { + { if (extension(yy->state, EXT_FILTER_STYLES)) { $$ = mk_list(LIST, NULL); } else { $$ = mk_str(yytext); @@ -558,29 +645,46 @@ Inlines = a:StartList ( !Endline Inline { a = cons($$, a); } | c:Endline &Inline { a = cons(c, a); } )+ Endline? { $$ = mk_list(LIST, a); } -Inline = &{ check_timeout() } +Inline = &{ check_timeout(yy->state) } Str - | &{ !extension(EXT_COMPATIBILITY) } MathSpan + | &{ extension(yy->state, EXT_MATH) } MathSpan | Endline | UlOrStarLine | Space | Strong | Emph - | &{ !extension(EXT_COMPATIBILITY) } CitationReference + | &{ extension(yy->state, EXT_DELETE) } Delete + | &{ !extension(yy->state, EXT_COMPATIBILITY) } CitationReference | Image | Link | NoteReference # | InlineNote # Not used in Markdown/MultiMarkdown + | &{ extension(yy->state, EXT_INLINE_COMMENT) } Comment | Code | MarkdownHtmlTagOpen | RawHtml | Entity - | EscapedChar + | &{ !extension(yy->state, EXT_KEEP_ESCAPES) }EscapedChar + | &{ extension(yy->state, EXT_KEEP_ESCAPES) }KeptEscapedChar | Smart | Symbol -Space = Spacechar+ - { $$ = mk_str(" "); +Space = < Spacechar+ > + { + if (extension(yy->state, EXT_KEEP_WHITESPACES)) + $$ = mk_str(yytext); + else + $$ = mk_str(" "); + + $$->key = SPACE; } + +OptionalSpace = < Spacechar* > + { + if (extension(yy->state, EXT_KEEP_WHITESPACES)) + $$ = mk_str(yytext); + else + $$ = mk_str(" "); + $$->key = SPACE; } Str = a:StartList < NormalChar+ > { a = cons(mk_str(yytext), a); } @@ -590,12 +694,15 @@ Str = a:StartList < NormalChar+ > { a = cons(mk_str(yytext), a); } StrChunk = < (NormalChar | '_'+ &Alphanumeric)+ > { $$ = mk_str(yytext); } | AposChunk -AposChunk = &{ extension(EXT_SMART) } '\'' &Alphanumeric +AposChunk = &{ extension(yy->state, EXT_SMART) } '\'' &Alphanumeric { $$ = mk_element(APOSTROPHE); } -EscapedChar = '\\' !Newline < [-\\`|*_{}[\]()#+.!><] > +EscapedChar = '\\' !Newline < [-\\`|*_{}[\]()#+.!><$] > { $$ = mk_str(yytext); } +KeptEscapedChar = < '\\' !Newline [-\\`|*_{}[\]()#+.!><$] > + { $$ = mk_str(yytext); } + Entity = ( HexEntity | DecEntity | CharEntity ) { $$ = mk_str(yytext); $$->key = HTML; } @@ -631,7 +738,9 @@ EmphStar = '*' !Whitespace | b:StrongStar { a = cons(b, a); } )+ '*' - { $$ = mk_list(EMPH, a); } + { $$ = mk_list(EMPH, a); + $$->contents.str = "*"; + } EmphUl = '_' !Whitespace a:StartList @@ -639,7 +748,9 @@ EmphUl = '_' !Whitespace | b:StrongUl { a = cons(b, a); } )+ '_' - { $$ = mk_list(EMPH, a); } + { $$ = mk_list(EMPH, a); + $$->contents.str = "_"; + } Strong = StrongStar | StrongUl @@ -647,14 +758,23 @@ StrongStar = "**" !Whitespace a:StartList ( !"**" b:Inline { a = cons(b, a); })+ "**" - { $$ = mk_list(STRONG, a); } + { $$ = mk_list(STRONG, a); + $$->contents.str = "**"; + } StrongUl = "__" !Whitespace a:StartList ( !"__" b:Inline { a = cons(b, a); })+ "__" - { $$ = mk_list(STRONG, a); } + { $$ = mk_list(STRONG, a); + $$->contents.str = "__"; + } +Delete = '~~' !Whitespace + a:StartList + ( !'~~' b:Inline { a = cons(b, a); })+ + '~~' + { $$ = mk_list(DELETE, a); } ImageBlock = Image Sp Newline BlankLine+ { if ($$->key == IMAGE) $$->key = IMAGEBLOCK; } @@ -672,14 +792,14 @@ Link = ExplicitLink | ReferenceLink | AutoLink ReferenceLink = ReferenceLinkDouble | ReferenceLinkSingle -ReferenceLinkDouble = a:Label < Spnl > !"[]" b:Label - { link match; - if (find_reference(&match, b->children)) { +ReferenceLinkDouble = a:Label s:OptionalSpace !"[]" b:Label + { mm_link match; + if (find_reference(yy->state, &match, b->children)) { $$ = mk_link(a->children, match.url, match.title, match.attr, match.identifier); free(a); free_element_list(b); - } else if ( !extension(EXT_COMPATIBILITY) && - find_label(&match, b->children)) { + } else if ( (extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY)) && + find_label(yy->state, &match, b->children)) { GString *text = g_string_new(""); print_raw_element_list(text, b->children); char *lab = label_from_string(text->str,0); @@ -694,18 +814,18 @@ ReferenceLinkDouble = a:Label < Spnl > !"[]" b:Label } else { element *result; result = mk_element(LIST); - result->children = cons(mk_str("["), cons(a, cons(mk_str("]"), cons(mk_str("["), cons(b, mk_str("]")))))); + result->children = cons(mk_str("["), cons(a, cons(mk_str("]"), cons(s, cons(mk_str("["), cons(b, mk_str("]"))))))); $$ = result; } } ReferenceLinkSingle = a:Label < (Spnl "[]")? > - { link match; - if (find_reference(&match, a->children)) { + { mm_link match; + if (find_reference(yy->state, &match, a->children)) { $$ = mk_link(a->children, match.url, match.title, match.attr, match.identifier); free(a); - } else if ( !extension(EXT_COMPATIBILITY) && - find_label(&match, a->children)) { + } else if ( (extension(yy->state, EXT_LABELS) || !extension(yy->state, EXT_COMPATIBILITY)) && + find_label(yy->state, &match, a->children)) { GString *text = g_string_new(""); print_raw_element_list(text, a->children); char *lab = label_from_string(text->str,0); @@ -724,13 +844,19 @@ ReferenceLinkSingle = a:Label < (Spnl "[]")? > } } -ExplicitLink = l:Label '(' Sp s:Source Spnl t:Title Sp ')' +ExplicitLink = a:StartList l:Label '(' Sp s:Source Spnl t:Title ( &{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } (Attributes { a = cons($$,a);})? )? Sp ')' { - $$ = mk_link(l->children, s->contents.str, t->contents.str, NULL, ""); + $$ = mk_link(l->children, s->contents.str, t->contents.str, a ? a->children : NULL, ""); free_element(s); free_element(t); free(l); } + +Comment = '' b:Inline { a = cons(b, a); })+ + '-->' + { $$ = mk_list(COMMENT, a); } Source = ( '<' < SourceContents > '>' | < SourceContents > ) { $$ = mk_str(yytext); } @@ -740,9 +866,10 @@ SourceContents = ( ( !'(' !')' !'>' Nonspacechar )+ | '(' SourceContents ')')* Title = ( TitleSingle | TitleDouble | < "" > ) { $$ = mk_str(yytext); } -TitleSingle = '\'' < ( !( '\'' Sp ( ')' | Newline ) ) . )* > '\'' +TitleSingle = '\'' < ( !( '\'' Sp ( ')' | Newline | (&{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } AlphanumericAscii+ '=' )) ) . )* > '\'' + +TitleDouble = '"' < ( !( '"' Sp ( ')' | Newline | (&{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } AlphanumericAscii+ '=' )) ) . )* > '"' -TitleDouble = '"' < ( !( '"' Sp ( ')' | Newline ) ) . )* > '"' AutoLink = AutoLinkUrl | AutoLinkEmail @@ -758,9 +885,9 @@ AutoLinkEmail = '<' ( "mailto:" )? < [-A-Za-z0-9+_./!%~$]+ '@' ( !Newline !'>' . Reference = a:StartList NonindentSpace !"[]" l:Label ':' Spnl s:RefSrc t:RefTitle - ( &{ !extension(EXT_COMPATIBILITY) } + ( &{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } (Attributes { a = cons($$,a);})? )? - BlankLine+ + MagicBlankLine+ { char *label; GString *text = g_string_new(""); @@ -805,11 +932,11 @@ AttrValue = (QuotedValue | UnQuotedValue) $$->key = ATTRVALUE; } -QuotedValue = '"' < (!'"' .)* > '"' +QuotedValue = '"' < ("\\\"" | (!'"' .))* > '"' -UnQuotedValue = < (AlphanumericAscii | '.')+ > +UnQuotedValue = < (AlphanumericAscii | '.' | '%')+ > -Label = '[' !'[' ( !'^' !'#' &{ extension(EXT_NOTES) } | &. &{ !extension(EXT_NOTES) } ) +Label = '[' !'[' ( !'^' !'#' &{ extension(yy->state, EXT_NOTES) } | &. &{ !extension(yy->state, EXT_NOTES) } ) a:StartList ( !']' Inline { a = cons($$, a); } )* ']' @@ -826,17 +953,17 @@ RefTitle = ( RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle ) EmptyTitle = < "" > RefTitleSingle = Spnl '\'' < ( !( '\'' Sp Newline | Newline | - &{ !extension(EXT_COMPATIBILITY) } '\'' Sp AlphanumericAscii+ '=' ) . )* > '\'' + &{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } '\'' Sp AlphanumericAscii+ '=' ) . )* > '\'' RefTitleDouble = Spnl '"' < ( !('"' Sp Newline | Newline | - &{ !extension(EXT_COMPATIBILITY) } '"' Sp AlphanumericAscii+ '=' ) . )* > '"' + &{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } '"' Sp AlphanumericAscii+ '=' ) . )* > '"' RefTitleParens = Spnl '(' < ( !(')' Sp Newline | Newline | - &{ !extension(EXT_COMPATIBILITY) } ')' Sp AlphanumericAscii+ '=' ) . )* > ')' + &{ !extension(yy->state, EXT_COMPATIBILITY) || extension(yy->state, EXT_LINK_ATTRIBUTES) } ')' Sp AlphanumericAscii+ '=' ) . )* > ')' References = a:StartList ( b:Reference { a = cons(b, a); } | SkipBlock )* - { references = reverse(a); } + { yy->state->references = reverse(a); } Ticks1 = "`" !'`' Ticks2 = "``" !'`' @@ -853,7 +980,7 @@ Code = ( Ticks1 Sp < ( ( !'`' Nonspacechar )+ | !Ticks1 '`'+ | !( Sp Ticks1 ) ( { $$ = mk_str(yytext); $$->key = CODE; } RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > - { if (extension(EXT_FILTER_HTML)) { + { if (extension(yy->state, EXT_FILTER_HTML)) { $$ = mk_list(LIST, NULL); } else { $$ = mk_str(yytext); @@ -863,6 +990,10 @@ RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > BlankLine = Sp Newline +# PEG doesn't support \uXXXX characters, so we encode \ueeee as octal byte sequence + +MagicBlankLine = ( &{ extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES) } '\356' '\273' '\256')? Sp Newline + Quoted = '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\'' HtmlAttribute = (AlphanumericAscii | '-')+ Spnl ('=' Spnl (Quoted | (!'>' Nonspacechar)+))? Spnl HtmlComment = "" .)* "-->" @@ -889,6 +1020,16 @@ Indent = "\t" | " " IndentedLine = Indent Line OptionallyIndentedLine = Indent? Line +CapturingNonindentSpace = + { + if (extension(yy->state, EXT_KEEP_WHITESPACES)) { + $$ = mk_str(yytext); + $$->key = SPACE; + } + else + $$ = NULL; + } + # StartList starts a list data structure that can be added to with cons: StartList = &. { $$ = NULL; } @@ -898,17 +1039,20 @@ Line = RawLine RawLine = ( < (!'\r' !'\n' .)* Newline > | < .+ > Eof ) SkipBlock = HtmlBlock - | ( !'#' !SetextBottom1 !SetextBottom2 !BlankLine RawLine )+ BlankLine* - | BlankLine+ + | ( !'#' !SetextBottom1 !SetextBottom2 !MagicBlankLine RawLine )+ MagicBlankLine* + | MagicBlankLine+ | RawLine # Syntax extensions -ExtendedSpecialChar = &{ extension(EXT_SMART) } ('.' | '-' | '\'' | '"') - | &{ extension(EXT_NOTES) } ( '^' ) +ExtendedSpecialChar = &{ extension(yy->state, EXT_SMART) } ('.' | '-' | '\'' | '"') + | &{ extension(yy->state, EXT_NOTES) } ( '^' ) + | &{ extension(yy->state, EXT_MATH) } ( '$' ) + | &{ extension(yy->state, EXT_DELETE) } ( '~' ) + | &{ extension(yy->state, EXT_BLOCK_COMMENT) || extension(yy->state, EXT_INLINE_COMMENT) } ( '' ) -Smart = &{ extension(EXT_SMART) } +Smart = &{ extension(yy->state, EXT_SMART) } ( Ellipsis | Dash | SingleQuoted | DoubleQuoted | Apostrophe ) Apostrophe = '\'' @@ -950,10 +1094,10 @@ DoubleQuoted = DoubleQuoteStart DoubleQuoteEnd { $$ = mk_list(DOUBLEQUOTED, a); } -NoteReference = &{ extension(EXT_NOTES) } +NoteReference = &{ extension(yy->state, EXT_NOTES) } ref:RawNoteReference { element *match; - if (find_note(&match, ref->contents.str)) { + if (find_note(yy->state, &match, ref->contents.str)) { $$ = mk_element(NOTE); assert(match->children != NULL); $$->children = match->children; @@ -970,7 +1114,7 @@ NoteReference = &{ extension(EXT_NOTES) } RawNoteReference = ( "[^" | "[#" ) < ( !Newline !']' . )+ > ']' { $$ = mk_str(yytext); } -Glossary = &{ extension(EXT_NOTES) } +Glossary = &{ extension(yy->state, EXT_NOTES) } a:StartList NonindentSpace ref:RawNoteReference ':' Sp "glossary:" Sp (GlossaryTerm { a = cons($$, a); }) @@ -994,7 +1138,7 @@ GlossarySortKey = '(' < (!')' !Newline .)* > ')' { $$ = mk_str(yytext); $$->key = GLOSSARYSORTKEY; } -Note = &{ extension(EXT_NOTES) } +Note = &{ extension(yy->state, EXT_NOTES) } NonindentSpace ref:RawNoteReference ':' Sp a:StartList ( RawNoteBlock { a = cons($$, a); } ) @@ -1007,7 +1151,7 @@ Note = &{ extension(EXT_NOTES) } $$->contents.str = strdup(ref->contents.str); } -InlineNote = &{ extension(EXT_NOTES) } +InlineNote = &{ extension(yy->state, EXT_NOTES) } "^[" a:StartList ( !']' Inline { a = cons($$, a); } )+ @@ -1017,11 +1161,11 @@ InlineNote = &{ extension(EXT_NOTES) } Notes = a:StartList ( (b:Glossary | b:Note) { a = cons(b, a); } | SkipBlock )* - { notes = reverse(a); } + { yy->state->notes = reverse(a); } RawNoteBlock = a:StartList - ( !BlankLine OptionallyIndentedLine { a = cons($$, a); } )+ - ( < BlankLine* > { a = cons(mk_str(yytext), a); } ) + ( !MagicBlankLine OptionallyIndentedLine { a = cons($$, a); } )+ + ( < MagicBlankLine* > { a = cons(mk_str(yytext), a); } ) { $$ = mk_str_from_list(a, true); $$->key = RAW; } @@ -1033,7 +1177,7 @@ CitationReference = CitationReferenceDouble | CitationReferenceSingle CitationReferenceDouble = !"[]" b:Label < Spnl > !"[]" ref:RawCitationReference { element *match; - if (find_note(&match, ref->contents.str)) { + if (find_note(yy->state, &match, ref->contents.str)) { /* This citation is specified within the document */ $$ = mk_element(CITATION); assert(match->children != NULL); @@ -1067,7 +1211,7 @@ CitationReferenceDouble = !"[]" b:Label < Spnl > !"[]" ref:RawCitationReference CitationReferenceSingle = (( "[]" Spnl ref:RawCitationReference ) | ( ref:RawCitationReference < (Spnl "[]")? > )) { element *match; - if (find_note(&match, ref->contents.str)) { + if (find_note(yy->state, &match, ref->contents.str)) { $$ = mk_element(CITATION); assert(match->children != NULL); $$->children = match->children; @@ -1087,7 +1231,7 @@ RawCitationReference = "[#" < ( !Newline !']' . )+ > ']' { $$ = mk_str(yytext); } -AutoLabels = ( &{ !extension(EXT_COMPATIBILITY) && !extension(EXT_NO_LABELS)} +AutoLabels = ( &{ extension(yy->state, EXT_LABELS) || (!extension(yy->state, EXT_COMPATIBILITY) && !extension(yy->state, EXT_NO_LABELS))} a:StartList ( b:Heading { GString *label = g_string_new(""); @@ -1131,7 +1275,7 @@ AutoLabels = ( &{ !extension(EXT_COMPATIBILITY) && !extension(EXT_NO_LABELS)} g_string_free(label,true); free_element_list(c);} | SkipBlock )* - { labels = a; }) + { yy->state->labels = a; }) DefinitionList = a:StartList &(TermLine+ Newline? NonindentSpace ':') ( @@ -1166,14 +1310,16 @@ Definition = (a:StartList b:StartList raw->key = RAW; $$ = mk_list(DEFINITION,raw); } + +ULNewline = (&{ extension(yy->state, EXT_KEEP_MAGIC_BLANK_LINES) } BlankLine)? Table = a:StartList b:StartList (TableCaption { b = cons($$, b);})? TableBody { $$->key = TABLEHEAD; a = cons($$, a); } (SeparatorLine { append_list($$,a); } ) (TableBody { a = cons($$, a);} ) - (BlankLine !TableCaption TableBody { a = cons($$, a); } - &(TableCaption | BlankLine) )* - ( (TableCaption { b = cons($$, b);} &BlankLine) | &BlankLine) + (MagicBlankLine ULNewline !TableCaption TableBody { a = cons($$, a); } + &(TableCaption | MagicBlankLine) )* + ( (TableCaption { b = cons($$, b);} &(MagicBlankLine ULNewline)) | &(MagicBlankLine ULNewline)) # Requires blank line to end table "block" { if (b != NULL) { append_list(b,a); }; @@ -1186,7 +1332,7 @@ TableBody = a:StartList (TableRow {a = cons($$, a);})+ TableRow = a:StartList (!SeparatorLine &(TableLine) CellDivider? - (TableCell { a = cons($$, a); })+ ) Sp Newline + (TableCell { a = cons($$, a); })+ ) Sp Newline ULNewline { $$ = mk_list(TABLEROW, a); } TableLine = (!Newline !CellDivider .)* CellDivider @@ -1217,19 +1363,25 @@ EmptyCell = Sp CellDivider SeparatorLine = a:StartList &(TableLine) CellDivider? - ( AlignmentCell { a = cons($$, a);})+ Sp Newline + ( AlignmentCell { a = cons($$, a);})+ Sp Newline ULNewline { $$ = mk_str_from_list(a,false); $$->key = TABLESEPARATOR; } -AlignmentCell = Sp (!CellDivider ( LeftAlignWrap | CenterAlignWrap | RightAlignWrap | LeftAlign | CenterAlign | RightAlign)) +AlignmentCell = Sp (!CellDivider ( LeftAlignWrap | CenterAlignWrap | RightAlignWrap | NaturalAlignWrap | LeftAlign | CenterAlign | RightAlign | NaturalAlign)) Sp ( CellDivider )? -LeftAlignWrap = ':'? '-'+ '+' &(!'-' !':') +NaturalAlignWrap = '-'+ '+' &(!'-' !':') + { $$ = mk_str("N");} + +NaturalAlign = '-'+ &(!'-' !':') + { $$ = mk_str("n");} + +LeftAlignWrap = ':' '-'+ '+' &(!'-' !':') { $$ = mk_str("L");} -LeftAlign = ':'? '-'+ &(!'-' !':') +LeftAlign = ':' '-'+ &(!'-' !':') { $$ = mk_str("l");} CenterAlignWrap = ':' '-'* '+' ':' &(!'-' !':') @@ -1247,7 +1399,7 @@ RightAlign = '-'+ ':' &(!'-' !':') CellDivider = '|' TableCaption = b:StartList a:Label -( c:Label { b = c; b->key = TABLELABEL;})? Sp Newline +( c:Label { b = c; b->key = TABLELABEL;})? Sp Newline ULNewline { $$ = a; $$->key = TABLECAPTION; @@ -1265,9 +1417,22 @@ AutoLabel = '[' < (!Newline !'^' !'#' . )( !Newline !']' . )+ > ']' &(!(Sp? ('(' free(label); } -MathSpan = '\\' < ( - ('\\[' (!'\\\\]' .)* '\\\\]') | - ('\\(' (!'\\\\)' .)* '\\\\)') ) > +MathSpan = ULMathSpan | MMDMathSpan + +ULMathSpan = ( + ('$$' < !Spacechar ('\\$' | (!(Spacechar? '$') .))* > '$$') | + ('$' < !Spacechar ('\\$' | (!(Spacechar? '$') !Newline .))* > '$') ) +{ + /* Basically, these delimiters indicate math in LaTeX syntax, and the + delimiters are compatible with MathJax and LaTeX + ASCIIMathML is *not* supported */ + $$ = mk_str(yytext); + $$->key = MATHSPAN; +} + +MMDMathSpan = '\\' ( + ('\\[' < (!'\\\\]' .)* > '\\\\]') | + ('\\(' < (!'\\\\)' .)* > '\\\\)') ) { /* Basically, these delimiters indicate math in LaTeX syntax, and the delimiters are compatible with MathJax and LaTeX @@ -1278,11 +1443,11 @@ MathSpan = '\\' < ( DocForOPML = BOM? a:StartList - ( &{ !extension(EXT_COMPATIBILITY) } + ( &{ !extension(yy->state, EXT_COMPATIBILITY) } &( MetaDataKey Sp ':' Sp (!Newline)) MetaData { a = cons($$, a); })? ( OPMLBlock { a = cons($$, a); } )* - { parse_result = reverse(a); + { yy->state->parse_result = reverse(a); } OPMLBlock = BlankLine* @@ -1331,13 +1496,12 @@ MarkdownHtmlAttribute = ("markdown" | "MARKDOWN") Spnl '=' Spnl ('"' Spnl)? "1" (Spnl '"')? Spnl MarkdownHtmlTagOpen = a:StartList '<' {a = cons(mk_str("<"),a);} - Spnl {a = cons(mk_str(yytext),a);} Spnl + Spnl {a = cons(mk_str(yytext),a);} + {a = cons(mk_str(yytext),a);} (!MarkdownHtmlAttribute - {a = cons(mk_str(" "),a); - a = cons(mk_str(yytext),a);})* - MarkdownHtmlAttribute - ( {a = cons(mk_str(" "),a); - a = cons(mk_str(yytext),a);})* + {a = cons(mk_str(yytext),a);})* + {a = cons(mk_str(yytext),a);} + ( {a = cons(mk_str(yytext),a);})* '>' { a = cons(mk_str(">"),a);} { $$ = mk_str_from_list(a,false); diff --git a/odf.c b/Sources/Private/odf.c similarity index 98% rename from odf.c rename to Sources/Private/odf.c index b63fc43b..05f8e750 100644 --- a/odf.c +++ b/Sources/Private/odf.c @@ -148,6 +148,9 @@ void print_odf_header(GString *out){ " \n" \ " \n" \ + " \n" \ + " \n" \ + " \n" \ "\n" \ " \n" \ "\n" \ diff --git a/odf.h b/Sources/Private/odf.h similarity index 89% rename from odf.h rename to Sources/Private/odf.h index d5bdc886..e0af81c0 100644 --- a/odf.h +++ b/Sources/Private/odf.h @@ -3,7 +3,7 @@ #include #include -#include +#include "glib.h" void print_odf_header(GString *out); void print_odf_footer(GString *out); diff --git a/Sources/Private/parsing_functions.c b/Sources/Private/parsing_functions.c new file mode 100644 index 00000000..72f63d25 --- /dev/null +++ b/Sources/Private/parsing_functions.c @@ -0,0 +1,232 @@ +/* parsing_functions.c - Functions for parsing markdown and + * freeing element lists. */ + +/* These yy_* functions come from markdown_parser.c which is + * generated from markdown_parser.leg + * */ + +#include "utility_functions.h" +#include "parsing_functions.h" +#include "markdown_peg.h" + +#define YY_CTX_MEMBERS markdown_parser_state *state; + +#include "markdown_parser.h" + +static void free_element_contents(element elt); + +/* free_element_list - free list of elements recursively */ +void free_element_list(element * elt) { + element * next = NULL; + while (elt != NULL) { + next = elt->next; + free_element_contents(*elt); + if (elt->children != NULL) { + free_element_list(elt->children); + elt->children = NULL; + } + free(elt); + elt = next; + } +} + +/* free_element_contents - free element contents depending on type */ +static void free_element_contents(element elt) { + switch (elt.key) { + case STR: + case SPACE: + case RAW: + case HTMLBLOCK: + case HTML: + case VERBATIM: + case CODE: + case NOTE: + case AUTOLABEL: + case CITATION: + case TERM: + case METAKEY: + case METAVALUE: + case TABLESEPARATOR: + case ATTRKEY: + case GLOSSARY: + case GLOSSARYTERM: + case NOTELABEL: + case CELLSPAN: + case EMDASH: + case ENDASH: + case GLOSSARYSORTKEY: + case MATHSPAN: + case LISTITEM: + if (elt.contents.str) + free(elt.contents.str); + + elt.contents.str = NULL; + break; + case CODEBLOCK: + if (elt.contents.codeblock) { + if (elt.contents.codeblock->language) { + free(elt.contents.codeblock->language); + elt.contents.codeblock->language = NULL; + } + if (elt.contents.codeblock->code) { + free(elt.contents.codeblock->code); + elt.contents.codeblock->code = NULL; + } + elt.contents.codeblock = NULL; + } + break; + + case LINK: + case IMAGE: + case REFERENCE: + free(elt.contents.link->url); + elt.contents.link->url = NULL; + free(elt.contents.link->title); + elt.contents.link->title = NULL; + free_element_list(elt.contents.link->label); + free(elt.contents.link->identifier); + elt.contents.link->identifier = NULL; +/* free_element_list(elt.contents.link->attr);*/ + free(elt.contents.link); + elt.contents.link = NULL; + break; + default: + ; + } +} + +/* free_element - free element and contents */ +void free_element(element *elt) { + free_element_contents(*elt); + free(elt); +} + +markdown_parser_state *create_markdown_parser_state(char *string, int extensions, element *references, element *notes, element *labels) +{ + markdown_parser_state *state = malloc(sizeof(markdown_parser_state)); + + state->charbuf = string; + state->syntax_extensions = extensions; + state->references = references; + state->notes = notes; + state->labels = labels; + + state->start_time = 0; + state->parse_aborted = 0; + state->parse_result = NULL; + + return state; +} + +yycontext* create_parsing_context(char *string, int extensions, element *references, element *notes, element *labels) { + yycontext *context = malloc(sizeof(yycontext)); + memset(context, 0, sizeof(yycontext)); + + context->state = create_markdown_parser_state(string, extensions, references, notes, labels); + + return context; +} + +void free_parsing_context(yycontext *context) +{ + free(context->__buf); + free(context->__text); + free(context->__thunks); + + free(context->state); + free(context); +} + +element * parse_references(char *string, int extensions) +{ + yycontext *context = create_parsing_context(string, extensions, NULL, NULL, NULL); + + yyparsefrom(context, yy_References); /* first pass, just to collect references */ + element *references = context->state->references; + + free_parsing_context(context); + + return references; +} + +element * parse_notes(char *string, int extensions, element *reference_list) { + + yycontext *context = create_parsing_context(string, extensions, reference_list, NULL, NULL); + element *notes = NULL; + + if (extension(context->state, EXT_NOTES)) { + yyparsefrom(context, yy_Notes); /* second pass for notes */ + notes = context->state->notes; + } + + free_parsing_context(context); + + return notes; +} + +element * parse_labels(char *string, int extensions, element *reference_list, element *note_list) { + + yycontext *context = create_parsing_context(string, extensions, reference_list, note_list, NULL); + + yyparsefrom(context, yy_AutoLabels); /* third pass, to collect labels */ + element *labels = context->state->labels; + + free_parsing_context(context); + + return labels; +} + +element * parse_markdown(char *string, int extensions, element *reference_list, element *note_list, element *label_list) { + + yycontext *context = create_parsing_context(string, extensions, reference_list, note_list, label_list); + + yyparsefrom(context, yy_Doc); + element *parse_result = context->state->parse_result; + + free_parsing_context(context); + + return parse_result; +} + +element * parse_markdown_with_metadata(char *string, int extensions, element *reference_list, element *note_list, element *label_list) { + + yycontext *context = create_parsing_context(string, extensions, reference_list, note_list, label_list); + context->state->start_time = clock(); + + yyparsefrom(context, yy_DocWithMetaData); + + element *parse_result = context->state->parse_result; + int is_aborted = context->state->parse_aborted; + + free_parsing_context(context); + + if (is_aborted) { + free_element_list(parse_result); + return NULL; + } + + return parse_result; + +} + +element * parse_metadata_only(char *string, int extensions) { + + yycontext *context = create_parsing_context(string, extensions, NULL, NULL, NULL); + + yyparsefrom(context, yy_MetaDataOnly); + element *parse_result = context->state->parse_result; + free_parsing_context(context); + + return parse_result; +} + +element * parse_markdown_for_opml(char *string, int extensions) { + + yycontext *context = create_parsing_context(string, extensions, NULL, NULL, NULL); + yyparsefrom(context, yy_DocForOPML); + element *parse_result = context->state->parse_result; + + free_parsing_context(context); + + return parse_result; +} diff --git a/parsing_functions.h b/Sources/Private/parsing_functions.h similarity index 100% rename from parsing_functions.h rename to Sources/Private/parsing_functions.h diff --git a/utility_functions.c b/Sources/Private/utility_functions.c similarity index 88% rename from utility_functions.c rename to Sources/Private/utility_functions.c index 40e0caef..195ebeed 100644 --- a/utility_functions.c +++ b/Sources/Private/utility_functions.c @@ -7,6 +7,15 @@ #include #include +const char *current_input_position(markdown_parser_state *state, int bufPos, int bufLimit) +{ + return state->charbuf - bufLimit + bufPos; +} + +const size_t offset_to_current_position(const char *offset, markdown_parser_state *state, int bufPos, int bufLimit) +{ + return current_input_position(state, bufPos, bufLimit) - offset; +} /********************************************************************** @@ -53,7 +62,7 @@ GString *concat_string_list(element *list) { element *next; result = g_string_new(""); while (list != NULL) { - assert(list->key == STR); + assert(list->key == STR || list->key == SPACE); assert(list->contents.str != NULL); g_string_append(result, list->contents.str); next = list->next; @@ -63,23 +72,6 @@ GString *concat_string_list(element *list) { return result; } -/********************************************************************** - - Global variables used in parsing - - ***********************************************************************/ - - -char *charbuf = ""; /* Buffer of characters to be parsed. */ -element *references = NULL; /* List of link references found. */ -element *notes = NULL; /* List of footnotes found. */ -element *parse_result; /* Results of parse. */ -int syntax_extensions; /* Syntax extensions selected. */ - -element *labels = NULL; /* List of labels found in document. */ -clock_t start_time = 0; /* Used for ensuring we're not stuck in a loop */ -bool parse_aborted = 0; /* flag indicating we ran out of time */ - /********************************************************************** Auxiliary functions for parsing actions. @@ -134,7 +126,7 @@ element * mk_list(int key, element *lst) { element * mk_link(element *label, char *url, char *title, element *attr, char *id) { element *result; result = mk_element(LINK); - result->contents.link = malloc(sizeof(link)); + result->contents.link = malloc(sizeof(mm_link)); result->contents.link->label = label; result->contents.link->url = strdup(url); result->contents.link->title = strdup(title); @@ -143,9 +135,19 @@ element * mk_link(element *label, char *url, char *title, element *attr, char *i return result; } +/* mk_codeblock - constructor for CODEBLOCK element */ +element *mk_codeblock(char *code, char *language, size_t preceedingIndentation) { + element *result = mk_element(CODEBLOCK); + result->contents.codeblock = malloc(sizeof(codeblock)); + result->contents.codeblock->code = strdup(code); + result->contents.codeblock->language = strdup(language); + result->contents.codeblock->preceedingIndentation = preceedingIndentation; + return result; +} + /* extension = returns true if extension is selected */ -bool extension(int ext) { - return (syntax_extensions & ext); +bool extension(markdown_parser_state *state, int ext) { + return (state->syntax_extensions & ext); } /* match_inlines - returns true if inline lists match (case-insensitive...) */ @@ -170,6 +172,8 @@ bool match_inlines(element *l1, element *l2) { return false; case EMPH: case STRONG: + case DELETE: + case COMMENT: case LIST: case SINGLEQUOTED: case DOUBLEQUOTED: @@ -193,9 +197,9 @@ bool match_inlines(element *l1, element *l2) { /* find_reference - return true if link found in references matching label. * 'link' is modified with the matching url and title. */ -bool find_reference(link *result, element *label) { - element *cur = references; /* pointer to walk up list of references */ - link *curitem; +bool find_reference(markdown_parser_state *state, mm_link *result, element *label) { + element *cur = state->references; /* pointer to walk up list of references */ + mm_link *curitem; while (cur != NULL) { curitem = cur->contents.link; if (match_inlines(label, curitem->label)) { @@ -211,8 +215,8 @@ bool find_reference(link *result, element *label) { /* find_note - return true if note found in notes matching label. if found, 'result' is set to point to matched note. */ -bool find_note(element **result, char *label) { - element *cur = notes; /* pointer to walk up list of notes */ +bool find_note(markdown_parser_state *state, element **result, char *label) { + element *cur = state->notes; /* pointer to walk up list of notes */ while (cur != NULL) { if (strcmp(label, cur->contents.str) == 0) { *result = cur; @@ -248,6 +252,18 @@ void print_raw_element_list(GString *out, element *list) { } } +/* string_from_element_list */ +/* Creates a flat string from an element list */ +char *string_from_element_list(element *list, bool freeList) { + GString *raw = g_string_new(""); + print_raw_element(raw, list); + + if (freeList) + free(list); + + return g_string_free(raw, false); +} + /* label_from_element_list */ /* Returns a null-terminated string, which must be freed after use. */ @@ -298,9 +314,9 @@ char *label_from_string(char *str, bool obfuscate) { /* find_label - return true if header, table, etc is found matching label. * 'link' is modified with the matching url and title. */ -bool find_label(link *result, element *label) { +bool find_label(markdown_parser_state *state, mm_link *result, element *label) { char *lab; - element *cur = labels; /* pointer to walk up list of references */ + element *cur = state->labels; /* pointer to walk up list of references */ GString *text = g_string_new(""); print_raw_element_list(text, label); lab = label_from_string(text->str,0); @@ -512,28 +528,31 @@ void trim_trailing_whitespace(char *str) { } /* Don't let us get caught in "infinite" loop */ -bool check_timeout() { +bool check_timeout(markdown_parser_state *state) { /* Once we abort, keep aborting */ - if (parse_aborted) + if (state->parse_aborted) return 0; /* We're not timing this run */ - if (start_time == 0) + if (state->start_time == 0) return 1; clock_t end = clock(); - double elapsed = ((double) (end - start_time)) / CLOCKS_PER_SEC; + double elapsed = ((double) (end - state->start_time)) / CLOCKS_PER_SEC; /* fprintf(stderr,"%2.2f elapsed; (%4.2f CLOCKS_PER_SEC)\n",elapsed,CLOCKS_PER_SEC); */ /* fprintf(stderr,"%2.2f elapsed\n",elapsed); */ - /* If > 3 clock seconds, then abort */ - float max = 3; + /* If > 30 clock seconds, then abort */ + float max = 30; if (elapsed > max) { - parse_aborted = 1; + state->parse_aborted = 1; return 0; } return 1; } +void debug(void) { + __builtin_trap(); +} diff --git a/utility_functions.h b/Sources/Private/utility_functions.h similarity index 61% rename from utility_functions.h rename to Sources/Private/utility_functions.h index a1989510..c84a1797 100644 --- a/utility_functions.h +++ b/Sources/Private/utility_functions.h @@ -2,8 +2,7 @@ #define UTILITY_FUNCTIONS_H #include -#include - +#include "glib.h" #include "markdown_peg.h" #include @@ -11,6 +10,7 @@ /* utility_functions.h - List manipulation functions, element * constructors, and macro definitions for leg markdown parser. */ +#define MAX(__a, __b) (((__a) > (__b)) ? (__a) : (__b)) /* cons - cons an element onto a list, returning pointer to new head */ element * cons(element *new, element *list); @@ -26,16 +26,17 @@ GString *concat_string_list(element *list); ***********************************************************************/ -extern char *charbuf; /* Buffer of characters to be parsed. */ -extern element *references; /* List of link references found. */ -extern element *notes; /* List of footnotes found. */ -extern element *parse_result; /* Results of parse. */ -extern int syntax_extensions; /* Syntax extensions selected. */ - - -extern element *labels; /* List of labels found in document. */ -extern clock_t start_time; /* Used for ensuring we're not stuck in a loop */ -extern bool parse_aborted; /* flag indicating we ran out of time */ +typedef struct _markdown_parser_state{ + char *charbuf; /* Buffer of characters to be parsed. */ + element *references; /* List of link references found. */ + element *notes; /* List of footnotes found. */ + element *parse_result; /* Results of parse. */ + int syntax_extensions; /* Syntax extensions selected. */ + + element *labels; /* List of labels found in document. */ + clock_t start_time; /* Used for ensuring we're not stuck in a loop */ + bool parse_aborted; /* flag indicating we ran out of time */ +}markdown_parser_state; /********************************************************************** @@ -45,6 +46,12 @@ extern bool parse_aborted; /* flag indicating we ran out of time */ ***********************************************************************/ +/* Provides a persistent pointer to the input string at the current position */ +const char *current_input_position(markdown_parser_state *state, int bufPos, int bufLimit); + +/* Determines the offset from the current position to a previous position in the input string */ +const size_t offset_to_current_position(const char *offset, markdown_parser_state *state, int bufPos, int bufLimit); + /* mk_element - generic constructor for element */ element * mk_element(int key); @@ -62,32 +69,40 @@ element * mk_list(int key, element *lst); /* mk_link - constructor for LINK element */ element * mk_link(element *label, char *url, char *title, element *attr, char *id); + +/* mk_codeblock - constructor for CODEBLOCK element */ +element *mk_codeblock(char *code, char *language, size_t preceedingIndentation); + /* extension = returns true if extension is selected */ -bool extension(int ext); +bool extension(markdown_parser_state *state, int ext); /* match_inlines - returns true if inline lists match (case-insensitive...) */ bool match_inlines(element *l1, element *l2); /* find_reference - return true if link found in references matching label. * 'link' is modified with the matching url and title. */ -bool find_reference(link *result, element *label); +bool find_reference(markdown_parser_state *state, mm_link *result, element *label); /* find_note - return true if note found in notes matching label. if found, 'result' is set to point to matched note. */ -bool find_note(element **result, char *label); +bool find_note(markdown_parser_state *state, element **result, char *label); +char *string_from_element_list(element *list, bool freeList); char *label_from_string(char *str, bool obfuscate); void localize_typography(GString *out, int character, int language, int output); -void print_raw_element_list(GString *out, element *list); +void print_raw_element_list(GString *out, element *list); void append_list(element *new, element *list); -bool find_label(link *result, element *label); -bool check_timeout(); +bool find_label(markdown_parser_state *state, mm_link *result, element *label); +bool check_timeout(markdown_parser_state *state); void trim_trailing_whitespace(char *str); char *label_from_element_list(element *list, bool obfuscate); void print_raw_element_list(GString *out, element *list); void print_raw_element(GString *out, element *elt); +/* Can be used in peg/leg grammar to force parsing to halt on a breakpoint */ +void debug(void); + #endif diff --git a/GLibFacade.c b/Sources/Public/GLibFacade.c similarity index 99% rename from GLibFacade.c rename to Sources/Public/GLibFacade.c index aa1d5803..571a6b3d 100644 --- a/GLibFacade.c +++ b/Sources/Public/GLibFacade.c @@ -59,7 +59,7 @@ GString* g_string_new(char *startingString) { GString* newString = malloc(sizeof(GString)); - if (startingString == NULL) startingString = ""; + if (startingString == NULL) startingString = "\0"; size_t startingBufferSize = kStringBufferStartingSize; size_t startingStringSize = strlen(startingString); diff --git a/GLibFacade.h b/Sources/Public/GLibFacade.h similarity index 91% rename from GLibFacade.h rename to Sources/Public/GLibFacade.h index 30651ac5..7f4d175f 100644 --- a/GLibFacade.h +++ b/Sources/Public/GLibFacade.h @@ -21,8 +21,13 @@ typedef int gboolean; typedef char gchar; /* This style of bool is used in shared source code */ -#define FALSE false -#define TRUE true +#ifndef FALSE + #define FALSE false +#endif + +#ifndef TRUE + #define TRUE true +#endif /* WE implement minimal mirror implementations of GLib's GString and GSList * sufficient to cover the functionality required by MultiMarkdown. @@ -38,8 +43,8 @@ typedef struct /* Where in the str buffer will we add new characters */ /* or append new strings? */ - int currentStringBufferSize; - int currentStringLength; + size_t currentStringBufferSize; + size_t currentStringLength; } GString; GString* g_string_new(char *startingString); diff --git a/MarkdownMacPrefix.h b/Sources/Public/MultiMarkdown.h similarity index 100% rename from MarkdownMacPrefix.h rename to Sources/Public/MultiMarkdown.h diff --git a/glib.h b/Sources/Public/glib.h similarity index 100% rename from glib.h rename to Sources/Public/glib.h diff --git a/markdown_lib.c b/Sources/Public/markdown_lib.c similarity index 89% rename from markdown_lib.c rename to Sources/Public/markdown_lib.c index d83df744..a627686a 100644 --- a/markdown_lib.c +++ b/Sources/Public/markdown_lib.c @@ -22,42 +22,20 @@ #include #include "markdown_peg.h" -#define TABSTOP 4 #define VERSION "3.7" /* preformat_text - allocate and copy text buffer while * performing tab expansion. */ -static GString *preformat_text(char *text) { - GString *buf; - char next_char; - int charstotab; - - int len = 0; - - buf = g_string_new(""); - - charstotab = TABSTOP; - while ((next_char = *text++) != '\0') { - switch (next_char) { - case '\t': - while (charstotab > 0) - g_string_append_c(buf, ' '), len++, charstotab--; - break; - case '\n': - g_string_append_c(buf, '\n'), len++, charstotab = TABSTOP; - break; - default: - g_string_append_c(buf, next_char), len++, charstotab--; - } - if (charstotab == 0) - charstotab = TABSTOP; - } +GString *preformat_text(char *text) { + GString *buf = g_string_new(""); + g_string_append(buf, text); g_string_append(buf, "\n\n"); - return(buf); + + return(buf); } /* print_tree - print tree of elements, for debugging only. */ -static void print_tree(element * elt, int indent) { +void print_tree(element * elt, int indent) { int i; char * key; while (elt != NULL) { @@ -81,6 +59,8 @@ static void print_tree(element * elt, int indent) { case HTML: key = "HTML"; break; case EMPH: key = "EMPH"; break; case STRONG: key = "STRONG"; break; + case DELETE: key = "DELETE"; break; + case COMMENT: key = "COMMENT"; break; case PLAIN: key = "PLAIN"; break; case PARA: key = "PARA"; break; case LISTITEM: key = "LISTITEM"; break; @@ -93,7 +73,9 @@ static void print_tree(element * elt, int indent) { case H5: key = "H5"; break; case H6: key = "H6"; break; case BLOCKQUOTE: key = "BLOCKQUOTE"; break; + case COMMENTBLOCK: key = "COMMENTBLOCK"; break; case VERBATIM: key = "VERBATIM"; break; + case CODEBLOCK: key = "CODEBLOCK"; break; case HTMLBLOCK: key = "HTMLBLOCK"; break; case HRULE: key = "HRULE"; break; case REFERENCE: key = "REFERENCE"; break; @@ -114,7 +96,7 @@ static void print_tree(element * elt, int indent) { /* process_raw_blocks - traverses an element list, replacing any RAW elements with * the result of parsing them as markdown text, and recursing into the children * of parent elements. The result should be a tree of elements without any RAWs. */ -static element * process_raw_blocks(element *input, int extensions, element *references, element *notes, element *labels) { +element * process_raw_blocks(element *input, int extensions, element *references, element *notes, element *labels) { element *current = NULL; element *last_child = NULL; char *contents; @@ -122,14 +104,16 @@ static element * process_raw_blocks(element *input, int extensions, element *ref while (current != NULL) { if (current->key == RAW) { + char *nextString = current->contents.str; + /* \001 is used to indicate boundaries between nested lists when there * is no blank line. We split the string by \001 and parse * each chunk separately. */ - contents = strtok(current->contents.str, "\001"); + contents = strsep(&nextString, "\001"); current->key = LIST; current->children = parse_markdown(contents, extensions, references, notes, labels); last_child = current->children; - while ((contents = strtok(NULL, "\001"))) { + while ((contents = strsep(&nextString, "\001"))) { while (last_child->next != NULL) last_child = last_child->next; last_child->next = parse_markdown(contents, extensions, references, notes, labels); @@ -258,7 +242,7 @@ gboolean has_metadata(char *text, int extensions) { } /* version - return the MultiMarkdown library version */ -char * mmd_version() { +char * mmd_version(void) { char* result = (char*)malloc(8); sprintf(result, "%s",VERSION); return result; diff --git a/markdown_lib.h b/Sources/Public/markdown_lib.h similarity index 52% rename from markdown_lib.h rename to Sources/Public/markdown_lib.h index 2e7b33a5..0069e9e9 100644 --- a/markdown_lib.h +++ b/Sources/Public/markdown_lib.h @@ -6,13 +6,23 @@ #include "glib.h" enum markdown_extensions { - EXT_SMART = 1 << 0, - EXT_NOTES = 1 << 1, - EXT_FILTER_HTML = 1 << 2, - EXT_FILTER_STYLES = 1 << 3, - EXT_COMPATIBILITY = 1 << 4, - EXT_PROCESS_HTML = 1 << 5, - EXT_NO_LABELS = 1 << 6, + EXT_SMART = 1 << 0, + EXT_NOTES = 1 << 1, + EXT_LINK_ATTRIBUTES = 1 << 2, + EXT_FILTER_HTML = 1 << 3, + EXT_FILTER_STYLES = 1 << 4, + EXT_COMPATIBILITY = 1 << 5, + EXT_PROCESS_HTML = 1 << 6, + EXT_NO_LABELS = 1 << 7, + EXT_KEEP_WHITESPACES = 1 << 8, + EXT_KEEP_ESCAPES = 1 << 9, + EXT_KEEP_MAGIC_BLANK_LINES = 1 << 10, + EXT_TABLES = 1 << 11, + EXT_MATH = 1 << 12, + EXT_LABELS = 1 << 13, + EXT_DELETE = 1 << 14, + EXT_BLOCK_COMMENT = 1 << 15, + EXT_INLINE_COMMENT = 1 << 16, }; enum markdown_formats { @@ -31,7 +41,7 @@ GString * markdown_to_g_string(char *text, int extensions, int output_format); char * markdown_to_string(char *text, int extensions, int output_format); char * extract_metadata_value(char *text, int extensions, char *key); gboolean has_metadata(char *text, int extensions); -char * mmd_version(); +char * mmd_version(void); /* vim: set ts=4 sw=4 : */ #endif diff --git a/Sources/Public/markdown_parser_lib.c b/Sources/Public/markdown_parser_lib.c new file mode 100644 index 00000000..1818f9bc --- /dev/null +++ b/Sources/Public/markdown_parser_lib.c @@ -0,0 +1,47 @@ +// +// markdown_parser_lib.c +// MultiMarkdown +// +// Created by Friedrich Gräter on 06.03.13. +// +// + +#include "markdown_parser_lib.h" +#include "markdown_peg.h" + +GString *preformat_text(char *text); +element * process_raw_blocks(element *input, int extensions, element *references, element *notes, element *labels); + +/* markdown_to_ast - convert markdown text and return the AST + */ +element *markdown_to_ast(const char *markdownString, int extensions) +{ + element *result; + element *references; + element *notes; + element *labels; + GString *formatted_text; + + formatted_text = preformat_text((char*)markdownString); + + references = parse_references(formatted_text->str, extensions); + notes = parse_notes(formatted_text->str, extensions, references); + labels = parse_labels(formatted_text->str, extensions, references, notes); + result = parse_markdown_with_metadata(formatted_text->str, extensions, references, notes, labels); + + result = process_raw_blocks(result, extensions, references, notes, labels); + + g_string_free(formatted_text, TRUE); + + free_element_list(references); + free_element_list(labels); + + return result; +} + +/* markdown_free_ast - Frees the AST after usage + */ +void markdown_free_ast(struct Element *ast) +{ + free_element_list(ast); +} diff --git a/Sources/Public/markdown_parser_lib.h b/Sources/Public/markdown_parser_lib.h new file mode 100644 index 00000000..cede6e67 --- /dev/null +++ b/Sources/Public/markdown_parser_lib.h @@ -0,0 +1,136 @@ +#ifndef MARKDOWN_PARSER_LIB_H +#define MARKDOWN_PARSER_LIB_H + +#include "markdown_lib.h" + +/* Information (label, URL and title) for a link. */ +struct Link { + struct Element *label; + char *url; + char *title; + struct Element *attr; + char *identifier; +}; + +/* Information for a code block */ +struct CodeBlock { + char *language; + char *code; + size_t preceedingIndentation; +}; + +/* Union for contents of an Element (string, list, or link). */ +union Contents { + char *str; + struct Link *link; + struct CodeBlock *codeblock; +}; + +/* Types of semantic values returned by parsers. */ +enum keys { LIST, /* A generic list of values. For ordered and bullet lists, see below. */ + RAW, /* Raw markdown to be processed further */ + SPACE, + LINEBREAK, + ELLIPSIS, + EMDASH, + ENDASH, + APOSTROPHE, + SINGLEQUOTED, + DOUBLEQUOTED, + STR, + LINK, + IMAGE, + IMAGEBLOCK, + CODE, + HTML, + EMPH, + STRONG, + DELETE, + COMMENT, + PLAIN, + PARA, + LISTITEM, + BULLETLIST, + ORDEREDLIST, + H1, H2, H3, H4, H5, H6, H7, /* Code assumes that these are in order. */ + BLOCKQUOTE, + COMMENTBLOCK, + VERBATIM, + CODEBLOCK, + HTMLBLOCK, + HRULE, + REFERENCE, + NOTE, + CITATION, + NOCITATION, + LOCATOR, + NOTELABEL, + DEFLIST, + TERM, + DEFINITION, + METAKEY, + METAVALUE, + METADATA, + FOOTER, + LABEL, + HEADINGSECTION, + ENDHTML, + TABLE, + TABLEHEAD, + TABLEBODY, + TABLEROW, + TABLECELL, + CELLSPAN, + TABLECAPTION, + TABLELABEL, + TABLESEPARATOR, + AUTOLABEL, + ATTRIBUTE, + ATTRKEY, + ATTRVALUE, + GLOSSARY, + GLOSSARYTERM, + GLOSSARYSORTKEY, + MATHSPAN +}; + +/* constants for managing Smart Typography */ +enum smartelements { + LSQUOTE, + RSQUOTE, + LDQUOTE, + RDQUOTE, + NDASH, + MDASH, + ELLIP, + APOS, +}; + +enum smartoutput { + HTMLOUT, + LATEXOUT, +}; + +enum language { + DUTCH, + ENGLISH, + FRENCH, + GERMAN, + SWEDISH, + GERMANGUILL, +}; + +/* Semantic value of a parsing action. */ +struct Element { + enum keys key; + union Contents contents; + struct Element *children; + struct Element *next; +}; + +struct Element * markdown_to_ast(const char *text, int extensions); +void markdown_free_ast(struct Element *ast); + +void print_tree(struct Element * elt, int indent); + +#endif diff --git a/Sources/Public/markdown_peg.h b/Sources/Public/markdown_peg.h new file mode 100644 index 00000000..249bfde0 --- /dev/null +++ b/Sources/Public/markdown_peg.h @@ -0,0 +1,31 @@ +/* markdown_peg.h */ +#ifndef MARKDOWN_PEG_H +#define MARKDOWN_PEG_H + +#include "markdown_lib.h" +#include "glib.h" + +#include "markdown_parser_lib.h" + +typedef struct Link mm_link; +typedef struct CodeBlock codeblock; +typedef struct Element element; + + +element * parse_references(char *string, int extensions); +element * parse_notes(char *string, int extensions, element *reference_list); +element * parse_labels(char *string, int extensions, element *reference_list, element *note_list); + +element * parse_markdown(char *string, int extensions, element *reference_list, element *note_list, element *label_list); +element * parse_markdown_with_metadata(char *string, int extensions, element *reference_list, element *note_list, element *label_list); +void free_element_list(element * elt); +void free_element(element *elt); +void print_element_list(GString *out, element *elt, int format, int exts); + +element * parse_metadata_only(char *string, int extensions); +char * extract_metadata_value(char *text, int extensions, char *key); + +char * metavalue_for_key(char *key, element *list); + +element * parse_markdown_for_opml(char *string, int extensions); +#endif diff --git a/peg-0.1.9/tree.h b/Sources/Public/tree.h similarity index 100% rename from peg-0.1.9/tree.h rename to Sources/Public/tree.h diff --git a/leg b/leg new file mode 100755 index 00000000..d6d37a4b Binary files /dev/null and b/leg differ diff --git a/markdown_peg.h b/markdown_peg.h deleted file mode 100644 index fdea31e7..00000000 --- a/markdown_peg.h +++ /dev/null @@ -1,143 +0,0 @@ -/* markdown_peg.h */ -#ifndef MARKDOWN_PEG_H -#define MARKDOWN_PEG_H - -#include "markdown_lib.h" -#include "glib.h" - -/* Information (label, URL and title) for a link. */ -struct Link { - struct Element *label; - char *url; - char *title; - struct Element *attr; - char *identifier; -}; - -typedef struct Link link; - -/* Union for contents of an Element (string, list, or link). */ -union Contents { - char *str; - struct Link *link; -}; - -/* Types of semantic values returned by parsers. */ -enum keys { LIST, /* A generic list of values. For ordered and bullet lists, see below. */ - RAW, /* Raw markdown to be processed further */ - SPACE, - LINEBREAK, - ELLIPSIS, - EMDASH, - ENDASH, - APOSTROPHE, - SINGLEQUOTED, - DOUBLEQUOTED, - STR, - LINK, - IMAGE, - IMAGEBLOCK, - CODE, - HTML, - EMPH, - STRONG, - PLAIN, - PARA, - LISTITEM, - BULLETLIST, - ORDEREDLIST, - H1, H2, H3, H4, H5, H6, H7, /* Code assumes that these are in order. */ - BLOCKQUOTE, - VERBATIM, - HTMLBLOCK, - HRULE, - REFERENCE, - NOTE, - CITATION, - NOCITATION, - LOCATOR, - NOTELABEL, - DEFLIST, - TERM, - DEFINITION, - METAKEY, - METAVALUE, - METADATA, - FOOTER, - LABEL, - HEADINGSECTION, - ENDHTML, - TABLE, - TABLEHEAD, - TABLEBODY, - TABLEROW, - TABLECELL, - CELLSPAN, - TABLECAPTION, - TABLELABEL, - TABLESEPARATOR, - AUTOLABEL, - ATTRIBUTE, - ATTRKEY, - ATTRVALUE, - GLOSSARY, - GLOSSARYTERM, - GLOSSARYSORTKEY, - MATHSPAN - }; - -/* constants for managing Smart Typography */ -enum smartelements { - LSQUOTE, - RSQUOTE, - LDQUOTE, - RDQUOTE, - NDASH, - MDASH, - ELLIP, - APOS, -}; - -enum smartoutput { - HTMLOUT, - LATEXOUT, -}; - -enum language { - DUTCH, - ENGLISH, - FRENCH, - GERMAN, - SWEDISH, - GERMANGUILL, -}; - -/* Semantic value of a parsing action. */ -struct Element { - int key; - union Contents contents; - struct Element *children; - struct Element *next; -}; - - - -typedef struct Element element; - -element * parse_references(char *string, int extensions); -element * parse_notes(char *string, int extensions, element *reference_list); -element * parse_labels(char *string, int extensions, element *reference_list, element *note_list); - -element * parse_markdown(char *string, int extensions, element *reference_list, element *note_list, element *label_list); -element * parse_markdown_with_metadata(char *string, int extensions, element *reference_list, element *note_list, element *label_list); -void free_element_list(element * elt); -void free_element(element *elt); -void print_element_list(GString *out, element *elt, int format, int exts); - -element * parse_metadata_only(char *string, int extensions); -char * extract_metadata_value(char *text, int extensions, char *key); - -char * metavalue_for_key(char *key, element *list); - -element * parse_markdown_for_opml(char *string, int extensions); -#endif diff --git a/parsing_functions.c b/parsing_functions.c deleted file mode 100644 index 4664e3b4..00000000 --- a/parsing_functions.c +++ /dev/null @@ -1,222 +0,0 @@ -/* parsing_functions.c - Functions for parsing markdown and - * freeing element lists. */ - -/* These yy_* functions come from markdown_parser.c which is - * generated from markdown_parser.leg - * */ -typedef int (*yyrule)(); - -extern int yyparse(); -extern int yyparsefrom(yyrule); -extern int yy_References(); -extern int yy_Notes(); -extern int yy_Doc(); - -extern int yy_AutoLabels(); -extern int yy_DocWithMetaData(); -extern int yy_MetaDataOnly(); -extern int yy_DocForOPML(); - -#include "utility_functions.h" -#include "parsing_functions.h" -#include "markdown_peg.h" - -static void free_element_contents(element elt); - -/* free_element_list - free list of elements recursively */ -void free_element_list(element * elt) { - element * next = NULL; - while (elt != NULL) { - next = elt->next; - free_element_contents(*elt); - if (elt->children != NULL) { - free_element_list(elt->children); - elt->children = NULL; - } - free(elt); - elt = next; - } -} - -/* free_element_contents - free element contents depending on type */ -static void free_element_contents(element elt) { - switch (elt.key) { - case STR: - case SPACE: - case RAW: - case HTMLBLOCK: - case HTML: - case VERBATIM: - case CODE: - case NOTE: - case AUTOLABEL: - case CITATION: - case TERM: - case METAKEY: - case METAVALUE: - case TABLESEPARATOR: - case ATTRKEY: - case GLOSSARY: - case GLOSSARYTERM: - case NOTELABEL: - case CELLSPAN: - case EMDASH: - case ENDASH: - case GLOSSARYSORTKEY: - case MATHSPAN: - free(elt.contents.str); - elt.contents.str = NULL; - break; - case LINK: - case IMAGE: - case REFERENCE: - free(elt.contents.link->url); - elt.contents.link->url = NULL; - free(elt.contents.link->title); - elt.contents.link->title = NULL; - free_element_list(elt.contents.link->label); - free(elt.contents.link->identifier); - elt.contents.link->identifier = NULL; -/* free_element_list(elt.contents.link->attr);*/ - free(elt.contents.link); - elt.contents.link = NULL; - break; - default: - ; - } -} - -/* free_element - free element and contents */ -void free_element(element *elt) { - free_element_contents(*elt); - free(elt); -} - -element * parse_references(char *string, int extensions) { - - char *oldcharbuf; - syntax_extensions = extensions; - - oldcharbuf = charbuf; - charbuf = string; - yyparsefrom(yy_References); /* first pass, just to collect references */ - charbuf = oldcharbuf; - - return references; -} - -element * parse_notes(char *string, int extensions, element *reference_list) { - - char *oldcharbuf; - notes = NULL; - syntax_extensions = extensions; - - if (extension(EXT_NOTES)) { - references = reference_list; - oldcharbuf = charbuf; - charbuf = string; - yyparsefrom(yy_Notes); /* second pass for notes */ - charbuf = oldcharbuf; - } - - return notes; -} - -element * parse_labels(char *string, int extensions, element *reference_list, element *note_list) { - - char *oldcharbuf; - syntax_extensions = extensions; - references = reference_list; - notes = note_list; - labels = NULL; - - oldcharbuf = charbuf; - charbuf = string; - yyparsefrom(yy_AutoLabels); /* third pass, to collect labels */ - charbuf = oldcharbuf; - - return labels; -} - -element * parse_markdown(char *string, int extensions, element *reference_list, element *note_list, element *label_list) { - - char *oldcharbuf; - syntax_extensions = extensions; - references = reference_list; - notes = note_list; - labels = label_list; - - oldcharbuf = charbuf; - charbuf = string; - - yyparsefrom(yy_Doc); - - charbuf = oldcharbuf; /* restore charbuf to original value */ - -/* if (parse_aborted) { - free_element_list(parse_result); - return NULL; - }*/ - - return parse_result; - -} - -element * parse_markdown_with_metadata(char *string, int extensions, element *reference_list, element *note_list, element *label_list) { - - char *oldcharbuf; - syntax_extensions = extensions; - references = reference_list; - notes = note_list; - labels = label_list; - - oldcharbuf = charbuf; - charbuf = string; - - start_time = clock(); - - yyparsefrom(yy_DocWithMetaData); - charbuf = oldcharbuf; /* restore charbuf to original value */ - - /* reset start_time for subsequent passes */ - start_time = 0; - - if (parse_aborted) { - parse_aborted = 0; - free_element_list(parse_result); - return NULL; - } - - return parse_result; - -} - -element * parse_metadata_only(char *string, int extensions) { - - char *oldcharbuf; - syntax_extensions = extensions; - - oldcharbuf = charbuf; - charbuf = string; - - yyparsefrom(yy_MetaDataOnly); - - charbuf = oldcharbuf; /* restore charbuf to original value */ - return parse_result; - -} - -element * parse_markdown_for_opml(char *string, int extensions) { - - char *oldcharbuf; - syntax_extensions = extensions; - - oldcharbuf = charbuf; - charbuf = string; - - yyparsefrom(yy_DocForOPML); - - charbuf = oldcharbuf; /* restore charbuf to original value */ - return parse_result; - -} diff --git a/peg-0.1.9/Makefile b/peg-0.1.9/Makefile deleted file mode 100644 index c10fbda8..00000000 --- a/peg-0.1.9/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -CFLAGS = -g -Wall $(OFLAGS) $(XFLAGS) -OFLAGS = -O3 -DNDEBUG -#OFLAGS = -pg - -OBJS = tree.o compile.o - -all : peg leg - -peg : peg.o $(OBJS) - $(CC) $(CFLAGS) -o $@-new peg.o $(OBJS) - mv $@-new $@ - -leg : leg.o $(OBJS) - $(CC) $(CFLAGS) -o $@-new leg.o $(OBJS) - mv $@-new $@ - -ROOT = -PREFIX = /usr/local -BINDIR = $(ROOT)$(PREFIX)/bin - -install : $(BINDIR)/peg $(BINDIR)/leg - -$(BINDIR)/% : % - cp -p $< $@ - strip $@ - -uninstall : .FORCE - rm -f $(BINDIR)/peg - rm -f $(BINDIR)/leg - -peg.o : peg.c peg.peg-c - -%.peg-c : %.peg compile.c - ./peg -o $@ $< - -leg.o : leg.c - -leg.c : leg.leg compile.c - ./leg -o $@ $< - -check : check-peg check-leg - -check-peg : peg .FORCE - ./peg < peg.peg > peg.out - diff peg.peg-c peg.out - rm peg.out - -check-leg : leg .FORCE - ./leg < leg.leg > leg.out - diff leg.c leg.out - rm leg.out - -test examples : .FORCE - $(SHELL) -ec '(cd examples; $(MAKE))' - -clean : .FORCE - rm -f *~ *.o *.peg.[cd] *.leg.[cd] - $(SHELL) -ec '(cd examples; $(MAKE) $@)' - -spotless : clean .FORCE - rm -f peg - rm -f leg - $(SHELL) -ec '(cd examples; $(MAKE) $@)' - -.FORCE : diff --git a/peg-0.1.9/compile.c b/peg-0.1.9/compile.c deleted file mode 100644 index 74506b76..00000000 --- a/peg-0.1.9/compile.c +++ /dev/null @@ -1,717 +0,0 @@ -/* Copyright (c) 2007, 2012 by Ian Piumarta - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the 'Software'), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, provided that the above copyright notice(s) and this - * permission notice appear in all copies of the Software. Acknowledgement - * of the use of this Software in supporting documentation would be - * appreciated but is not required. - * - * THE SOFTWARE IS PROVIDED 'AS IS'. USE ENTIRELY AT YOUR OWN RISK. - * - * Last edited: 2012-04-29 16:09:36 by piumarta on emilia - */ - -#include -#include -#include -#include - -#include "version.h" -#include "tree.h" - -static int yyl(void) -{ - static int prev= 0; - return ++prev; -} - -static void charClassSet (unsigned char bits[], int c) { bits[c >> 3] |= (1 << (c & 7)); } -static void charClassClear(unsigned char bits[], int c) { bits[c >> 3] &= ~(1 << (c & 7)); } - -typedef void (*setter)(unsigned char bits[], int c); - -static inline int oigit(int c) { return '0' <= c && c <= '7'; } - -static int cnext(unsigned char **ccp) -{ - unsigned char *cclass= *ccp; - int c= *cclass++; - if (c) - { - if ('\\' == c && *cclass) - { - switch (c= *cclass++) - { - case 'a': c= '\a'; break; /* bel */ - case 'b': c= '\b'; break; /* bs */ - case 'e': c= '\e'; break; /* esc */ - case 'f': c= '\f'; break; /* ff */ - case 'n': c= '\n'; break; /* nl */ - case 'r': c= '\r'; break; /* cr */ - case 't': c= '\t'; break; /* ht */ - case 'v': c= '\v'; break; /* vt */ - default: - if (oigit(c)) - { - c -= '0'; - if (oigit(*cclass)) c= (c << 3) + *cclass++ - '0'; - if (oigit(*cclass)) c= (c << 3) + *cclass++ - '0'; - } - break; - } - } - *ccp= cclass; - } - return c; -} - -static char *makeCharClass(unsigned char *cclass) -{ - unsigned char bits[32]; - setter set; - int c, prev= -1; - static char string[256]; - char *ptr; - - if ('^' == *cclass) - { - memset(bits, 255, 32); - set= charClassClear; - ++cclass; - } - else - { - memset(bits, 0, 32); - set= charClassSet; - } - - while (*cclass) - { - if ('-' == *cclass && cclass[1] && prev >= 0) - { - ++cclass; - for (c= cnext(&cclass); prev <= c; ++prev) - set(bits, prev); - prev= -1; - } - else - { - c= cnext(&cclass); - set(bits, prev= c); - } - } - - ptr= string; - for (c= 0; c < 32; ++c) - ptr += sprintf(ptr, "\\%03o", bits[c]); - - return string; -} - -static void begin(void) { fprintf(output, "\n {"); } -static void end(void) { fprintf(output, "\n }"); } -static void label(int n) { fprintf(output, "\n l%d:;\t", n); } -static void jump(int n) { fprintf(output, " goto l%d;", n); } -static void save(int n) { fprintf(output, " int yypos%d= ctx->pos, yythunkpos%d= ctx->thunkpos;", n, n); } -static void restore(int n) { fprintf(output, " ctx->pos= yypos%d; ctx->thunkpos= yythunkpos%d;", n, n); } - -static void Node_compile_c_ko(Node *node, int ko) -{ - assert(node); - switch (node->type) - { - case Rule: - fprintf(stderr, "\ninternal error #1 (%s)\n", node->rule.name); - exit(1); - break; - - case Dot: - fprintf(output, " if (!yymatchDot(ctx)) goto l%d;", ko); - break; - - case Name: - fprintf(output, " if (!yy_%s(ctx)) goto l%d;", node->name.rule->rule.name, ko); - if (node->name.variable) - fprintf(output, " yyDo(ctx, yySet, %d, 0);", node->name.variable->variable.offset); - break; - - case Character: - case String: - { - int len= strlen(node->string.value); - if (1 == len) - { - if ('\'' == node->string.value[0]) - fprintf(output, " if (!yymatchChar(ctx, '\\'')) goto l%d;", ko); - else - fprintf(output, " if (!yymatchChar(ctx, '%s')) goto l%d;", node->string.value, ko); - } - else - if (2 == len && '\\' == node->string.value[0]) - fprintf(output, " if (!yymatchChar(ctx, '%s')) goto l%d;", node->string.value, ko); - else - fprintf(output, " if (!yymatchString(ctx, \"%s\")) goto l%d;", node->string.value, ko); - } - break; - - case Class: - fprintf(output, " if (!yymatchClass(ctx, (unsigned char *)\"%s\")) goto l%d;", makeCharClass(node->cclass.value), ko); - break; - - case Action: - fprintf(output, " yyDo(ctx, yy%s, ctx->begin, ctx->end);", node->action.name); - break; - - case Predicate: - fprintf(output, " yyText(ctx, ctx->begin, ctx->end); if (!(%s)) goto l%d;", node->action.text, ko); - break; - - case Alternate: - { - int ok= yyl(); - begin(); - save(ok); - for (node= node->alternate.first; node; node= node->alternate.next) - if (node->alternate.next) - { - int next= yyl(); - Node_compile_c_ko(node, next); - jump(ok); - label(next); - restore(ok); - } - else - Node_compile_c_ko(node, ko); - end(); - label(ok); - } - break; - - case Sequence: - for (node= node->sequence.first; node; node= node->sequence.next) - Node_compile_c_ko(node, ko); - break; - - case PeekFor: - { - int ok= yyl(); - begin(); - save(ok); - Node_compile_c_ko(node->peekFor.element, ko); - restore(ok); - end(); - } - break; - - case PeekNot: - { - int ok= yyl(); - begin(); - save(ok); - Node_compile_c_ko(node->peekFor.element, ok); - jump(ko); - label(ok); - restore(ok); - end(); - } - break; - - case Query: - { - int qko= yyl(), qok= yyl(); - begin(); - save(qko); - Node_compile_c_ko(node->query.element, qko); - jump(qok); - label(qko); - restore(qko); - end(); - label(qok); - } - break; - - case Star: - { - int again= yyl(), out= yyl(); - label(again); - begin(); - save(out); - Node_compile_c_ko(node->star.element, out); - jump(again); - label(out); - restore(out); - end(); - } - break; - - case Plus: - { - int again= yyl(), out= yyl(); - Node_compile_c_ko(node->plus.element, ko); - label(again); - begin(); - save(out); - Node_compile_c_ko(node->plus.element, out); - jump(again); - label(out); - restore(out); - end(); - } - break; - - default: - fprintf(stderr, "\nNode_compile_c_ko: illegal node type %d\n", node->type); - exit(1); - } -} - - -static int countVariables(Node *node) -{ - int count= 0; - while (node) - { - ++count; - node= node->variable.next; - } - return count; -} - -static void defineVariables(Node *node) -{ - int count= 0; - while (node) - { - fprintf(output, "#define %s ctx->val[%d]\n", node->variable.name, --count); - node->variable.offset= count; - node= node->variable.next; - } - fprintf(output, "#define yy ctx->yy\n"); - fprintf(output, "#define yypos ctx->pos\n"); - fprintf(output, "#define yythunkpos ctx->thunkpos\n"); -} - -static void undefineVariables(Node *node) -{ - fprintf(output, "#undef yythunkpos\n"); - fprintf(output, "#undef yypos\n"); - fprintf(output, "#undef yy\n"); - while (node) - { - fprintf(output, "#undef %s\n", node->variable.name); - node= node->variable.next; - } -} - - -static void Rule_compile_c2(Node *node) -{ - assert(node); - assert(Rule == node->type); - - if (!node->rule.expression) - fprintf(stderr, "rule '%s' used but not defined\n", node->rule.name); - else - { - int ko= yyl(), safe; - - if ((!(RuleUsed & node->rule.flags)) && (node != start)) - fprintf(stderr, "rule '%s' defined but not used\n", node->rule.name); - - safe= ((Query == node->rule.expression->type) || (Star == node->rule.expression->type)); - - fprintf(output, "\nYY_RULE(int) yy_%s(yycontext *ctx)\n{", node->rule.name); - if (!safe) save(0); - if (node->rule.variables) - fprintf(output, " yyDo(ctx, yyPush, %d, 0);", countVariables(node->rule.variables)); - fprintf(output, "\n yyprintf((stderr, \"%%s\\n\", \"%s\"));", node->rule.name); - Node_compile_c_ko(node->rule.expression, ko); - fprintf(output, "\n yyprintf((stderr, \" ok %%s @ %%s\\n\", \"%s\", ctx->buf+ctx->pos));", node->rule.name); - if (node->rule.variables) - fprintf(output, " yyDo(ctx, yyPop, %d, 0);", countVariables(node->rule.variables)); - fprintf(output, "\n return 1;"); - if (!safe) - { - label(ko); - restore(0); - fprintf(output, "\n yyprintf((stderr, \" fail %%s @ %%s\\n\", \"%s\", ctx->buf+ctx->pos));", node->rule.name); - fprintf(output, "\n return 0;"); - } - fprintf(output, "\n}"); - } - - if (node->rule.next) - Rule_compile_c2(node->rule.next); -} - -static char *header= "\ -#include \n\ -#include \n\ -#include \n\ -"; - -static char *preamble= "\ -#ifndef YY_LOCAL\n\ -#define YY_LOCAL(T) static T\n\ -#endif\n\ -#ifndef YY_ACTION\n\ -#define YY_ACTION(T) static T\n\ -#endif\n\ -#ifndef YY_RULE\n\ -#define YY_RULE(T) static T\n\ -#endif\n\ -#ifndef YY_PARSE\n\ -#define YY_PARSE(T) T\n\ -#endif\n\ -#ifndef YYPARSE\n\ -#define YYPARSE yyparse\n\ -#endif\n\ -#ifndef YYPARSEFROM\n\ -#define YYPARSEFROM yyparsefrom\n\ -#endif\n\ -#ifndef YY_INPUT\n\ -#define YY_INPUT(buf, result, max_size) \\\n\ - { \\\n\ - int yyc= getchar(); \\\n\ - result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \\\n\ - yyprintf((stderr, \"<%c>\", yyc)); \\\n\ - }\n\ -#endif\n\ -#ifndef YY_BEGIN\n\ -#define YY_BEGIN ( ctx->begin= ctx->pos, 1)\n\ -#endif\n\ -#ifndef YY_END\n\ -#define YY_END ( ctx->end= ctx->pos, 1)\n\ -#endif\n\ -#ifdef YY_DEBUG\n\ -# define yyprintf(args) fprintf args\n\ -#else\n\ -# define yyprintf(args)\n\ -#endif\n\ -#ifndef YYSTYPE\n\ -#define YYSTYPE int\n\ -#endif\n\ -\n\ -#ifndef YY_PART\n\ -\n\ -typedef struct _yycontext yycontext;\n\ -typedef void (*yyaction)(yycontext *ctx, char *yytext, int yyleng);\n\ -typedef struct _yythunk { int begin, end; yyaction action; struct _yythunk *next; } yythunk;\n\ -\n\ -struct _yycontext {\n\ - char *buf;\n\ - int buflen;\n\ - int pos;\n\ - int limit;\n\ - char *text;\n\ - int textlen;\n\ - int begin;\n\ - int end;\n\ - int textmax;\n\ - yythunk *thunks;\n\ - int thunkslen;\n\ - int thunkpos;\n\ - YYSTYPE yy;\n\ - YYSTYPE *val;\n\ - YYSTYPE *vals;\n\ - int valslen;\n\ -#ifdef YY_CTX_MEMBERS\n\ - YY_CTX_MEMBERS\n\ -#endif\n\ -};\n\ -\n\ -#ifdef YY_CTX_LOCAL\n\ -#define YY_CTX_PARAM_ yycontext *yyctx,\n\ -#define YY_CTX_PARAM yycontext *yyctx\n\ -#define YY_CTX_ARG_ yyctx,\n\ -#define YY_CTX_ARG yyctx\n\ -#else\n\ -#define YY_CTX_PARAM_\n\ -#define YY_CTX_PARAM\n\ -#define YY_CTX_ARG_\n\ -#define YY_CTX_ARG\n\ -yycontext yyctx0;\n\ -yycontext *yyctx= &yyctx0;\n\ -#endif\n\ -\n\ -YY_LOCAL(int) yyrefill(yycontext *ctx)\n\ -{\n\ - int yyn;\n\ - while (ctx->buflen - ctx->pos < 512)\n\ - {\n\ - ctx->buflen *= 2;\n\ - ctx->buf= (char *)realloc(ctx->buf, ctx->buflen);\n\ - }\n\ - YY_INPUT((ctx->buf + ctx->pos), yyn, (ctx->buflen - ctx->pos));\n\ - if (!yyn) return 0;\n\ - ctx->limit += yyn;\n\ - return 1;\n\ -}\n\ -\n\ -YY_LOCAL(int) yymatchDot(yycontext *ctx)\n\ -{\n\ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;\n\ - ++ctx->pos;\n\ - return 1;\n\ -}\n\ -\n\ -YY_LOCAL(int) yymatchChar(yycontext *ctx, int c)\n\ -{\n\ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;\n\ - if ((unsigned char)ctx->buf[ctx->pos] == c)\n\ - {\n\ - ++ctx->pos;\n\ - yyprintf((stderr, \" ok yymatchChar(ctx, %c) @ %s\\n\", c, ctx->buf+ctx->pos));\n\ - return 1;\n\ - }\n\ - yyprintf((stderr, \" fail yymatchChar(ctx, %c) @ %s\\n\", c, ctx->buf+ctx->pos));\n\ - return 0;\n\ -}\n\ -\n\ -YY_LOCAL(int) yymatchString(yycontext *ctx, char *s)\n\ -{\n\ - int yysav= ctx->pos;\n\ - while (*s)\n\ - {\n\ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;\n\ - if (ctx->buf[ctx->pos] != *s)\n\ - {\n\ - ctx->pos= yysav;\n\ - return 0;\n\ - }\n\ - ++s;\n\ - ++ctx->pos;\n\ - }\n\ - return 1;\n\ -}\n\ -\n\ -YY_LOCAL(int) yymatchClass(yycontext *ctx, unsigned char *bits)\n\ -{\n\ - int c;\n\ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;\n\ - c= (unsigned char)ctx->buf[ctx->pos];\n\ - if (bits[c >> 3] & (1 << (c & 7)))\n\ - {\n\ - ++ctx->pos;\n\ - yyprintf((stderr, \" ok yymatchClass @ %s\\n\", ctx->buf+ctx->pos));\n\ - return 1;\n\ - }\n\ - yyprintf((stderr, \" fail yymatchClass @ %s\\n\", ctx->buf+ctx->pos));\n\ - return 0;\n\ -}\n\ -\n\ -YY_LOCAL(void) yyDo(yycontext *ctx, yyaction action, int begin, int end)\n\ -{\n\ - while (ctx->thunkpos >= ctx->thunkslen)\n\ - {\n\ - ctx->thunkslen *= 2;\n\ - ctx->thunks= (yythunk *)realloc(ctx->thunks, sizeof(yythunk) * ctx->thunkslen);\n\ - }\n\ - ctx->thunks[ctx->thunkpos].begin= begin;\n\ - ctx->thunks[ctx->thunkpos].end= end;\n\ - ctx->thunks[ctx->thunkpos].action= action;\n\ - ++ctx->thunkpos;\n\ -}\n\ -\n\ -YY_LOCAL(int) yyText(yycontext *ctx, int begin, int end)\n\ -{\n\ - int yyleng= end - begin;\n\ - if (yyleng <= 0)\n\ - yyleng= 0;\n\ - else\n\ - {\n\ - while (ctx->textlen < (yyleng + 1))\n\ - {\n\ - ctx->textlen *= 2;\n\ - ctx->text= (char *)realloc(ctx->text, ctx->textlen);\n\ - }\n\ - memcpy(ctx->text, ctx->buf + begin, yyleng);\n\ - }\n\ - ctx->text[yyleng]= '\\0';\n\ - return yyleng;\n\ -}\n\ -\n\ -YY_LOCAL(void) yyDone(yycontext *ctx)\n\ -{\n\ - int pos;\n\ - for (pos= 0; pos < ctx->thunkpos; ++pos)\n\ - {\n\ - yythunk *thunk= &ctx->thunks[pos];\n\ - int yyleng= thunk->end ? yyText(ctx, thunk->begin, thunk->end) : thunk->begin;\n\ - yyprintf((stderr, \"DO [%d] %p %s\\n\", pos, thunk->action, ctx->text));\n\ - thunk->action(ctx, ctx->text, yyleng);\n\ - }\n\ - ctx->thunkpos= 0;\n\ -}\n\ -\n\ -YY_LOCAL(void) yyCommit(yycontext *ctx)\n\ -{\n\ - if ((ctx->limit -= ctx->pos))\n\ - {\n\ - memmove(ctx->buf, ctx->buf + ctx->pos, ctx->limit);\n\ - }\n\ - ctx->begin -= ctx->pos;\n\ - ctx->end -= ctx->pos;\n\ - ctx->pos= ctx->thunkpos= 0;\n\ -}\n\ -\n\ -YY_LOCAL(int) yyAccept(yycontext *ctx, int tp0)\n\ -{\n\ - if (tp0)\n\ - {\n\ - fprintf(stderr, \"accept denied at %d\\n\", tp0);\n\ - return 0;\n\ - }\n\ - else\n\ - {\n\ - yyDone(ctx);\n\ - yyCommit(ctx);\n\ - }\n\ - return 1;\n\ -}\n\ -\n\ -YY_LOCAL(void) yyPush(yycontext *ctx, char *text, int count) { ctx->val += count; }\n\ -YY_LOCAL(void) yyPop(yycontext *ctx, char *text, int count) { ctx->val -= count; }\n\ -YY_LOCAL(void) yySet(yycontext *ctx, char *text, int count) { ctx->val[count]= ctx->yy; }\n\ -\n\ -#endif /* YY_PART */\n\ -\n\ -#define YYACCEPT yyAccept(ctx, yythunkpos0)\n\ -\n\ -"; - -static char *footer= "\n\ -\n\ -#ifndef YY_PART\n\ -\n\ -typedef int (*yyrule)(yycontext *ctx);\n\ -\n\ -YY_PARSE(int) YYPARSEFROM(YY_CTX_PARAM_ yyrule yystart)\n\ -{\n\ - int yyok;\n\ - if (!yyctx->buflen)\n\ - {\n\ - yyctx->buflen= 1024;\n\ - yyctx->buf= (char *)malloc(yyctx->buflen);\n\ - yyctx->textlen= 1024;\n\ - yyctx->text= (char *)malloc(yyctx->textlen);\n\ - yyctx->thunkslen= 32;\n\ - yyctx->thunks= (yythunk *)malloc(sizeof(yythunk) * yyctx->thunkslen);\n\ - yyctx->valslen= 32;\n\ - yyctx->vals= (YYSTYPE *)malloc(sizeof(YYSTYPE) * yyctx->valslen);\n\ - yyctx->begin= yyctx->end= yyctx->pos= yyctx->limit= yyctx->thunkpos= 0;\n\ - }\n\ - yyctx->begin= yyctx->end= yyctx->pos;\n\ - yyctx->thunkpos= 0;\n\ - yyctx->val= yyctx->vals;\n\ - yyok= yystart(yyctx);\n\ - if (yyok) yyDone(yyctx);\n\ - yyCommit(yyctx);\n\ - return yyok;\n\ -}\n\ -\n\ -YY_PARSE(int) YYPARSE(YY_CTX_PARAM)\n\ -{\n\ - return YYPARSEFROM(YY_CTX_ARG_ yy_%s);\n\ -}\n\ -\n\ -#endif\n\ -"; - -void Rule_compile_c_header(void) -{ - fprintf(output, "/* A recursive-descent parser generated by peg %d.%d.%d */\n", PEG_MAJOR, PEG_MINOR, PEG_LEVEL); - fprintf(output, "\n"); - fprintf(output, "%s", header); - fprintf(output, "#define YYRULECOUNT %d\n", ruleCount); -} - -int consumesInput(Node *node) -{ - if (!node) return 0; - - switch (node->type) - { - case Rule: - { - int result= 0; - if (RuleReached & node->rule.flags) - fprintf(stderr, "possible infinite left recursion in rule '%s'\n", node->rule.name); - else - { - node->rule.flags |= RuleReached; - result= consumesInput(node->rule.expression); - node->rule.flags &= ~RuleReached; - } - return result; - } - break; - - case Dot: return 1; - case Name: return consumesInput(node->name.rule); - case Character: - case String: return strlen(node->string.value) > 0; - case Class: return 1; - case Action: return 0; - case Predicate: return 0; - - case Alternate: - { - Node *n; - for (n= node->alternate.first; n; n= n->alternate.next) - if (!consumesInput(n)) - return 0; - } - return 1; - - case Sequence: - { - Node *n; - for (n= node->alternate.first; n; n= n->alternate.next) - if (consumesInput(n)) - return 1; - } - return 0; - - case PeekFor: return 0; - case PeekNot: return 0; - case Query: return 0; - case Star: return 0; - case Plus: return consumesInput(node->plus.element); - - default: - fprintf(stderr, "\nconsumesInput: illegal node type %d\n", node->type); - exit(1); - } - return 0; -} - - -void Rule_compile_c(Node *node) -{ - Node *n; - - for (n= rules; n; n= n->rule.next) - consumesInput(n); - - fprintf(output, "%s", preamble); - for (n= node; n; n= n->rule.next) - fprintf(output, "YY_RULE(int) yy_%s(yycontext *ctx); /* %d */\n", n->rule.name, n->rule.id); - fprintf(output, "\n"); - for (n= actions; n; n= n->action.list) - { - fprintf(output, "YY_ACTION(void) yy%s(yycontext *ctx, char *yytext, int yyleng)\n{\n", n->action.name); - defineVariables(n->action.rule->rule.variables); - fprintf(output, " yyprintf((stderr, \"do yy%s\\n\"));\n", n->action.name); - fprintf(output, " %s;\n", n->action.text); - undefineVariables(n->action.rule->rule.variables); - fprintf(output, "}\n"); - } - Rule_compile_c2(node); - fprintf(output, footer, start->rule.name); -} diff --git a/peg-0.1.9/examples/Makefile b/peg-0.1.9/examples/Makefile deleted file mode 100644 index 30d3cc8f..00000000 --- a/peg-0.1.9/examples/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -EXAMPLES = test rule accept wc dc dcv calc basic localctx - -CFLAGS = -g -O3 - -DIFF = diff -TEE = cat > - -all : $(EXAMPLES) - -test : .FORCE - ../peg -o test.peg.c test.peg - $(CC) $(CFLAGS) -o test test.c - echo 'ab.ac.ad.ae.afg.afh.afg.afh.afi.afj.' | ./$@ | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -rule : .FORCE - ../peg -o rule.peg.c rule.peg - $(CC) $(CFLAGS) -o rule rule.c - echo 'abcbcdabcbcdabcbcdabcbcd' | ./$@ | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -accept : .FORCE - ../peg -o accept.peg.c accept.peg - $(CC) $(CFLAGS) -o accept accept.c - echo 'abcbcdabcbcdabcbcdabcbcd' | ./$@ | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -wc : .FORCE - ../leg -o wc.leg.c wc.leg - $(CC) $(CFLAGS) -o wc wc.leg.c - cat wc.leg | ./$@ | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -dc : .FORCE - ../peg -o dc.peg.c dc.peg - $(CC) $(CFLAGS) -o dc dc.c - echo ' 2 *3 *(3+ 4) ' | ./dc | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -dcv : .FORCE - ../peg -o dcv.peg.c dcv.peg - $(CC) $(CFLAGS) -o dcv dcv.c - echo 'a = 6; b = 7; a * b' | ./dcv | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -calc : .FORCE - ../leg -o calc.leg.c calc.leg - $(CC) $(CFLAGS) -o calc calc.leg.c - echo 'a = 6; b = 7; a * b' | ./calc | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -basic : .FORCE - ../leg -o basic.leg.c basic.leg - $(CC) $(CFLAGS) -o basic basic.leg.c - ( echo 'load "test"'; echo "run" ) | ./basic | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -localctx : .FORCE - ../peg -o test.peg.c test.peg - $(CC) $(CFLAGS) -o localctx localctx.c - echo 'ab.ac.ad.ae.afg.afh.afg.afh.afi.afj.' | ./$@ | $(TEE) $@.out - $(DIFF) $@.ref $@.out - rm -f $@.out - @echo - -clean : .FORCE - rm -f *~ *.o *.[pl]eg.[cd] $(EXAMPLES) - rm -rf *.dSYM - -spotless : clean - -.FORCE : diff --git a/peg-0.1.9/examples/accept.c b/peg-0.1.9/examples/accept.c deleted file mode 100644 index 781e3b11..00000000 --- a/peg-0.1.9/examples/accept.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include - -#include "accept.peg.c" - -int main() -{ - while (yyparse()); - - return 0; -} diff --git a/peg-0.1.9/examples/accept.peg b/peg-0.1.9/examples/accept.peg deleted file mode 100644 index 9b28e404..00000000 --- a/peg-0.1.9/examples/accept.peg +++ /dev/null @@ -1,8 +0,0 @@ -start <- abcd+ - -abcd <- 'a' { printf("A %d\n", yypos); } bc { printf("ABC %d\n", yypos); } &{YYACCEPT} - / 'b' { printf("B %d\n", yypos); } cd { printf("BCD %d\n", yypos); } &{YYACCEPT} - -bc <- 'b' { printf("B %d\n", yypos); } 'c' { printf("C %d\n", yypos); } - -cd <- 'c' { printf("C %d\n", yypos); } 'd' { printf("D %d\n", yypos); } diff --git a/peg-0.1.9/examples/accept.ref b/peg-0.1.9/examples/accept.ref deleted file mode 100644 index 789f5283..00000000 --- a/peg-0.1.9/examples/accept.ref +++ /dev/null @@ -1,32 +0,0 @@ -A 3 -B 3 -C 3 -ABC 3 -B 3 -C 3 -D 3 -BCD 3 -A 3 -B 3 -C 3 -ABC 3 -B 3 -C 3 -D 3 -BCD 3 -A 3 -B 3 -C 3 -ABC 3 -B 3 -C 3 -D 3 -BCD 3 -A 3 -B 3 -C 3 -ABC 3 -B 3 -C 3 -D 3 -BCD 3 diff --git a/peg-0.1.9/examples/basic.leg b/peg-0.1.9/examples/basic.leg deleted file mode 100644 index ed38a8d7..00000000 --- a/peg-0.1.9/examples/basic.leg +++ /dev/null @@ -1,361 +0,0 @@ -# A 'syntax-directed interpreter' (all execution is a side-effect of parsing). -# Inspired by Dennis Allison's original Tiny BASIC grammar, circa 1975. -# -# Copyright (c) 2007 by Ian Piumarta -# All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the 'Software'), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, provided that the above copyright notice(s) and this -# permission notice appear in all copies of the Software. Acknowledgement -# of the use of this Software in supporting documentation would be -# appreciated but is not required. -# -# THE SOFTWARE IS PROVIDED 'AS IS'. USE ENTIRELY AT YOUR OWN RISK. -# -# Last edited: 2012-04-29 15:14:06 by piumarta on emilia - -%{ -# include - - typedef struct line line; - - struct line - { - int number; - int length; - char *text; - }; - - line *lines= 0; - int numLines= 0; - int pc= -1, epc= -1; - int batch= 0; - - int nextline(char *buf, int max); - -# define min(x, y) ((x) < (y) ? (x) : (y)) - -# define YY_INPUT(buf, result, max_size) \ - { \ - if ((pc >= 0) && (pc < numLines)) \ - { \ - line *linep= lines+pc++; \ - result= min(max_size, linep->length); \ - memcpy(buf, linep->text, result); \ - } \ - else \ - result= nextline(buf, max_size); \ - } - - union value { - int number; - char *string; - int (*binop)(int lhs, int rhs); - }; - -# define YYSTYPE union value - - int variables[26]; - - void accept(int number, char *line); - - void save(char *name); - void load(char *name); - void type(char *name); - - int lessThan(int lhs, int rhs) { return lhs < rhs; } - int lessEqual(int lhs, int rhs) { return lhs <= rhs; } - int notEqual(int lhs, int rhs) { return lhs != rhs; } - int equalTo(int lhs, int rhs) { return lhs == rhs; } - int greaterEqual(int lhs, int rhs) { return lhs >= rhs; } - int greaterThan(int lhs, int rhs) { return lhs > rhs; } - - int input(void); - - int stack[1024], sp= 0; - - char *help; - - void error(char *fmt, ...); - int findLine(int n, int create); -%} - -line = - s:statement CR -| - n:number < ( !CR . )* CR > { accept(n.number, yytext); } -| - CR -| - < ( !CR . )* CR > { epc= pc; error("syntax error"); } -| - !. { exit(0); } - -statement = 'print'- expr-list -| 'if'- e1:expression r:relop e2:expression { if (!r.binop(e1.number, e2.number)) yythunkpos= 0; } - 'then'- statement -| 'goto'- e:expression { epc= pc; if ((pc= findLine(e.number, 0)) < 0) error("no such line"); } -| 'input'- var-list -| 'let'- v:var EQUAL e:expression { variables[v.number]= e.number; } -| 'gosub'- e:expression { epc= pc; if (sp < 1024) stack[sp++]= pc, pc= findLine(e.number, 0); else error("too many gosubs"); - if (pc < 0) error("no such line"); } -| 'return'- { epc= pc; if ((pc= sp ? stack[--sp] : -1) < 0) error("no gosub"); } -| 'clear'- { while (numLines) accept(lines->number, "\n"); } -| 'list'- { int i; for (i= 0; i < numLines; ++i) printf("%5d %s", lines[i].number, lines[i].text); } -| 'run'- s:string { load(s.string); pc= 0; } -| 'run'- { pc= 0; } -| 'end'- { pc= -1; if (batch) exit(0); } -| 'rem'- ( !CR . )* -| ('bye'|'quit'|'exit')- { exit(0); } -| 'save'- s:string { save(s.string); } -| 'load'- s:string { load(s.string); } -| 'type'- s:string { type(s.string); } -| 'dir'- { system("ls *.bas"); } -| 'help'- { fprintf(stderr, "%s", help); } - -expr-list = ( e:string { printf("%s", e.string); } - | e:expression { printf("%d", e.number); } - )? ( COMMA ( e:string { printf("%s", e.string); } - | e:expression { printf("%d", e.number); } - ) - )* ( COMMA - | !COMMA { printf("\n"); } - ) - -var-list = v:var { variables[v.number]= input(); } - ( COMMA v:var { variables[v.number]= input(); } - )* - -expression = ( PLUS? l:term - | MINUS l:term { l.number = -l.number } - ) ( PLUS r:term { l.number += r.number } - | MINUS r:term { l.number -= r.number } - )* { $$.number = l.number } - -term = l:factor ( STAR r:factor { l.number *= r.number } - | SLASH r:factor { l.number /= r.number } - )* { $$.number = l.number } - -factor = v:var { $$.number = variables[v.number] } -| n:number -| OPEN expression CLOSE - -var = < [a-z] > - { $$.number = yytext[0] - 'a' } - -number = < digit+ > - { $$.number = atoi(yytext); } - -digit = [0-9] - -string = '"' < [^\"]* > '"' - { $$.string = yytext; } - -relop = '<=' - { $$.binop= lessEqual; } -| '<>' - { $$.binop= notEqual; } -| '<' - { $$.binop= lessThan; } -| '>=' - { $$.binop= greaterEqual; } -| '>' - { $$.binop= greaterThan; } -| '=' - { $$.binop= equalTo; } - -EQUAL = '=' - CLOSE = ')' - OPEN = '(' - -SLASH = '/' - STAR = '*' - MINUS = '-' - -PLUS = '+' - COMMA = ',' - - -- = [ \t]* - -CR = '\n' | '\r' | '\r\n' - -%% - -#include -#include - -char *help= - "print | [, | ...] [,]\n" - "if <|<=|<>|=|>=|> then \n" - "input [, ...] let = \n" - "goto gosub \n" - "end return\n" - "list clear\n" - "run [\"filename\"] rem \n" - "dir type \"filename\"\n" - "save \"filename\" load \"filename\"\n" - "bye|quit|exit help\n" - ; - -void error(char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - if (epc > 0) - fprintf(stderr, "\nline %d: %s", lines[epc-1].number, lines[epc-1].text); - else - fprintf(stderr, "\n"); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); - epc= pc= -1; -} - -#ifdef USE_READLINE -# include -# include -#endif - -int nextline(char *buf, int max) -{ - pc= -1; - if (batch) exit(0); - if (isatty(fileno(stdin))) - { -# ifdef USE_READLINE - char *line= readline(">"); - if (line) - { - int len= strlen(line); - if (len >= max) len= max - 1; - strncpy(buf, line, len); - (buf)[len]= '\n'; - add_history(line); - free(line); - return len + 1; - } - else - { - printf("\n"); - return 0; - } -# endif - putchar('>'); - fflush(stdout); - } - return fgets(buf, max, stdin) ? strlen(buf) : 0; -} - -int maxLines= 0; - -int findLine(int n, int create) -{ - int lo= 0, hi= numLines - 1; - while (lo <= hi) - { - int mid= (lo + hi) / 2, lno= lines[mid].number; - if (lno > n) - hi= mid - 1; - else if (lno < n) - lo= mid + 1; - else - return mid; - } - if (create) - { - if (numLines == maxLines) - { - maxLines *= 2; - lines= realloc(lines, sizeof(line) * maxLines); - } - if (lo < numLines) - memmove(lines + lo + 1, lines + lo, sizeof(line) * (numLines - lo)); - ++numLines; - lines[lo].number= n; - lines[lo].text= 0; - return lo; - } - return -1; -} - -void accept(int n, char *s) -{ - if (s[0] < 32) /* delete */ - { - int lno= findLine(n, 0); - if (lno >= 0) - { - if (lno < numLines - 1) - memmove(lines + lno, lines + lno + 1, sizeof(line) * (numLines - lno - 1)); - --numLines; - } - } - else /* insert */ - { - int lno= findLine(n, 1); - if (lines[lno].text) free(lines[lno].text); - lines[lno].length= strlen(s); - lines[lno].text= strdup(s); - } -} - -char *extend(char *name) -{ - static char path[1024]; - int len= strlen(name); - sprintf(path, "%s%s", name, (((len > 4) && !strcasecmp(".bas", name + len - 4)) ? "" : ".bas")); - return path; -} - -void save(char *name) -{ - FILE *f= fopen(name= extend(name), "w"); - if (!f) - perror(name); - else - { - int i; - for (i= 0; i < numLines; ++i) - fprintf(f, "%d %s", lines[i].number, lines[i].text); - fclose(f); - } -} - -void load(char *name) -{ - FILE *f= fopen(name= extend(name), "r"); - if (!f) - perror(name); - else - { - int lineNumber; - char lineText[1024]; - while ((1 == fscanf(f, " %d ", &lineNumber)) && fgets(lineText, sizeof(lineText), f)) - accept(lineNumber, lineText); - fclose(f); - } -} - -void type(char *name) -{ - FILE *f= fopen(name= extend(name), "r"); - if (!f) - perror(name); - else - { - int c, d; - while ((c= getc(f)) >= 0) - putchar(d= c); - fclose(f); - if ('\n' != d && '\r' != d) putchar('\n'); - } -} - -int input(void) -{ - char line[32]; - fgets(line, sizeof(line), stdin); - return atoi(line); -} - -int main(int argc, char **argv) -{ - lines= malloc(sizeof(line) * (maxLines= 32)); - numLines= 0; - - if (argc > 1) - { - batch= 1; - while (argc-- > 1) - load(*++argv); - pc= 0; - } - - while (!feof(stdin)) - yyparse(); - - return 0; -} diff --git a/peg-0.1.9/examples/basic.ref b/peg-0.1.9/examples/basic.ref deleted file mode 100644 index 90d916c8..00000000 --- a/peg-0.1.9/examples/basic.ref +++ /dev/null @@ -1,10 +0,0 @@ - 1 - 2 4 - 3 6 9 - 4 8 12 16 - 5 10 15 20 25 - 6 12 18 24 30 36 - 7 14 21 28 35 42 49 - 8 16 24 32 40 48 56 64 - 9 18 27 36 45 54 63 72 81 - 10 20 30 40 50 60 70 80 90 100 diff --git a/peg-0.1.9/examples/bench.bas b/peg-0.1.9/examples/bench.bas deleted file mode 100644 index ffdbd44f..00000000 --- a/peg-0.1.9/examples/bench.bas +++ /dev/null @@ -1,8 +0,0 @@ -100 let n=100000 -120 let m=0 -110 let s=0 -130 let m=m+1 -140 let s=s+m -150 if m -int vars[26]; -%} - -Stmt = - e:Expr EOL { printf("%d\n", e); } - | ( !EOL . )* EOL { printf("error\n"); } - -Expr = i:ID ASSIGN s:Sum { $$= vars[i]= s; } - | s:Sum { $$= s; } - -Sum = l:Product - ( PLUS r:Product { l += r; } - | MINUS r:Product { l -= r; } - )* { $$= l; } - -Product = l:Value - ( TIMES r:Value { l *= r; } - | DIVIDE r:Value { l /= r; } - )* { $$= l; } - -Value = i:NUMBER { $$= atoi(yytext); } - | i:ID !ASSIGN { $$= vars[i]; } - | OPEN i:Expr CLOSE { $$= i; } - -NUMBER = < [0-9]+ > - { $$= atoi(yytext); } -ID = < [a-z] > - { $$= yytext[0] - 'a'; } -ASSIGN = '=' - -PLUS = '+' - -MINUS = '-' - -TIMES = '*' - -DIVIDE = '/' - -OPEN = '(' - -CLOSE = ')' - - -- = [ \t]* -EOL = '\n' | '\r\n' | '\r' | ';' - -%% - -int main() -{ - while (yyparse()); - - return 0; -} diff --git a/peg-0.1.9/examples/calc.ref b/peg-0.1.9/examples/calc.ref deleted file mode 100644 index dbd7d59e..00000000 --- a/peg-0.1.9/examples/calc.ref +++ /dev/null @@ -1,3 +0,0 @@ -6 -7 -42 diff --git a/peg-0.1.9/examples/dc.c b/peg-0.1.9/examples/dc.c deleted file mode 100644 index 32bf1a54..00000000 --- a/peg-0.1.9/examples/dc.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int stack[1024]; -int stackp= -1; - -int push(int n) { return stack[++stackp]= n; } -int pop(void) { return stack[stackp--]; } - -#include "dc.peg.c" - -int main() -{ - while (yyparse()); - - return 0; -} diff --git a/peg-0.1.9/examples/dc.peg b/peg-0.1.9/examples/dc.peg deleted file mode 100644 index 75dcb671..00000000 --- a/peg-0.1.9/examples/dc.peg +++ /dev/null @@ -1,27 +0,0 @@ -# Grammar - -Expr <- SPACE Sum EOL { printf("%d\n", pop()); } - / (!EOL .)* EOL { printf("error\n"); } - -Sum <- Product ( PLUS Product { int r= pop(), l= pop(); push(l + r); } - / MINUS Product { int r= pop(), l= pop(); push(l - r); } - )* - -Product <- Value ( TIMES Value { int r= pop(), l= pop(); push(l * r); } - / DIVIDE Value { int r= pop(), l= pop(); push(l / r); } - )* - -Value <- NUMBER { push(atoi(yytext)); } - / OPEN Sum CLOSE - -# Lexemes - -NUMBER <- < [0-9]+ > SPACE -PLUS <- '+' SPACE -MINUS <- '-' SPACE -TIMES <- '*' SPACE -DIVIDE <- '/' SPACE -OPEN <- '(' SPACE -CLOSE <- ')' SPACE -SPACE <- [ \t]* -EOL <- '\n' / '\r\n' / '\r' diff --git a/peg-0.1.9/examples/dc.ref b/peg-0.1.9/examples/dc.ref deleted file mode 100644 index d81cc071..00000000 --- a/peg-0.1.9/examples/dc.ref +++ /dev/null @@ -1 +0,0 @@ -42 diff --git a/peg-0.1.9/examples/dcv.c b/peg-0.1.9/examples/dcv.c deleted file mode 100644 index 0c5c46d8..00000000 --- a/peg-0.1.9/examples/dcv.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -int stack[1024]; -int stackp= -1; -int var= 0; -int vars[26]; - -int push(int n) { return stack[++stackp]= n; } -int pop(void) { return stack[stackp--]; } -int top(void) { return stack[stackp]; } - -#include "dcv.peg.c" - -int main() -{ - while (yyparse()); - - return 0; -} diff --git a/peg-0.1.9/examples/dcv.peg b/peg-0.1.9/examples/dcv.peg deleted file mode 100644 index 2ae3a8cb..00000000 --- a/peg-0.1.9/examples/dcv.peg +++ /dev/null @@ -1,34 +0,0 @@ -# Grammar - -Stmt <- SPACE Expr EOL { printf("%d\n", pop()); } - / (!EOL .)* EOL { printf("error\n"); } - -Expr <- ID { var= yytext[0] } ASSIGN Sum { vars[var - 'a']= top(); } - / Sum - -Sum <- Product ( PLUS Product { int r= pop(), l= pop(); push(l + r); } - / MINUS Product { int r= pop(), l= pop(); push(l - r); } - )* - -Product <- Value ( TIMES Value { int r= pop(), l= pop(); push(l * r); } - / DIVIDE Value { int r= pop(), l= pop(); push(l / r); } - )* - -Value <- NUMBER { push(atoi(yytext)); } - / < ID > !ASSIGN { push(vars[yytext[0] - 'a']); } - / OPEN Expr CLOSE - -# Lexemes - -NUMBER <- < [0-9]+ > SPACE -ID <- < [a-z] > SPACE -ASSIGN <- '=' SPACE -PLUS <- '+' SPACE -MINUS <- '-' SPACE -TIMES <- '*' SPACE -DIVIDE <- '/' SPACE -OPEN <- '(' SPACE -CLOSE <- ')' SPACE - -SPACE <- [ \t]* -EOL <- '\n' / '\r\n' / '\r' / ';' diff --git a/peg-0.1.9/examples/dcv.ref b/peg-0.1.9/examples/dcv.ref deleted file mode 100644 index dbd7d59e..00000000 --- a/peg-0.1.9/examples/dcv.ref +++ /dev/null @@ -1,3 +0,0 @@ -6 -7 -42 diff --git a/peg-0.1.9/examples/fibonacci.bas b/peg-0.1.9/examples/fibonacci.bas deleted file mode 100644 index 1872bd3b..00000000 --- a/peg-0.1.9/examples/fibonacci.bas +++ /dev/null @@ -1,17 +0,0 @@ -100 let n=32 -110 gosub 200 -120 print "fibonacci(",n,") = ", m -130 end - -200 let c=n -210 let b=1 -220 if c<2 then goto 400 -230 let c=c-1 -240 let a=1 -300 let c=c-1 -310 let d=a+b -320 let a=b -330 let b=d+1 -340 if c<>0 then goto 300 -400 let m=b -410 return diff --git a/peg-0.1.9/examples/left.c b/peg-0.1.9/examples/left.c deleted file mode 100644 index ac8cd0bd..00000000 --- a/peg-0.1.9/examples/left.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#define YY_INPUT(buf, result, max) \ -{ \ - int c= getchar(); \ - result= (EOF == c) ? 0 : (*(buf)= c, 1); \ - if (EOF != c) printf("<%c>\n", c); \ -} - -#include "left.peg.c" - -int main() -{ - printf(yyparse() ? "success\n" : "failure\n"); - - return 0; -} diff --git a/peg-0.1.9/examples/left.peg b/peg-0.1.9/examples/left.peg deleted file mode 100644 index f282227d..00000000 --- a/peg-0.1.9/examples/left.peg +++ /dev/null @@ -1,3 +0,0 @@ -# Grammar - -S <- (S 'a' / 'a') !'a' diff --git a/peg-0.1.9/examples/localctx.c b/peg-0.1.9/examples/localctx.c deleted file mode 100644 index 837ebc88..00000000 --- a/peg-0.1.9/examples/localctx.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -#define YY_CTX_LOCAL - -#include "test.peg.c" - -int main() -{ - yycontext ctx; - memset(&ctx, 0, sizeof(yycontext)); - while (yyparse(&ctx)); - return 0; -} diff --git a/peg-0.1.9/examples/localctx.ref b/peg-0.1.9/examples/localctx.ref deleted file mode 100644 index 2d181091..00000000 --- a/peg-0.1.9/examples/localctx.ref +++ /dev/null @@ -1,10 +0,0 @@ -a1 ab1 . -a2 ac2 . -a3 ad3 . -a3 ae3 . -a4 af4 afg4 . -a4 af5 afh5 . -a4 af4 afg4 . -a4 af5 afh5 . -af6 afi6 a6 . -af6 af7 afj7 a6 . diff --git a/peg-0.1.9/examples/rule.c b/peg-0.1.9/examples/rule.c deleted file mode 100644 index 15eb0c64..00000000 --- a/peg-0.1.9/examples/rule.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include - -#include "rule.peg.c" - -int main() -{ - while (yyparse()); - - return 0; -} diff --git a/peg-0.1.9/examples/rule.peg b/peg-0.1.9/examples/rule.peg deleted file mode 100644 index 60a32faa..00000000 --- a/peg-0.1.9/examples/rule.peg +++ /dev/null @@ -1,8 +0,0 @@ -start <- abcd+ - -abcd <- 'a' { printf("A %d\n", yypos); } bc { printf("ABC %d\n", yypos); } - / 'b' { printf("B %d\n", yypos); } cd { printf("BCD %d\n", yypos); } - -bc <- 'b' { printf("B %d\n", yypos); } 'c' { printf("C %d\n", yypos); } - -cd <- 'c' { printf("C %d\n", yypos); } 'd' { printf("D %d\n", yypos); } diff --git a/peg-0.1.9/examples/rule.ref b/peg-0.1.9/examples/rule.ref deleted file mode 100644 index 4249ebec..00000000 --- a/peg-0.1.9/examples/rule.ref +++ /dev/null @@ -1,32 +0,0 @@ -A 24 -B 24 -C 24 -ABC 24 -B 24 -C 24 -D 24 -BCD 24 -A 24 -B 24 -C 24 -ABC 24 -B 24 -C 24 -D 24 -BCD 24 -A 24 -B 24 -C 24 -ABC 24 -B 24 -C 24 -D 24 -BCD 24 -A 24 -B 24 -C 24 -ABC 24 -B 24 -C 24 -D 24 -BCD 24 diff --git a/peg-0.1.9/examples/test.bas b/peg-0.1.9/examples/test.bas deleted file mode 100644 index 8a96e107..00000000 --- a/peg-0.1.9/examples/test.bas +++ /dev/null @@ -1,12 +0,0 @@ -10 let i=1 -20 gosub 100 -30 let i=i+1 -40 if i<=10 then goto 20 -50 end - -100 let j=1 -110 print " ", i*j, -120 let j=j+1 -130 if j<=i then goto 110 -140 print -150 return diff --git a/peg-0.1.9/examples/test.c b/peg-0.1.9/examples/test.c deleted file mode 100644 index 0403422c..00000000 --- a/peg-0.1.9/examples/test.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include "test.peg.c" - -int main() -{ - while (yyparse()); - return 0; -} diff --git a/peg-0.1.9/examples/test.peg b/peg-0.1.9/examples/test.peg deleted file mode 100644 index 716d5237..00000000 --- a/peg-0.1.9/examples/test.peg +++ /dev/null @@ -1,13 +0,0 @@ -start <- body '.' { printf(".\n"); } - -body <- 'a' { printf("a1 "); } 'b' { printf("ab1 "); } - - / 'a' { printf("a2 "); } 'c' { printf("ac2 "); } - - / 'a' { printf("a3 "); } ( 'd' { printf("ad3 "); } / 'e' { printf("ae3 "); } ) - - / 'a' { printf("a4 "); } ( 'f' { printf("af4 "); } 'g' { printf("afg4 "); } - / 'f' { printf("af5 "); } 'h' { printf("afh5 "); } ) - - / 'a' { printf("a6 "); } ( 'f' &{ printf("af6 ") } 'i' &{ printf("afi6 ") } - / 'f' &{ printf("af7 ") } 'j' &{ printf("afj7 ") } ) diff --git a/peg-0.1.9/examples/test.ref b/peg-0.1.9/examples/test.ref deleted file mode 100644 index 2d181091..00000000 --- a/peg-0.1.9/examples/test.ref +++ /dev/null @@ -1,10 +0,0 @@ -a1 ab1 . -a2 ac2 . -a3 ad3 . -a3 ae3 . -a4 af4 afg4 . -a4 af5 afh5 . -a4 af4 afg4 . -a4 af5 afh5 . -af6 afi6 a6 . -af6 af7 afj7 a6 . diff --git a/peg-0.1.9/examples/username.leg b/peg-0.1.9/examples/username.leg deleted file mode 100644 index 2170052a..00000000 --- a/peg-0.1.9/examples/username.leg +++ /dev/null @@ -1,14 +0,0 @@ -%{ -#include -%} - -start = "username" { printf("%s", getlogin()); } -| < . > { putchar(yytext[0]); } - -%% - -int main() -{ - while (yyparse()); - return 0; -} diff --git a/peg-0.1.9/examples/wc.leg b/peg-0.1.9/examples/wc.leg deleted file mode 100644 index 59199c89..00000000 --- a/peg-0.1.9/examples/wc.leg +++ /dev/null @@ -1,22 +0,0 @@ -%{ -#include -int lines= 0, words= 0, chars= 0; -%} - -start = (line | word | char) - -line = < (( '\n' '\r'* ) | ( '\r' '\n'* )) > { lines++; chars += yyleng; } -word = < [a-zA-Z]+ > { words++; chars += yyleng; printf("<%s>\n", yytext); } -char = . { chars++; } - -%% - -int main() -{ - while (yyparse()) - ; - printf("%d lines\n", lines); - printf("%d chars\n", chars); - printf("%d words\n", words); - return 0; -} diff --git a/peg-0.1.9/examples/wc.ref b/peg-0.1.9/examples/wc.ref deleted file mode 100644 index 083a46e6..00000000 --- a/peg-0.1.9/examples/wc.ref +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - -22 lines -425 chars -52 words diff --git a/peg-0.1.9/leg.c b/peg-0.1.9/leg.c deleted file mode 100644 index 91b696d1..00000000 --- a/peg-0.1.9/leg.c +++ /dev/null @@ -1,1209 +0,0 @@ -/* A recursive-descent parser generated by peg 0.1.9 */ - -#include -#include -#include -#define YYRULECOUNT 36 - -# include "tree.h" -# include "version.h" - -# include -# include -# include -# include -# include -# include - - typedef struct Header Header; - - struct Header { - char *text; - Header *next; - }; - - FILE *input= 0; - - int verboseFlag= 0; - - static int lineNumber= 0; - static char *fileName= 0; - static char *trailer= 0; - static Header *headers= 0; - - void makeHeader(char *text); - void makeTrailer(char *text); - - void yyerror(char *message); - -# define YY_INPUT(buf, result, max) \ - { \ - int c= getc(input); \ - if ('\n' == c || '\r' == c) ++lineNumber; \ - result= (EOF == c) ? 0 : (*(buf)= c, 1); \ - } - -# define YY_LOCAL(T) static T -# define YY_RULE(T) static T - -#ifndef YY_LOCAL -#define YY_LOCAL(T) static T -#endif -#ifndef YY_ACTION -#define YY_ACTION(T) static T -#endif -#ifndef YY_RULE -#define YY_RULE(T) static T -#endif -#ifndef YY_PARSE -#define YY_PARSE(T) T -#endif -#ifndef YYPARSE -#define YYPARSE yyparse -#endif -#ifndef YYPARSEFROM -#define YYPARSEFROM yyparsefrom -#endif -#ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { \ - int yyc= getchar(); \ - result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ - yyprintf((stderr, "<%c>", yyc)); \ - } -#endif -#ifndef YY_BEGIN -#define YY_BEGIN ( ctx->begin= ctx->pos, 1) -#endif -#ifndef YY_END -#define YY_END ( ctx->end= ctx->pos, 1) -#endif -#ifdef YY_DEBUG -# define yyprintf(args) fprintf args -#else -# define yyprintf(args) -#endif -#ifndef YYSTYPE -#define YYSTYPE int -#endif - -#ifndef YY_PART - -typedef struct _yycontext yycontext; -typedef void (*yyaction)(yycontext *ctx, char *yytext, int yyleng); -typedef struct _yythunk { int begin, end; yyaction action; struct _yythunk *next; } yythunk; - -struct _yycontext { - char *buf; - int buflen; - int pos; - int limit; - char *text; - int textlen; - int begin; - int end; - int textmax; - yythunk *thunks; - int thunkslen; - int thunkpos; - YYSTYPE yy; - YYSTYPE *val; - YYSTYPE *vals; - int valslen; -#ifdef YY_CTX_MEMBERS - YY_CTX_MEMBERS -#endif -}; - -#ifdef YY_CTX_LOCAL -#define YY_CTX_PARAM_ yycontext *yyctx, -#define YY_CTX_PARAM yycontext *yyctx -#define YY_CTX_ARG_ yyctx, -#define YY_CTX_ARG yyctx -#else -#define YY_CTX_PARAM_ -#define YY_CTX_PARAM -#define YY_CTX_ARG_ -#define YY_CTX_ARG -yycontext yyctx0; -yycontext *yyctx= &yyctx0; -#endif - -YY_LOCAL(int) yyrefill(yycontext *ctx) -{ - int yyn; - while (ctx->buflen - ctx->pos < 512) - { - ctx->buflen *= 2; - ctx->buf= (char *)realloc(ctx->buf, ctx->buflen); - } - YY_INPUT((ctx->buf + ctx->pos), yyn, (ctx->buflen - ctx->pos)); - if (!yyn) return 0; - ctx->limit += yyn; - return 1; -} - -YY_LOCAL(int) yymatchDot(yycontext *ctx) -{ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0; - ++ctx->pos; - return 1; -} - -YY_LOCAL(int) yymatchChar(yycontext *ctx, int c) -{ - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0; - if ((unsigned char)ctx->buf[ctx->pos] == c) - { - ++ctx->pos; - yyprintf((stderr, " ok yymatchChar(ctx, %c) @ %s\n", c, ctx->buf+ctx->pos)); - return 1; - } - yyprintf((stderr, " fail yymatchChar(ctx, %c) @ %s\n", c, ctx->buf+ctx->pos)); - return 0; -} - -YY_LOCAL(int) yymatchString(yycontext *ctx, char *s) -{ - int yysav= ctx->pos; - while (*s) - { - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0; - if (ctx->buf[ctx->pos] != *s) - { - ctx->pos= yysav; - return 0; - } - ++s; - ++ctx->pos; - } - return 1; -} - -YY_LOCAL(int) yymatchClass(yycontext *ctx, unsigned char *bits) -{ - int c; - if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0; - c= (unsigned char)ctx->buf[ctx->pos]; - if (bits[c >> 3] & (1 << (c & 7))) - { - ++ctx->pos; - yyprintf((stderr, " ok yymatchClass @ %s\n", ctx->buf+ctx->pos)); - return 1; - } - yyprintf((stderr, " fail yymatchClass @ %s\n", ctx->buf+ctx->pos)); - return 0; -} - -YY_LOCAL(void) yyDo(yycontext *ctx, yyaction action, int begin, int end) -{ - while (ctx->thunkpos >= ctx->thunkslen) - { - ctx->thunkslen *= 2; - ctx->thunks= (yythunk *)realloc(ctx->thunks, sizeof(yythunk) * ctx->thunkslen); - } - ctx->thunks[ctx->thunkpos].begin= begin; - ctx->thunks[ctx->thunkpos].end= end; - ctx->thunks[ctx->thunkpos].action= action; - ++ctx->thunkpos; -} - -YY_LOCAL(int) yyText(yycontext *ctx, int begin, int end) -{ - int yyleng= end - begin; - if (yyleng <= 0) - yyleng= 0; - else - { - while (ctx->textlen < (yyleng + 1)) - { - ctx->textlen *= 2; - ctx->text= (char *)realloc(ctx->text, ctx->textlen); - } - memcpy(ctx->text, ctx->buf + begin, yyleng); - } - ctx->text[yyleng]= '\0'; - return yyleng; -} - -YY_LOCAL(void) yyDone(yycontext *ctx) -{ - int pos; - for (pos= 0; pos < ctx->thunkpos; ++pos) - { - yythunk *thunk= &ctx->thunks[pos]; - int yyleng= thunk->end ? yyText(ctx, thunk->begin, thunk->end) : thunk->begin; - yyprintf((stderr, "DO [%d] %p %s\n", pos, thunk->action, ctx->text)); - thunk->action(ctx, ctx->text, yyleng); - } - ctx->thunkpos= 0; -} - -YY_LOCAL(void) yyCommit(yycontext *ctx) -{ - if ((ctx->limit -= ctx->pos)) - { - memmove(ctx->buf, ctx->buf + ctx->pos, ctx->limit); - } - ctx->begin -= ctx->pos; - ctx->end -= ctx->pos; - ctx->pos= ctx->thunkpos= 0; -} - -YY_LOCAL(int) yyAccept(yycontext *ctx, int tp0) -{ - if (tp0) - { - fprintf(stderr, "accept denied at %d\n", tp0); - return 0; - } - else - { - yyDone(ctx); - yyCommit(ctx); - } - return 1; -} - -YY_LOCAL(void) yyPush(yycontext *ctx, char *text, int count) { ctx->val += count; } -YY_LOCAL(void) yyPop(yycontext *ctx, char *text, int count) { ctx->val -= count; } -YY_LOCAL(void) yySet(yycontext *ctx, char *text, int count) { ctx->val[count]= ctx->yy; } - -#endif /* YY_PART */ - -#define YYACCEPT yyAccept(ctx, yythunkpos0) - -YY_RULE(int) yy_end_of_line(yycontext *ctx); /* 36 */ -YY_RULE(int) yy_comment(yycontext *ctx); /* 35 */ -YY_RULE(int) yy_space(yycontext *ctx); /* 34 */ -YY_RULE(int) yy_braces(yycontext *ctx); /* 33 */ -YY_RULE(int) yy_range(yycontext *ctx); /* 32 */ -YY_RULE(int) yy_char(yycontext *ctx); /* 31 */ -YY_RULE(int) yy_END(yycontext *ctx); /* 30 */ -YY_RULE(int) yy_BEGIN(yycontext *ctx); /* 29 */ -YY_RULE(int) yy_DOT(yycontext *ctx); /* 28 */ -YY_RULE(int) yy_class(yycontext *ctx); /* 27 */ -YY_RULE(int) yy_literal(yycontext *ctx); /* 26 */ -YY_RULE(int) yy_CLOSE(yycontext *ctx); /* 25 */ -YY_RULE(int) yy_OPEN(yycontext *ctx); /* 24 */ -YY_RULE(int) yy_COLON(yycontext *ctx); /* 23 */ -YY_RULE(int) yy_PLUS(yycontext *ctx); /* 22 */ -YY_RULE(int) yy_STAR(yycontext *ctx); /* 21 */ -YY_RULE(int) yy_QUESTION(yycontext *ctx); /* 20 */ -YY_RULE(int) yy_primary(yycontext *ctx); /* 19 */ -YY_RULE(int) yy_NOT(yycontext *ctx); /* 18 */ -YY_RULE(int) yy_suffix(yycontext *ctx); /* 17 */ -YY_RULE(int) yy_action(yycontext *ctx); /* 16 */ -YY_RULE(int) yy_AND(yycontext *ctx); /* 15 */ -YY_RULE(int) yy_prefix(yycontext *ctx); /* 14 */ -YY_RULE(int) yy_BAR(yycontext *ctx); /* 13 */ -YY_RULE(int) yy_sequence(yycontext *ctx); /* 12 */ -YY_RULE(int) yy_SEMICOLON(yycontext *ctx); /* 11 */ -YY_RULE(int) yy_expression(yycontext *ctx); /* 10 */ -YY_RULE(int) yy_EQUAL(yycontext *ctx); /* 9 */ -YY_RULE(int) yy_identifier(yycontext *ctx); /* 8 */ -YY_RULE(int) yy_RPERCENT(yycontext *ctx); /* 7 */ -YY_RULE(int) yy_end_of_file(yycontext *ctx); /* 6 */ -YY_RULE(int) yy_trailer(yycontext *ctx); /* 5 */ -YY_RULE(int) yy_definition(yycontext *ctx); /* 4 */ -YY_RULE(int) yy_declaration(yycontext *ctx); /* 3 */ -YY_RULE(int) yy__(yycontext *ctx); /* 2 */ -YY_RULE(int) yy_grammar(yycontext *ctx); /* 1 */ - -YY_ACTION(void) yy_9_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_9_primary\n")); - push(makePredicate("YY_END")); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_8_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_8_primary\n")); - push(makePredicate("YY_BEGIN")); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_7_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_7_primary\n")); - push(makeAction(yytext)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_6_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_6_primary\n")); - push(makeDot()); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_5_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_5_primary\n")); - push(makeClass(yytext)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_4_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_4_primary\n")); - push(makeString(yytext)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_3_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_3_primary\n")); - push(makeName(findRule(yytext))); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_2_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_2_primary\n")); - Node *name= makeName(findRule(yytext)); name->name.variable= pop(); push(name); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_primary(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_primary\n")); - push(makeVariable(yytext)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_3_suffix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_3_suffix\n")); - push(makePlus (pop())); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_2_suffix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_2_suffix\n")); - push(makeStar (pop())); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_suffix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_suffix\n")); - push(makeQuery(pop())); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_3_prefix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_3_prefix\n")); - push(makePeekNot(pop())); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_2_prefix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_2_prefix\n")); - push(makePeekFor(pop())); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_prefix(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_prefix\n")); - push(makePredicate(yytext)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_sequence(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_sequence\n")); - Node *f= pop(); push(Sequence_append(pop(), f)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_expression(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_expression\n")); - Node *f= pop(); push(Alternate_append(pop(), f)); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_2_definition(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_2_definition\n")); - Node *e= pop(); Rule_setExpression(pop(), e); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_definition(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_definition\n")); - if (push(beginRule(findRule(yytext)))->rule.expression) - fprintf(stderr, "rule '%s' redefined\n", yytext); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_trailer(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_trailer\n")); - makeTrailer(yytext); ; -#undef yythunkpos -#undef yypos -#undef yy -} -YY_ACTION(void) yy_1_declaration(yycontext *ctx, char *yytext, int yyleng) -{ -#define yy ctx->yy -#define yypos ctx->pos -#define yythunkpos ctx->thunkpos - yyprintf((stderr, "do yy_1_declaration\n")); - makeHeader(yytext); ; -#undef yythunkpos -#undef yypos -#undef yy -} - -YY_RULE(int) yy_end_of_line(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "end_of_line")); - { int yypos2= ctx->pos, yythunkpos2= ctx->thunkpos; if (!yymatchString(ctx, "\r\n")) goto l3; goto l2; - l3:; ctx->pos= yypos2; ctx->thunkpos= yythunkpos2; if (!yymatchChar(ctx, '\n')) goto l4; goto l2; - l4:; ctx->pos= yypos2; ctx->thunkpos= yythunkpos2; if (!yymatchChar(ctx, '\r')) goto l1; - } - l2:; - yyprintf((stderr, " ok %s @ %s\n", "end_of_line", ctx->buf+ctx->pos)); - return 1; - l1:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "end_of_line", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_comment(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "comment")); if (!yymatchChar(ctx, '#')) goto l5; - l6:; - { int yypos7= ctx->pos, yythunkpos7= ctx->thunkpos; - { int yypos8= ctx->pos, yythunkpos8= ctx->thunkpos; if (!yy_end_of_line(ctx)) goto l8; goto l7; - l8:; ctx->pos= yypos8; ctx->thunkpos= yythunkpos8; - } if (!yymatchDot(ctx)) goto l7; goto l6; - l7:; ctx->pos= yypos7; ctx->thunkpos= yythunkpos7; - } if (!yy_end_of_line(ctx)) goto l5; - yyprintf((stderr, " ok %s @ %s\n", "comment", ctx->buf+ctx->pos)); - return 1; - l5:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "comment", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_space(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "space")); - { int yypos10= ctx->pos, yythunkpos10= ctx->thunkpos; if (!yymatchChar(ctx, ' ')) goto l11; goto l10; - l11:; ctx->pos= yypos10; ctx->thunkpos= yythunkpos10; if (!yymatchChar(ctx, '\t')) goto l12; goto l10; - l12:; ctx->pos= yypos10; ctx->thunkpos= yythunkpos10; if (!yy_end_of_line(ctx)) goto l9; - } - l10:; - yyprintf((stderr, " ok %s @ %s\n", "space", ctx->buf+ctx->pos)); - return 1; - l9:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "space", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_braces(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "braces")); - { int yypos14= ctx->pos, yythunkpos14= ctx->thunkpos; if (!yymatchChar(ctx, '{')) goto l15; - l16:; - { int yypos17= ctx->pos, yythunkpos17= ctx->thunkpos; if (!yy_braces(ctx)) goto l17; goto l16; - l17:; ctx->pos= yypos17; ctx->thunkpos= yythunkpos17; - } if (!yymatchChar(ctx, '}')) goto l15; goto l14; - l15:; ctx->pos= yypos14; ctx->thunkpos= yythunkpos14; - { int yypos18= ctx->pos, yythunkpos18= ctx->thunkpos; if (!yymatchChar(ctx, '}')) goto l18; goto l13; - l18:; ctx->pos= yypos18; ctx->thunkpos= yythunkpos18; - } if (!yymatchDot(ctx)) goto l13; - } - l14:; - yyprintf((stderr, " ok %s @ %s\n", "braces", ctx->buf+ctx->pos)); - return 1; - l13:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "braces", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_range(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "range")); - { int yypos20= ctx->pos, yythunkpos20= ctx->thunkpos; if (!yy_char(ctx)) goto l21; if (!yymatchChar(ctx, '-')) goto l21; if (!yy_char(ctx)) goto l21; goto l20; - l21:; ctx->pos= yypos20; ctx->thunkpos= yythunkpos20; if (!yy_char(ctx)) goto l19; - } - l20:; - yyprintf((stderr, " ok %s @ %s\n", "range", ctx->buf+ctx->pos)); - return 1; - l19:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "range", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_char(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "char")); - { int yypos23= ctx->pos, yythunkpos23= ctx->thunkpos; if (!yymatchChar(ctx, '\\')) goto l24; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\204\040\000\000\000\000\000\070\146\100\124\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l24; goto l23; - l24:; ctx->pos= yypos23; ctx->thunkpos= yythunkpos23; if (!yymatchChar(ctx, '\\')) goto l25; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\000\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l25; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l25; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l25; goto l23; - l25:; ctx->pos= yypos23; ctx->thunkpos= yythunkpos23; if (!yymatchChar(ctx, '\\')) goto l26; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l26; - { int yypos27= ctx->pos, yythunkpos27= ctx->thunkpos; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l27; goto l28; - l27:; ctx->pos= yypos27; ctx->thunkpos= yythunkpos27; - } - l28:; goto l23; - l26:; ctx->pos= yypos23; ctx->thunkpos= yythunkpos23; - { int yypos29= ctx->pos, yythunkpos29= ctx->thunkpos; if (!yymatchChar(ctx, '\\')) goto l29; goto l22; - l29:; ctx->pos= yypos29; ctx->thunkpos= yythunkpos29; - } if (!yymatchDot(ctx)) goto l22; - } - l23:; - yyprintf((stderr, " ok %s @ %s\n", "char", ctx->buf+ctx->pos)); - return 1; - l22:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "char", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_END(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "END")); if (!yymatchChar(ctx, '>')) goto l30; if (!yy__(ctx)) goto l30; - yyprintf((stderr, " ok %s @ %s\n", "END", ctx->buf+ctx->pos)); - return 1; - l30:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "END", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_BEGIN(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "BEGIN")); if (!yymatchChar(ctx, '<')) goto l31; if (!yy__(ctx)) goto l31; - yyprintf((stderr, " ok %s @ %s\n", "BEGIN", ctx->buf+ctx->pos)); - return 1; - l31:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "BEGIN", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_DOT(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "DOT")); if (!yymatchChar(ctx, '.')) goto l32; if (!yy__(ctx)) goto l32; - yyprintf((stderr, " ok %s @ %s\n", "DOT", ctx->buf+ctx->pos)); - return 1; - l32:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "DOT", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_class(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "class")); if (!yymatchChar(ctx, '[')) goto l33; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l33; - l34:; - { int yypos35= ctx->pos, yythunkpos35= ctx->thunkpos; - { int yypos36= ctx->pos, yythunkpos36= ctx->thunkpos; if (!yymatchChar(ctx, ']')) goto l36; goto l35; - l36:; ctx->pos= yypos36; ctx->thunkpos= yythunkpos36; - } if (!yy_range(ctx)) goto l35; goto l34; - l35:; ctx->pos= yypos35; ctx->thunkpos= yythunkpos35; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l33; if (!yymatchChar(ctx, ']')) goto l33; if (!yy__(ctx)) goto l33; - yyprintf((stderr, " ok %s @ %s\n", "class", ctx->buf+ctx->pos)); - return 1; - l33:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "class", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_literal(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "literal")); - { int yypos38= ctx->pos, yythunkpos38= ctx->thunkpos; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l39; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l39; - l40:; - { int yypos41= ctx->pos, yythunkpos41= ctx->thunkpos; - { int yypos42= ctx->pos, yythunkpos42= ctx->thunkpos; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l42; goto l41; - l42:; ctx->pos= yypos42; ctx->thunkpos= yythunkpos42; - } if (!yy_char(ctx)) goto l41; goto l40; - l41:; ctx->pos= yypos41; ctx->thunkpos= yythunkpos41; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l39; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l39; if (!yy__(ctx)) goto l39; goto l38; - l39:; ctx->pos= yypos38; ctx->thunkpos= yythunkpos38; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l37; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l37; - l43:; - { int yypos44= ctx->pos, yythunkpos44= ctx->thunkpos; - { int yypos45= ctx->pos, yythunkpos45= ctx->thunkpos; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l45; goto l44; - l45:; ctx->pos= yypos45; ctx->thunkpos= yythunkpos45; - } if (!yy_char(ctx)) goto l44; goto l43; - l44:; ctx->pos= yypos44; ctx->thunkpos= yythunkpos44; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l37; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l37; if (!yy__(ctx)) goto l37; - } - l38:; - yyprintf((stderr, " ok %s @ %s\n", "literal", ctx->buf+ctx->pos)); - return 1; - l37:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "literal", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_CLOSE(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "CLOSE")); if (!yymatchChar(ctx, ')')) goto l46; if (!yy__(ctx)) goto l46; - yyprintf((stderr, " ok %s @ %s\n", "CLOSE", ctx->buf+ctx->pos)); - return 1; - l46:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "CLOSE", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_OPEN(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "OPEN")); if (!yymatchChar(ctx, '(')) goto l47; if (!yy__(ctx)) goto l47; - yyprintf((stderr, " ok %s @ %s\n", "OPEN", ctx->buf+ctx->pos)); - return 1; - l47:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "OPEN", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_COLON(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "COLON")); if (!yymatchChar(ctx, ':')) goto l48; if (!yy__(ctx)) goto l48; - yyprintf((stderr, " ok %s @ %s\n", "COLON", ctx->buf+ctx->pos)); - return 1; - l48:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "COLON", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_PLUS(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "PLUS")); if (!yymatchChar(ctx, '+')) goto l49; if (!yy__(ctx)) goto l49; - yyprintf((stderr, " ok %s @ %s\n", "PLUS", ctx->buf+ctx->pos)); - return 1; - l49:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "PLUS", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_STAR(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "STAR")); if (!yymatchChar(ctx, '*')) goto l50; if (!yy__(ctx)) goto l50; - yyprintf((stderr, " ok %s @ %s\n", "STAR", ctx->buf+ctx->pos)); - return 1; - l50:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "STAR", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_QUESTION(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "QUESTION")); if (!yymatchChar(ctx, '?')) goto l51; if (!yy__(ctx)) goto l51; - yyprintf((stderr, " ok %s @ %s\n", "QUESTION", ctx->buf+ctx->pos)); - return 1; - l51:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "QUESTION", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_primary(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "primary")); - { int yypos53= ctx->pos, yythunkpos53= ctx->thunkpos; if (!yy_identifier(ctx)) goto l54; yyDo(ctx, yy_1_primary, ctx->begin, ctx->end); if (!yy_COLON(ctx)) goto l54; if (!yy_identifier(ctx)) goto l54; - { int yypos55= ctx->pos, yythunkpos55= ctx->thunkpos; if (!yy_EQUAL(ctx)) goto l55; goto l54; - l55:; ctx->pos= yypos55; ctx->thunkpos= yythunkpos55; - } yyDo(ctx, yy_2_primary, ctx->begin, ctx->end); goto l53; - l54:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_identifier(ctx)) goto l56; - { int yypos57= ctx->pos, yythunkpos57= ctx->thunkpos; if (!yy_EQUAL(ctx)) goto l57; goto l56; - l57:; ctx->pos= yypos57; ctx->thunkpos= yythunkpos57; - } yyDo(ctx, yy_3_primary, ctx->begin, ctx->end); goto l53; - l56:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_OPEN(ctx)) goto l58; if (!yy_expression(ctx)) goto l58; if (!yy_CLOSE(ctx)) goto l58; goto l53; - l58:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_literal(ctx)) goto l59; yyDo(ctx, yy_4_primary, ctx->begin, ctx->end); goto l53; - l59:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_class(ctx)) goto l60; yyDo(ctx, yy_5_primary, ctx->begin, ctx->end); goto l53; - l60:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_DOT(ctx)) goto l61; yyDo(ctx, yy_6_primary, ctx->begin, ctx->end); goto l53; - l61:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_action(ctx)) goto l62; yyDo(ctx, yy_7_primary, ctx->begin, ctx->end); goto l53; - l62:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_BEGIN(ctx)) goto l63; yyDo(ctx, yy_8_primary, ctx->begin, ctx->end); goto l53; - l63:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53; if (!yy_END(ctx)) goto l52; yyDo(ctx, yy_9_primary, ctx->begin, ctx->end); - } - l53:; - yyprintf((stderr, " ok %s @ %s\n", "primary", ctx->buf+ctx->pos)); - return 1; - l52:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "primary", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_NOT(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "NOT")); if (!yymatchChar(ctx, '!')) goto l64; if (!yy__(ctx)) goto l64; - yyprintf((stderr, " ok %s @ %s\n", "NOT", ctx->buf+ctx->pos)); - return 1; - l64:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "NOT", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_suffix(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "suffix")); if (!yy_primary(ctx)) goto l65; - { int yypos66= ctx->pos, yythunkpos66= ctx->thunkpos; - { int yypos68= ctx->pos, yythunkpos68= ctx->thunkpos; if (!yy_QUESTION(ctx)) goto l69; yyDo(ctx, yy_1_suffix, ctx->begin, ctx->end); goto l68; - l69:; ctx->pos= yypos68; ctx->thunkpos= yythunkpos68; if (!yy_STAR(ctx)) goto l70; yyDo(ctx, yy_2_suffix, ctx->begin, ctx->end); goto l68; - l70:; ctx->pos= yypos68; ctx->thunkpos= yythunkpos68; if (!yy_PLUS(ctx)) goto l66; yyDo(ctx, yy_3_suffix, ctx->begin, ctx->end); - } - l68:; goto l67; - l66:; ctx->pos= yypos66; ctx->thunkpos= yythunkpos66; - } - l67:; - yyprintf((stderr, " ok %s @ %s\n", "suffix", ctx->buf+ctx->pos)); - return 1; - l65:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "suffix", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_action(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "action")); if (!yymatchChar(ctx, '{')) goto l71; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l71; - l72:; - { int yypos73= ctx->pos, yythunkpos73= ctx->thunkpos; if (!yy_braces(ctx)) goto l73; goto l72; - l73:; ctx->pos= yypos73; ctx->thunkpos= yythunkpos73; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l71; if (!yymatchChar(ctx, '}')) goto l71; if (!yy__(ctx)) goto l71; - yyprintf((stderr, " ok %s @ %s\n", "action", ctx->buf+ctx->pos)); - return 1; - l71:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "action", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_AND(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "AND")); if (!yymatchChar(ctx, '&')) goto l74; if (!yy__(ctx)) goto l74; - yyprintf((stderr, " ok %s @ %s\n", "AND", ctx->buf+ctx->pos)); - return 1; - l74:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "AND", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_prefix(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "prefix")); - { int yypos76= ctx->pos, yythunkpos76= ctx->thunkpos; if (!yy_AND(ctx)) goto l77; if (!yy_action(ctx)) goto l77; yyDo(ctx, yy_1_prefix, ctx->begin, ctx->end); goto l76; - l77:; ctx->pos= yypos76; ctx->thunkpos= yythunkpos76; if (!yy_AND(ctx)) goto l78; if (!yy_suffix(ctx)) goto l78; yyDo(ctx, yy_2_prefix, ctx->begin, ctx->end); goto l76; - l78:; ctx->pos= yypos76; ctx->thunkpos= yythunkpos76; if (!yy_NOT(ctx)) goto l79; if (!yy_suffix(ctx)) goto l79; yyDo(ctx, yy_3_prefix, ctx->begin, ctx->end); goto l76; - l79:; ctx->pos= yypos76; ctx->thunkpos= yythunkpos76; if (!yy_suffix(ctx)) goto l75; - } - l76:; - yyprintf((stderr, " ok %s @ %s\n", "prefix", ctx->buf+ctx->pos)); - return 1; - l75:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "prefix", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_BAR(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "BAR")); if (!yymatchChar(ctx, '|')) goto l80; if (!yy__(ctx)) goto l80; - yyprintf((stderr, " ok %s @ %s\n", "BAR", ctx->buf+ctx->pos)); - return 1; - l80:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "BAR", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_sequence(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "sequence")); if (!yy_prefix(ctx)) goto l81; - l82:; - { int yypos83= ctx->pos, yythunkpos83= ctx->thunkpos; if (!yy_prefix(ctx)) goto l83; yyDo(ctx, yy_1_sequence, ctx->begin, ctx->end); goto l82; - l83:; ctx->pos= yypos83; ctx->thunkpos= yythunkpos83; - } - yyprintf((stderr, " ok %s @ %s\n", "sequence", ctx->buf+ctx->pos)); - return 1; - l81:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "sequence", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_SEMICOLON(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "SEMICOLON")); if (!yymatchChar(ctx, ';')) goto l84; if (!yy__(ctx)) goto l84; - yyprintf((stderr, " ok %s @ %s\n", "SEMICOLON", ctx->buf+ctx->pos)); - return 1; - l84:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "SEMICOLON", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_expression(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "expression")); if (!yy_sequence(ctx)) goto l85; - l86:; - { int yypos87= ctx->pos, yythunkpos87= ctx->thunkpos; if (!yy_BAR(ctx)) goto l87; if (!yy_sequence(ctx)) goto l87; yyDo(ctx, yy_1_expression, ctx->begin, ctx->end); goto l86; - l87:; ctx->pos= yypos87; ctx->thunkpos= yythunkpos87; - } - yyprintf((stderr, " ok %s @ %s\n", "expression", ctx->buf+ctx->pos)); - return 1; - l85:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "expression", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_EQUAL(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "EQUAL")); if (!yymatchChar(ctx, '=')) goto l88; if (!yy__(ctx)) goto l88; - yyprintf((stderr, " ok %s @ %s\n", "EQUAL", ctx->buf+ctx->pos)); - return 1; - l88:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "EQUAL", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_identifier(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "identifier")); yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l89; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\040\000\000\376\377\377\207\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l89; - l90:; - { int yypos91= ctx->pos, yythunkpos91= ctx->thunkpos; if (!yymatchClass(ctx, (unsigned char *)"\000\000\000\000\000\040\377\003\376\377\377\207\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l91; goto l90; - l91:; ctx->pos= yypos91; ctx->thunkpos= yythunkpos91; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l89; if (!yy__(ctx)) goto l89; - yyprintf((stderr, " ok %s @ %s\n", "identifier", ctx->buf+ctx->pos)); - return 1; - l89:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "identifier", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_RPERCENT(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "RPERCENT")); if (!yymatchString(ctx, "%}")) goto l92; if (!yy__(ctx)) goto l92; - yyprintf((stderr, " ok %s @ %s\n", "RPERCENT", ctx->buf+ctx->pos)); - return 1; - l92:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "RPERCENT", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_end_of_file(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "end_of_file")); - { int yypos94= ctx->pos, yythunkpos94= ctx->thunkpos; if (!yymatchDot(ctx)) goto l94; goto l93; - l94:; ctx->pos= yypos94; ctx->thunkpos= yythunkpos94; - } - yyprintf((stderr, " ok %s @ %s\n", "end_of_file", ctx->buf+ctx->pos)); - return 1; - l93:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "end_of_file", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_trailer(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "trailer")); if (!yymatchString(ctx, "%%")) goto l95; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l95; - l96:; - { int yypos97= ctx->pos, yythunkpos97= ctx->thunkpos; if (!yymatchDot(ctx)) goto l97; goto l96; - l97:; ctx->pos= yypos97; ctx->thunkpos= yythunkpos97; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l95; yyDo(ctx, yy_1_trailer, ctx->begin, ctx->end); - yyprintf((stderr, " ok %s @ %s\n", "trailer", ctx->buf+ctx->pos)); - return 1; - l95:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "trailer", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_definition(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "definition")); if (!yy_identifier(ctx)) goto l98; yyDo(ctx, yy_1_definition, ctx->begin, ctx->end); if (!yy_EQUAL(ctx)) goto l98; if (!yy_expression(ctx)) goto l98; yyDo(ctx, yy_2_definition, ctx->begin, ctx->end); - { int yypos99= ctx->pos, yythunkpos99= ctx->thunkpos; if (!yy_SEMICOLON(ctx)) goto l99; goto l100; - l99:; ctx->pos= yypos99; ctx->thunkpos= yythunkpos99; - } - l100:; - yyprintf((stderr, " ok %s @ %s\n", "definition", ctx->buf+ctx->pos)); - return 1; - l98:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "definition", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy_declaration(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "declaration")); if (!yymatchString(ctx, "%{")) goto l101; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l101; - l102:; - { int yypos103= ctx->pos, yythunkpos103= ctx->thunkpos; - { int yypos104= ctx->pos, yythunkpos104= ctx->thunkpos; if (!yymatchString(ctx, "%}")) goto l104; goto l103; - l104:; ctx->pos= yypos104; ctx->thunkpos= yythunkpos104; - } if (!yymatchDot(ctx)) goto l103; goto l102; - l103:; ctx->pos= yypos103; ctx->thunkpos= yythunkpos103; - } yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l101; if (!yy_RPERCENT(ctx)) goto l101; yyDo(ctx, yy_1_declaration, ctx->begin, ctx->end); - yyprintf((stderr, " ok %s @ %s\n", "declaration", ctx->buf+ctx->pos)); - return 1; - l101:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "declaration", ctx->buf+ctx->pos)); - return 0; -} -YY_RULE(int) yy__(yycontext *ctx) -{ - yyprintf((stderr, "%s\n", "_")); - l106:; - { int yypos107= ctx->pos, yythunkpos107= ctx->thunkpos; - { int yypos108= ctx->pos, yythunkpos108= ctx->thunkpos; if (!yy_space(ctx)) goto l109; goto l108; - l109:; ctx->pos= yypos108; ctx->thunkpos= yythunkpos108; if (!yy_comment(ctx)) goto l107; - } - l108:; goto l106; - l107:; ctx->pos= yypos107; ctx->thunkpos= yythunkpos107; - } - yyprintf((stderr, " ok %s @ %s\n", "_", ctx->buf+ctx->pos)); - return 1; -} -YY_RULE(int) yy_grammar(yycontext *ctx) -{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; - yyprintf((stderr, "%s\n", "grammar")); if (!yy__(ctx)) goto l110; - { int yypos113= ctx->pos, yythunkpos113= ctx->thunkpos; if (!yy_declaration(ctx)) goto l114; goto l113; - l114:; ctx->pos= yypos113; ctx->thunkpos= yythunkpos113; if (!yy_definition(ctx)) goto l110; - } - l113:; - l111:; - { int yypos112= ctx->pos, yythunkpos112= ctx->thunkpos; - { int yypos115= ctx->pos, yythunkpos115= ctx->thunkpos; if (!yy_declaration(ctx)) goto l116; goto l115; - l116:; ctx->pos= yypos115; ctx->thunkpos= yythunkpos115; if (!yy_definition(ctx)) goto l112; - } - l115:; goto l111; - l112:; ctx->pos= yypos112; ctx->thunkpos= yythunkpos112; - } - { int yypos117= ctx->pos, yythunkpos117= ctx->thunkpos; if (!yy_trailer(ctx)) goto l117; goto l118; - l117:; ctx->pos= yypos117; ctx->thunkpos= yythunkpos117; - } - l118:; if (!yy_end_of_file(ctx)) goto l110; - yyprintf((stderr, " ok %s @ %s\n", "grammar", ctx->buf+ctx->pos)); - return 1; - l110:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0; - yyprintf((stderr, " fail %s @ %s\n", "grammar", ctx->buf+ctx->pos)); - return 0; -} - -#ifndef YY_PART - -typedef int (*yyrule)(yycontext *ctx); - -YY_PARSE(int) YYPARSEFROM(YY_CTX_PARAM_ yyrule yystart) -{ - int yyok; - if (!yyctx->buflen) - { - yyctx->buflen= 1024; - yyctx->buf= (char *)malloc(yyctx->buflen); - yyctx->textlen= 1024; - yyctx->text= (char *)malloc(yyctx->textlen); - yyctx->thunkslen= 32; - yyctx->thunks= (yythunk *)malloc(sizeof(yythunk) * yyctx->thunkslen); - yyctx->valslen= 32; - yyctx->vals= (YYSTYPE *)malloc(sizeof(YYSTYPE) * yyctx->valslen); - yyctx->begin= yyctx->end= yyctx->pos= yyctx->limit= yyctx->thunkpos= 0; - } - yyctx->begin= yyctx->end= yyctx->pos; - yyctx->thunkpos= 0; - yyctx->val= yyctx->vals; - yyok= yystart(yyctx); - if (yyok) yyDone(yyctx); - yyCommit(yyctx); - return yyok; -} - -YY_PARSE(int) YYPARSE(YY_CTX_PARAM) -{ - return YYPARSEFROM(YY_CTX_ARG_ yy_grammar); -} - -#endif - - -void yyerror(char *message) -{ - fprintf(stderr, "%s:%d: %s", fileName, lineNumber, message); - if (yyctx->text[0]) fprintf(stderr, " near token '%s'", yyctx->text); - if (yyctx->pos < yyctx->limit || !feof(input)) - { - yyctx->buf[yyctx->limit]= '\0'; - fprintf(stderr, " before text \""); - while (yyctx->pos < yyctx->limit) - { - if ('\n' == yyctx->buf[yyctx->pos] || '\r' == yyctx->buf[yyctx->pos]) break; - fputc(yyctx->buf[yyctx->pos++], stderr); - } - if (yyctx->pos == yyctx->limit) - { - int c; - while (EOF != (c= fgetc(input)) && '\n' != c && '\r' != c) - fputc(c, stderr); - } - fputc('\"', stderr); - } - fprintf(stderr, "\n"); - exit(1); -} - -void makeHeader(char *text) -{ - Header *header= (Header *)malloc(sizeof(Header)); - header->text= strdup(text); - header->next= headers; - headers= header; -} - -void makeTrailer(char *text) -{ - trailer= strdup(text); -} - -static void version(char *name) -{ - printf("%s version %d.%d.%d\n", name, PEG_MAJOR, PEG_MINOR, PEG_LEVEL); -} - -static void usage(char *name) -{ - version(name); - fprintf(stderr, "usage: %s [